Apply clang-tidy fixes for readability-identifier-naming in AlgebraicSimplification...
authorMehdi Amini <joker.eph@gmail.com>
Mon, 14 Nov 2022 06:24:54 +0000 (06:24 +0000)
committerMehdi Amini <joker.eph@gmail.com>
Mon, 14 Nov 2022 20:04:23 +0000 (20:04 +0000)
mlir/lib/Dialect/Math/Transforms/AlgebraicSimplification.cpp

index a1e6746..c5e008e 100644 (file)
@@ -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();
   }