[llvm] [EarlyCSE] Fix improper icmp simplification (PR #122043)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 7 18:52:05 PST 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 a0f5bbcfb71a28cd3eaa308250af63a0889a1c85 dc7c72cef6a0f98d7361199ff4eed4864fb87323 --extensions cpp -- 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 db5156fcab..629cb484e3 100644
--- a/llvm/lib/Analysis/InstructionSimplify.cpp
+++ b/llvm/lib/Analysis/InstructionSimplify.cpp
@@ -3730,15 +3730,15 @@ static Value *simplifyICmpInst(CmpPredicate Pred, Value *LHS, Value *RHS,
// %mark = load volatile ptr, ptr %1, align 8
// icmp eq ptr %mark, null
if (const auto LHSInstr = dyn_cast<Instruction>(LHS)) {
- if (LHSInstr->isVolatile()) {
- return nullptr;
- }
+ if (LHSInstr->isVolatile()) {
+ return nullptr;
+ }
}
- if (const auto RHSInstr = dyn_cast<Instruction>(RHS)) {
- if (RHSInstr->isVolatile()) {
- return nullptr;
- }
+ if (const auto RHSInstr = dyn_cast<Instruction>(RHS)) {
+ if (RHSInstr->isVolatile()) {
+ return nullptr;
+ }
}
if (Constant *CLHS = dyn_cast<Constant>(LHS)) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/122043
More information about the llvm-commits
mailing list