Skip to content

Commit 11c19ea

Browse files
committed
[MLIR] Apply clang-tidy fixes for llvm-else-after-return in TosaValidation.cpp (NFC)
1 parent 4913aee commit 11c19ea

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

mlir/lib/Dialect/Tosa/Transforms/TosaValidation.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -514,8 +514,9 @@ struct TosaValidation : public tosa::impl::TosaValidationBase<TosaValidation> {
514514
<< "failed attribute check: rounding_mode = DOUBLE_ROUND "
515515
<< "requires extension [doubleround]";
516516
return false;
517-
} else if (rescale.getRoundingMode() == "INEXACT_ROUND" &&
518-
!targetEnv.allows(Extension::inexactround)) {
517+
}
518+
if (rescale.getRoundingMode() == "INEXACT_ROUND" &&
519+
!targetEnv.allows(Extension::inexactround)) {
519520
op->emitOpError()
520521
<< "failed attribute check: rounding_mode = INEXACT_ROUND "
521522
<< "requires extension [inexactround]";
@@ -1307,7 +1308,8 @@ bool TosaValidation::isValidElementType(Type type, const bool allowUnsigned) {
13071308
if (isa<FloatType>(type)) {
13081309
return isa<Float32Type, Float16Type, BFloat16Type, Float8E4M3FNType,
13091310
Float8E5M2Type>(type);
1310-
} else if (auto intTy = dyn_cast<IntegerType>(type)) {
1311+
}
1312+
if (auto intTy = dyn_cast<IntegerType>(type)) {
13111313
if (intTy.isSignless()) {
13121314
switch (intTy.getWidth()) {
13131315
case 1:

0 commit comments

Comments
 (0)