[llvm] [InstCombine] fold icmp of select with constants and invertible op (PR #147182)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 6 07:49:48 PDT 2025
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 HEAD~1 HEAD --extensions cpp -- llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
index 72767943c..89b530288 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
@@ -4495,8 +4495,8 @@ Instruction *InstCombinerImpl::foldSelectICmp(CmpPredicate Pred, SelectInst *SI,
"Invertible Operand0 mismatch");
auto *NewSI = Builder.CreateSelect(Cond, Values0->second,
Values1->second, SI->getName());
- return ICmpInst::Create(Instruction::ICmp, Pred, NewSI,
- Values0->first, I.getName());
+ return ICmpInst::Create(Instruction::ICmp, Pred, NewSI, Values0->first,
+ I.getName());
}
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/147182
More information about the llvm-commits
mailing list