[llvm] [InstCombine] Simplify and/or of icmp eq with op replacement (PR #70335)

via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 26 07:18:09 PDT 2023


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 2633d94f289b3d5aa86a1b00591a3c755ce693fa 5877211fbf3be378d37673f977e4aab2458754a3 -- llvm/lib/Analysis/InstructionSimplify.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Analysis/InstructionSimplify.cpp b/llvm/lib/Analysis/InstructionSimplify.cpp
index ad3f89a3e931..42cdfd760151 100644
--- a/llvm/lib/Analysis/InstructionSimplify.cpp
+++ b/llvm/lib/Analysis/InstructionSimplify.cpp
@@ -2203,11 +2203,11 @@ static Value *simplifyAndInst(Value *Op0, Value *Op1, const SimplifyQuery &Q,
       isKnownToBeAPowerOfTwo(Op0, Q.DL, /*OrZero*/ true, 0, Q.AC, Q.CxtI, Q.DT))
     return Constant::getNullValue(Op0->getType());
 
-  if (Value *V = simplifyAndOrWithICmpEq(Instruction::And, Op0, Op1, Q,
-                                         MaxRecurse))
+  if (Value *V =
+          simplifyAndOrWithICmpEq(Instruction::And, Op0, Op1, Q, MaxRecurse))
     return V;
-  if (Value *V = simplifyAndOrWithICmpEq(Instruction::And, Op1, Op0, Q,
-                                         MaxRecurse))
+  if (Value *V =
+          simplifyAndOrWithICmpEq(Instruction::And, Op1, Op0, Q, MaxRecurse))
     return V;
 
   if (Value *V = simplifyAndOrOfCmps(Q, Op0, Op1, true))

``````````

</details>


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


More information about the llvm-commits mailing list