Apply clang-tidy fixes for llvm-else-after-return in TensorOps.cpp (NFC)
authorMehdi Amini <joker.eph@gmail.com>
Sat, 10 Dec 2022 12:22:49 +0000 (12:22 +0000)
committerMehdi Amini <joker.eph@gmail.com>
Thu, 22 Dec 2022 15:33:01 +0000 (15:33 +0000)
mlir/lib/Dialect/Tensor/IR/TensorOps.cpp

index 99898f6..c87a003 100644 (file)
@@ -3160,16 +3160,16 @@ static LogicalResult commonVerifierPackAndUnPackOp(OpTy packOrUnPack) {
               // If specified tile size is dynamic, output shape should
               // be dynamic too.
               return ShapedType::isDynamic(shape);
-            } else {
-              if (ShapedType::isDynamic(shape)) {
-                // For the shape being dynamic when tile size is
-                // specified, return true. In canonical form a constant
-                // tile size should lead to constant shape of the tiled
-                // dimension, but not needed for verification.
-                return true;
-              }
-              return shape == constTileSize.value();
             }
+            if (ShapedType::isDynamic(shape)) {
+              // For the shape being dynamic when tile size is
+              // specified, return true. In canonical form a constant
+              // tile size should lead to constant shape of the tiled
+              // dimension, but not needed for verification.
+              return true;
+            }
+            return shape == constTileSize.value();
+           
           })) {
     return op->emitError("mismatch in inner tile sizes specified and shaped of "
                          "tiled dimension in the packed type");