[Mlir-commits] [mlir] beee574 - Apply clang-tidy fixes for readability-identifier-naming in AlgebraicSimplification.cpp (NFC)

Mehdi Amini llvmlistbot at llvm.org
Mon Nov 14 12:05:03 PST 2022


Author: Mehdi Amini
Date: 2022-11-14T20:04:23Z
New Revision: beee574000df77fa7ea82982000ec97d9be6f7ce

URL: https://github.com/llvm/llvm-project/commit/beee574000df77fa7ea82982000ec97d9be6f7ce
DIFF: https://github.com/llvm/llvm-project/commit/beee574000df77fa7ea82982000ec97d9be6f7ce.diff

LOG: Apply clang-tidy fixes for readability-identifier-naming in AlgebraicSimplification.cpp (NFC)

Added: 
    

Modified: 
    mlir/lib/Dialect/Math/Transforms/AlgebraicSimplification.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Math/Transforms/AlgebraicSimplification.cpp b/mlir/lib/Dialect/Math/Transforms/AlgebraicSimplification.cpp
index a1e6746b8fe9b..c5e008e520473 100644
--- a/mlir/lib/Dialect/Math/Transforms/AlgebraicSimplification.cpp
+++ b/mlir/lib/Dialect/Math/Transforms/AlgebraicSimplification.cpp
@@ -111,10 +111,10 @@ PowFStrengthReduction::matchAndRewrite(math::PowFOp op,
 
   // Replace `pow(x, 0.75)` with `sqrt(sqrt(x)) * sqrt(x)`.
   if (isExponentValue(0.75)) {
-    Value pow_half = rewriter.create<math::SqrtOp>(op.getLoc(), x);
-    Value pow_quarter = rewriter.create<math::SqrtOp>(op.getLoc(), pow_half);
-    rewriter.replaceOpWithNewOp<arith::MulFOp>(
-        op, ValueRange{pow_half, pow_quarter});
+    Value powHalf = rewriter.create<math::SqrtOp>(op.getLoc(), x);
+    Value powQuarter = rewriter.create<math::SqrtOp>(op.getLoc(), powHalf);
+    rewriter.replaceOpWithNewOp<arith::MulFOp>(op,
+                                               ValueRange{powHalf, powQuarter});
     return success();
   }
 


        


More information about the Mlir-commits mailing list