[llvm] [InstCombine] optimize powi(X,Y) * X with Ofast (PR #69998)

via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 4 05:31:50 PST 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 60e7ae3f30e99423cf779c9d05513d2ae18df5aa 865e087d8430536547fc0e74b568117da2f6c538 -- llvm/lib/Transforms/InstCombine/InstCombineInternal.h llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp b/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
index 2e38d0ee6d..0111969b32 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
@@ -596,7 +596,7 @@ Instruction *InstCombinerImpl::foldPowiReassoc(BinaryOperator &I) {
       if (!Powi)
         Powi = cast<IntrinsicInst>(I.getOperand(1));
       if (Powi->hasAllowReassoc())
-      return createPowiExpr(I, *this, X, Y, One);
+        return createPowiExpr(I, *this, X, Y, One);
     }
   }
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/69998


More information about the llvm-commits mailing list