[llvm] [SCEV] Prove umin(Ops) u< RHS by checking individual operands (PR #207729)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 6 06:09:35 PDT 2026
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 origin/main HEAD --extensions cpp -- llvm/lib/Analysis/ScalarEvolution.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index 39d082f6e..134be6ac0 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -13034,8 +13034,7 @@ static bool IsKnownPredicateViaMinOrMax(ScalarEvolution &SE, CmpPredicate Pred,
// When Op and RHS share a common base differing by a
// constant offset D (RHS - Op = D), Op u< RHS holds iff D != 0 and
// RHS >= D (unsigned), i.e. the subtraction doesn't underflow.
- if (Diff && !Diff->isZero() &&
- SE.getUnsignedRangeMin(RHS).uge(*Diff))
+ if (Diff && !Diff->isZero() && SE.getUnsignedRangeMin(RHS).uge(*Diff))
return true;
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/207729
More information about the llvm-commits
mailing list