[Mlir-commits] [mlir] a76bd4f - Apply clang-tidy fixes for llvm-else-after-return in TosaToLinalg.cpp (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Sat Oct 8 11:21:08 PDT 2022
Author: Mehdi Amini
Date: 2022-10-08T18:18:13Z
New Revision: a76bd4f59dd142c13e0b4a1274c30dad61d17b15
URL: https://github.com/llvm/llvm-project/commit/a76bd4f59dd142c13e0b4a1274c30dad61d17b15
DIFF: https://github.com/llvm/llvm-project/commit/a76bd4f59dd142c13e0b4a1274c30dad61d17b15.diff
LOG: Apply clang-tidy fixes for llvm-else-after-return in TosaToLinalg.cpp (NFC)
Added:
Modified:
mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp b/mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
index cfb7124ff743c..b837cb1d80289 100644
--- a/mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
+++ b/mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
@@ -1563,16 +1563,16 @@ class ResizeConverter : public OpRewritePattern<tosa::ResizeOp> {
rewriter.create<linalg::YieldOp>(loc, result);
return success();
- } else {
- y0x0 = rewriter.create<arith::ExtSIOp>(loc, resultElementTy, y0x0);
- y0x1 = rewriter.create<arith::ExtSIOp>(loc, resultElementTy, y0x1);
- y1x0 = rewriter.create<arith::ExtSIOp>(loc, resultElementTy, y1x0);
- y1x1 = rewriter.create<arith::ExtSIOp>(loc, resultElementTy, y1x1);
-
- if (resultElementTy.getIntOrFloatBitWidth() > 32) {
- dx = rewriter.create<arith::ExtSIOp>(loc, resultElementTy, dx);
- dy = rewriter.create<arith::ExtSIOp>(loc, resultElementTy, dy);
- }
+ }
+ y0x0 = rewriter.create<arith::ExtSIOp>(loc, resultElementTy, y0x0);
+ y0x1 = rewriter.create<arith::ExtSIOp>(loc, resultElementTy, y0x1);
+ y1x0 = rewriter.create<arith::ExtSIOp>(loc, resultElementTy, y1x0);
+ y1x1 = rewriter.create<arith::ExtSIOp>(loc, resultElementTy, y1x1);
+
+ if (resultElementTy.getIntOrFloatBitWidth() > 32) {
+ dx = rewriter.create<arith::ExtSIOp>(loc, resultElementTy, dx);
+ dy = rewriter.create<arith::ExtSIOp>(loc, resultElementTy, dy);
+ }
Value rightPart = dx;
Value leftPart = rewriter.create<arith::SubIOp>(loc, xScaleN, dx);
@@ -1593,7 +1593,6 @@ class ResizeConverter : public OpRewritePattern<tosa::ResizeOp> {
rewriter.create<linalg::YieldOp>(loc, result);
return success();
- }
}
return failure();
More information about the Mlir-commits
mailing list