[llvm] [llvm][GVN] Propagate `trunc nuw to i1` equalities (PR #143273)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 7 23:44:15 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/Scalar/GVN.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/Scalar/GVN.cpp b/llvm/lib/Transforms/Scalar/GVN.cpp
index ff5da64f3..eed7028c9 100644
--- a/llvm/lib/Transforms/Scalar/GVN.cpp
+++ b/llvm/lib/Transforms/Scalar/GVN.cpp
@@ -2586,8 +2586,8 @@ bool GVNPass::propagateEquality(Value *LHS, Value *RHS,
if (auto *Trunc = dyn_cast<TruncInst>(LHS)) {
if (Trunc->hasNoUnsignedWrap() && Trunc->getType()->isIntegerTy(1)) {
Value *Input = Trunc->getOperand(0);
- Worklist.push_back({Input,
- ConstantInt::get(Input->getType(), IsKnownTrue)});
+ Worklist.push_back(
+ {Input, ConstantInt::get(Input->getType(), IsKnownTrue)});
}
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/143273
More information about the llvm-commits
mailing list