[llvm] [ConstraintElim] Add facts implied by llvm.abs (PR #73189)

via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 22 16:51:47 PST 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 7c3c8a12775bdb0b0771986f008e2589db4846f9 a9e76a878edc8bc9cb81b8aa169bbbc467d32026 -- llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp b/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
index 59aaa677cc..786e3f0ac2 100644
--- a/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
@@ -1634,7 +1634,7 @@ static bool eliminateConstraints(Function &F, DominatorTree &DT, LoopInfo &LI,
 
     ICmpInst::Predicate Pred;
     if (!CB.isConditionFact()) {
-      if (Value *X; match(CB.Inst, m_Intrinsic<Intrinsic::abs>(m_Value(X)))) {
+      if (Value * X; match(CB.Inst, m_Intrinsic<Intrinsic::abs>(m_Value(X)))) {
         AddFact(CmpInst::ICMP_SGE, CB.Inst, X);
         continue;
       }

``````````

</details>


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


More information about the llvm-commits mailing list