[llvm] Check Affine AR only. (PR #144550)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 17 08:55:19 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/Analysis/ScalarEvolution.cpp
``````````
</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 a919425df..3d0b4e15d 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -10894,7 +10894,9 @@ bool ScalarEvolution::SimplifyICmpOperands(CmpPredicate &Pred, const SCEV *&LHS,
case ICmpInst::ICMP_UGE:
// If RHS is an op we can fold the -1, try that first.
// Otherwise prefer LHS to preserve the nuw flag.
- if ((isa<SCEVConstant>(RHS) || match(RHS, m_scev_AffineAddRec(m_SCEVConstant(), m_SCEV(), m_Loop()))) &&
+ if ((isa<SCEVConstant>(RHS) ||
+ match(RHS,
+ m_scev_AffineAddRec(m_SCEVConstant(), m_SCEV(), m_Loop()))) &&
!getUnsignedRangeMin(RHS).isMinValue()) {
RHS = getAddExpr(getConstant(RHS->getType(), (uint64_t)-1, true), RHS);
Pred = ICmpInst::ICMP_UGT;
``````````
</details>
https://github.com/llvm/llvm-project/pull/144550
More information about the llvm-commits
mailing list