[llvm] [InstCombine] Remove mul of SPF abs fold (PR #88675)

via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 14 19:44:52 PDT 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 a9d7ad23fa625e7f52f2641dbb0f90e8ea12bebf 89e26d458edf22d4aff5e9774e43221397ace2cd -- 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 ea34431755..48372381a0 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
@@ -320,8 +320,7 @@ Instruction *InstCombinerImpl::visitMul(BinaryOperator &I) {
 
   // abs(X) * abs(X) -> X * X
   Value *X;
-  if (Op0 == Op1 &&
-      match(Op0, m_Intrinsic<Intrinsic::abs>(m_Value(X))))
+  if (Op0 == Op1 && match(Op0, m_Intrinsic<Intrinsic::abs>(m_Value(X))))
     return BinaryOperator::CreateMul(X, X);
 
   {

``````````

</details>


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


More information about the llvm-commits mailing list