[llvm] [InstCombine] `A == MIN_INT ? B != MIN_INT : A < B` to `A < B` (PR #120177)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 17 19:33:10 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 8b02d809d284c8e10b38087431def52c86e3e9e6 c34b8171fd513bb2268c3d79c9714ec6db723507 --extensions cpp -- llvm/lib/Analysis/InstructionSimplify.cpp llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp b/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
index de62e8f1a1..9ff46cad1b 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
@@ -1840,9 +1840,8 @@ static Instruction *foldSelectICmpEq(SelectInst &SI, ICmpInst *ICI,
if (Pred == ICmpInst::ICMP_NE)
std::swap(TrueVal, FalseVal);
-
- if (Value *V =
- foldSelectWithExtremeEqCond(CmpLHS, CmpRHS, TrueVal, FalseVal, IC.Builder))
+ if (Value *V = foldSelectWithExtremeEqCond(CmpLHS, CmpRHS, TrueVal, FalseVal,
+ IC.Builder))
return IC.replaceInstUsesWith(SI, V);
// Transform (X == C) ? X : Y -> (X == C) ? C : Y
``````````
</details>
https://github.com/llvm/llvm-project/pull/120177
More information about the llvm-commits
mailing list