Skip to content

Check Affine AR only. #144550

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

fhahn
Copy link
Contributor

@fhahn fhahn commented Jun 17, 2025

No description provided.

Copy link

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff HEAD~1 HEAD --extensions cpp -- llvm/lib/Analysis/ScalarEvolution.cpp
View the diff from clang-format here.
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;

@fhahn fhahn closed this Jun 18, 2025
@fhahn fhahn deleted the scev-check-affine-ar-only branch June 18, 2025 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant