[llvm] [SCEV] Convert more interfaces to use SCEVUse (NFC). (PR #185045)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 19 06:05:50 PDT 2026


https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/185045

>From c6d2eeca3821827c90dc2a184ad59564409702cf Mon Sep 17 00:00:00 2001
From: Florian Hahn <flo at fhahn.com>
Date: Fri, 6 Mar 2026 10:01:57 +0000
Subject: [PATCH 1/3] [SCEV] Convert more interfaces to use SCEVUse (NFC).

---
 llvm/include/llvm/Analysis/ScalarEvolution.h  | 41 +++++++---------
 .../Analysis/ScalarEvolutionPatternMatch.h    | 12 +++++
 llvm/lib/Analysis/ScalarEvolution.cpp         | 49 +++++++++----------
 3 files changed, 54 insertions(+), 48 deletions(-)

diff --git a/llvm/include/llvm/Analysis/ScalarEvolution.h b/llvm/include/llvm/Analysis/ScalarEvolution.h
index 49367199b2c83..9a97ca218b3d3 100644
--- a/llvm/include/llvm/Analysis/ScalarEvolution.h
+++ b/llvm/include/llvm/Analysis/ScalarEvolution.h
@@ -1200,13 +1200,12 @@ class ScalarEvolution {
   ///    so we can assert on that.
   /// e. Return true if isLoopEntryGuardedByCond(Pred, E(LHS), E(RHS)) &&
   ///                   isLoopBackedgeGuardedByCond(Pred, B(LHS), B(RHS))
-  LLVM_ABI bool isKnownViaInduction(CmpPredicate Pred, const SCEV *LHS,
-                                    const SCEV *RHS);
+  LLVM_ABI bool isKnownViaInduction(CmpPredicate Pred, SCEVUse LHS,
+                                    SCEVUse RHS);
 
   /// Test if the given expression is known to satisfy the condition described
   /// by Pred, LHS, and RHS.
-  LLVM_ABI bool isKnownPredicate(CmpPredicate Pred, const SCEV *LHS,
-                                 const SCEV *RHS);
+  LLVM_ABI bool isKnownPredicate(CmpPredicate Pred, SCEVUse LHS, SCEVUse RHS);
 
   /// Check whether the condition described by Pred, LHS, and RHS is true or
   /// false. If we know it, return the evaluation of this condition. If neither
@@ -1255,6 +1254,7 @@ class ScalarEvolution {
     /// one from a SCEVCouldNotCompute.  No other types of SCEVs are allowed
     /// as arguments and asserts enforce that internally.
     /*implicit*/ LLVM_ABI ExitLimit(const SCEV *E);
+    /*implicit*/ ExitLimit(SCEVUse E) : ExitLimit((const SCEV *)E) {}
 
     LLVM_ABI
     ExitLimit(const SCEV *E, const SCEV *ConstantMaxNotTaken,
@@ -1348,8 +1348,8 @@ class ScalarEvolution {
   /// iff any changes were made. If the operands are provably equal or
   /// unequal, LHS and RHS are set to the same value and Pred is set to either
   /// ICMP_EQ or ICMP_NE.
-  LLVM_ABI bool SimplifyICmpOperands(CmpPredicate &Pred, const SCEV *&LHS,
-                                     const SCEV *&RHS, unsigned Depth = 0);
+  LLVM_ABI bool SimplifyICmpOperands(CmpPredicate &Pred, SCEVUse &LHS,
+                                     SCEVUse &RHS, unsigned Depth = 0);
 
   /// Return the "disposition" of the given SCEV with respect to the given
   /// loop.
@@ -2029,8 +2029,7 @@ class ScalarEvolution {
   /// return more precise results in some cases and is preferred when caller
   /// has a materialized ICmp.
   ExitLimit computeExitLimitFromICmp(const Loop *L, CmpPredicate Pred,
-                                     const SCEV *LHS, const SCEV *RHS,
-                                     bool IsSubExpr,
+                                     SCEVUse LHS, SCEVUse RHS, bool IsSubExpr,
                                      bool AllowPredicates = false);
 
   /// Compute the number of times the backedge of the specified loop will
@@ -2110,11 +2109,9 @@ class ScalarEvolution {
   /// whenever the given FoundCondValue value evaluates to true in given
   /// Context. If Context is nullptr, then the found predicate is true
   /// everywhere. LHS and FoundLHS must have same type width.
-  LLVM_ABI bool isImpliedCondBalancedTypes(CmpPredicate Pred, const SCEV *LHS,
-                                           const SCEV *RHS,
-                                           CmpPredicate FoundPred,
-                                           const SCEV *FoundLHS,
-                                           const SCEV *FoundRHS,
+  LLVM_ABI bool isImpliedCondBalancedTypes(CmpPredicate Pred, SCEVUse LHS,
+                                           SCEVUse RHS, CmpPredicate FoundPred,
+                                           SCEVUse FoundLHS, SCEVUse FoundRHS,
                                            const Instruction *CtxI);
 
   /// Test whether the condition described by Pred, LHS, and RHS is true
@@ -2145,8 +2142,8 @@ class ScalarEvolution {
 
   /// Test whether the condition described by Pred, LHS, and RHS is true.
   /// Use only simple non-recursive types of checks, such as range analysis etc.
-  bool isKnownViaNonRecursiveReasoning(CmpPredicate Pred, const SCEV *LHS,
-                                       const SCEV *RHS);
+  bool isKnownViaNonRecursiveReasoning(CmpPredicate Pred, SCEVUse LHS,
+                                       SCEVUse RHS);
 
   /// Test whether the condition described by Pred, LHS, and RHS is true
   /// whenever the condition described by Pred, FoundLHS, and FoundRHS is
@@ -2219,24 +2216,24 @@ class ScalarEvolution {
 
   /// Test if the given expression is known to satisfy the condition described
   /// by Pred and the known constant ranges of LHS and RHS.
-  bool isKnownPredicateViaConstantRanges(CmpPredicate Pred, const SCEV *LHS,
-                                         const SCEV *RHS);
+  bool isKnownPredicateViaConstantRanges(CmpPredicate Pred, SCEVUse LHS,
+                                         SCEVUse RHS);
 
   /// Try to prove the condition described by "LHS Pred RHS" by ruling out
   /// integer overflow.
   ///
   /// For instance, this will return true for "A s< (A + C)<nsw>" if C is
   /// positive.
-  bool isKnownPredicateViaNoOverflow(CmpPredicate Pred, const SCEV *LHS,
-                                     const SCEV *RHS);
+  bool isKnownPredicateViaNoOverflow(CmpPredicate Pred, SCEVUse LHS,
+                                     SCEVUse RHS);
 
   /// Try to split Pred LHS RHS into logical conjunctions (and's) and try to
   /// prove them individually.
-  bool isKnownPredicateViaSplitting(CmpPredicate Pred, const SCEV *LHS,
-                                    const SCEV *RHS);
+  bool isKnownPredicateViaSplitting(CmpPredicate Pred, SCEVUse LHS,
+                                    SCEVUse RHS);
 
   /// Try to match the Expr as "(L + R)<Flags>".
-  bool splitBinaryAdd(const SCEV *Expr, const SCEV *&L, const SCEV *&R,
+  bool splitBinaryAdd(SCEVUse Expr, SCEVUse &L, SCEVUse &R,
                       SCEV::NoWrapFlags &Flags);
 
   /// Forget predicated/non-predicated backedge taken counts for the given loop.
diff --git a/llvm/include/llvm/Analysis/ScalarEvolutionPatternMatch.h b/llvm/include/llvm/Analysis/ScalarEvolutionPatternMatch.h
index 0b47357434782..398dc7da67abc 100644
--- a/llvm/include/llvm/Analysis/ScalarEvolutionPatternMatch.h
+++ b/llvm/include/llvm/Analysis/ScalarEvolutionPatternMatch.h
@@ -88,8 +88,20 @@ template <typename Class> struct bind_ty {
   }
 };
 
+template <> struct bind_ty<SCEVUse> {
+  SCEVUse &VR;
+
+  bind_ty(SCEVUse &V) : VR(V) {}
+
+  template <typename ITy> bool match(ITy *V) const {
+    VR = V;
+    return true;
+  }
+};
+
 /// Match a SCEV, capturing it if we match.
 inline bind_ty<const SCEV> m_SCEV(const SCEV *&V) { return V; }
+inline bind_ty<SCEVUse> m_SCEV(SCEVUse &V) { return V; }
 inline bind_ty<const SCEVConstant> m_SCEVConstant(const SCEVConstant *&V) {
   return V;
 }
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index da23af9c456ad..73b3abaed18c1 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -9391,7 +9391,7 @@ ScalarEvolution::ExitLimit ScalarEvolution::computeExitLimitFromICmp(
                                       ExitCond->getOperand(1), L, OriginalPred);
 }
 ScalarEvolution::ExitLimit ScalarEvolution::computeExitLimitFromICmp(
-    const Loop *L, CmpPredicate Pred, const SCEV *LHS, const SCEV *RHS,
+    const Loop *L, CmpPredicate Pred, SCEVUse LHS, SCEVUse RHS,
     bool ControlsOnlyExit, bool AllowPredicates) {
 
   // Try to evaluate any dependencies out of the loop.
@@ -9433,7 +9433,7 @@ ScalarEvolution::ExitLimit ScalarEvolution::computeExitLimitFromICmp(
     // because if it did, we'd have an infinite (undefined) loop.
     // TODO: We can peel off any functions which are invertible *in L*.  Loop
     // invariant terms are effectively constants for our purposes here.
-    auto *InnerLHS = LHS;
+    const SCEV *InnerLHS = LHS;
     if (auto *ZExt = dyn_cast<SCEVZeroExtendExpr>(LHS))
       InnerLHS = ZExt->getOperand();
     if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(InnerLHS);
@@ -10945,7 +10945,7 @@ static bool HasSameValue(const SCEV *A, const SCEV *B) {
   return false;
 }
 
-static bool MatchBinarySub(const SCEV *S, const SCEV *&LHS, const SCEV *&RHS) {
+static bool MatchBinarySub(const SCEV *S, SCEVUse &LHS, SCEVUse &RHS) {
   const SCEV *Op0, *Op1;
   if (!match(S, m_scev_Add(m_SCEV(Op0), m_SCEV(Op1))))
     return false;
@@ -10960,8 +10960,8 @@ static bool MatchBinarySub(const SCEV *S, const SCEV *&LHS, const SCEV *&RHS) {
   return false;
 }
 
-bool ScalarEvolution::SimplifyICmpOperands(CmpPredicate &Pred, const SCEV *&LHS,
-                                           const SCEV *&RHS, unsigned Depth) {
+bool ScalarEvolution::SimplifyICmpOperands(CmpPredicate &Pred, SCEVUse &LHS,
+                                           SCEVUse &RHS, unsigned Depth) {
   bool Changed = false;
   // Simplifies ICMP to trivial true or false by turning it into '0 == 0' or
   // '0 != 0'.
@@ -11283,8 +11283,8 @@ ScalarEvolution::SplitIntoInitAndPostInc(const Loop *L, const SCEV *S) {
   return { Start, PostInc };
 }
 
-bool ScalarEvolution::isKnownViaInduction(CmpPredicate Pred, const SCEV *LHS,
-                                          const SCEV *RHS) {
+bool ScalarEvolution::isKnownViaInduction(CmpPredicate Pred, SCEVUse LHS,
+                                          SCEVUse RHS) {
   // First collect all loops.
   SmallPtrSet<const Loop *, 8> LoopsUsed;
   getUsedLoops(LHS, LoopsUsed);
@@ -11333,8 +11333,8 @@ bool ScalarEvolution::isKnownViaInduction(CmpPredicate Pred, const SCEV *LHS,
          isLoopEntryGuardedByCond(MDL, Pred, SplitLHS.first, SplitRHS.first);
 }
 
-bool ScalarEvolution::isKnownPredicate(CmpPredicate Pred, const SCEV *LHS,
-                                       const SCEV *RHS) {
+bool ScalarEvolution::isKnownPredicate(CmpPredicate Pred, SCEVUse LHS,
+                                       SCEVUse RHS) {
   // Canonicalize the inputs first.
   (void)SimplifyICmpOperands(Pred, LHS, RHS);
 
@@ -11627,8 +11627,8 @@ ScalarEvolution::getLoopInvariantExitCondDuringFirstIterationsImpl(
 }
 
 bool ScalarEvolution::isKnownPredicateViaConstantRanges(CmpPredicate Pred,
-                                                        const SCEV *LHS,
-                                                        const SCEV *RHS) {
+                                                        SCEVUse LHS,
+                                                        SCEVUse RHS) {
   if (HasSameValue(LHS, RHS))
     return ICmpInst::isTrueWhenEqual(Pred);
 
@@ -11654,17 +11654,16 @@ bool ScalarEvolution::isKnownPredicateViaConstantRanges(CmpPredicate Pred,
 }
 
 bool ScalarEvolution::isKnownPredicateViaNoOverflow(CmpPredicate Pred,
-                                                    const SCEV *LHS,
-                                                    const SCEV *RHS) {
+                                                    SCEVUse LHS, SCEVUse RHS) {
   // Match X to (A + C1)<ExpectedFlags> and Y to (A + C2)<ExpectedFlags>, where
   // C1 and C2 are constant integers. If either X or Y are not add expressions,
   // consider them as X + 0 and Y + 0 respectively. C1 and C2 are returned via
   // OutC1 and OutC2.
-  auto MatchBinaryAddToConst = [this](const SCEV *X, const SCEV *Y,
-                                      APInt &OutC1, APInt &OutC2,
+  auto MatchBinaryAddToConst = [this](SCEVUse X, SCEVUse Y, APInt &OutC1,
+                                      APInt &OutC2,
                                       SCEV::NoWrapFlags ExpectedFlags) {
-    const SCEV *XNonConstOp, *XConstOp;
-    const SCEV *YNonConstOp, *YConstOp;
+    SCEVUse XNonConstOp, XConstOp;
+    SCEVUse YNonConstOp, YConstOp;
     SCEV::NoWrapFlags XFlagsPresent;
     SCEV::NoWrapFlags YFlagsPresent;
 
@@ -11754,8 +11753,7 @@ bool ScalarEvolution::isKnownPredicateViaNoOverflow(CmpPredicate Pred,
 }
 
 bool ScalarEvolution::isKnownPredicateViaSplitting(CmpPredicate Pred,
-                                                   const SCEV *LHS,
-                                                   const SCEV *RHS) {
+                                                   SCEVUse LHS, SCEVUse RHS) {
   if (Pred != ICmpInst::ICMP_ULT || ProvingSplitPredicate)
     return false;
 
@@ -12112,8 +12110,8 @@ bool ScalarEvolution::isImpliedCond(CmpPredicate Pred, const SCEV *LHS,
 }
 
 bool ScalarEvolution::isImpliedCondBalancedTypes(
-    CmpPredicate Pred, const SCEV *LHS, const SCEV *RHS, CmpPredicate FoundPred,
-    const SCEV *FoundLHS, const SCEV *FoundRHS, const Instruction *CtxI) {
+    CmpPredicate Pred, SCEVUse LHS, SCEVUse RHS, CmpPredicate FoundPred,
+    SCEVUse FoundLHS, SCEVUse FoundRHS, const Instruction *CtxI) {
   assert(getTypeSizeInBits(LHS->getType()) ==
              getTypeSizeInBits(FoundLHS->getType()) &&
          "Types should be balanced!");
@@ -12315,8 +12313,7 @@ bool ScalarEvolution::isImpliedCondBalancedTypes(
   return false;
 }
 
-bool ScalarEvolution::splitBinaryAdd(const SCEV *Expr,
-                                     const SCEV *&L, const SCEV *&R,
+bool ScalarEvolution::splitBinaryAdd(SCEVUse Expr, SCEVUse &L, SCEVUse &R,
                                      SCEV::NoWrapFlags &Flags) {
   if (!match(Expr, m_scev_Add(m_SCEV(L), m_SCEV(R))))
     return false;
@@ -13014,8 +13011,8 @@ static bool isKnownPredicateExtendIdiom(CmpPredicate Pred, const SCEV *LHS,
 }
 
 bool ScalarEvolution::isKnownViaNonRecursiveReasoning(CmpPredicate Pred,
-                                                      const SCEV *LHS,
-                                                      const SCEV *RHS) {
+                                                      SCEVUse LHS,
+                                                      SCEVUse RHS) {
   return isKnownPredicateExtendIdiom(Pred, LHS, RHS) ||
          isKnownPredicateViaConstantRanges(Pred, LHS, RHS) ||
          IsKnownPredicateViaMinOrMax(*this, Pred, LHS, RHS) ||
@@ -16178,7 +16175,7 @@ const SCEV *ScalarEvolution::LoopGuards::rewrite(const SCEV *Expr) const {
       // Helper to check if S is a subtraction (A - B) where A != B, and if so,
       // return UMax(S, 1).
       auto RewriteSubtraction = [&](const SCEV *S) -> const SCEV * {
-        const SCEV *LHS, *RHS;
+        SCEVUse LHS, RHS;
         if (MatchBinarySub(S, LHS, RHS)) {
           if (LHS > RHS)
             std::swap(LHS, RHS);

>From 38da8f407ef59cc28cd6a48969e9aa9486edfa30 Mon Sep 17 00:00:00 2001
From: Florian Hahn <flo at fhahn.com>
Date: Tue, 17 Mar 2026 16:53:44 +0000
Subject: [PATCH 2/3] !fixup use SCEVUse in one more place

---
 llvm/lib/Analysis/ScalarEvolution.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index 73b3abaed18c1..d99488121baba 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -9433,7 +9433,7 @@ ScalarEvolution::ExitLimit ScalarEvolution::computeExitLimitFromICmp(
     // because if it did, we'd have an infinite (undefined) loop.
     // TODO: We can peel off any functions which are invertible *in L*.  Loop
     // invariant terms are effectively constants for our purposes here.
-    const SCEV *InnerLHS = LHS;
+    SCEVUse InnerLHS = LHS;
     if (auto *ZExt = dyn_cast<SCEVZeroExtendExpr>(LHS))
       InnerLHS = ZExt->getOperand();
     if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(InnerLHS);

>From bc8509553ec1c9740016b107ef2d1aceba7f9bae Mon Sep 17 00:00:00 2001
From: Florian Hahn <flo at fhahn.com>
Date: Thu, 19 Mar 2026 12:58:27 +0000
Subject: [PATCH 3/3] !fixup update ScalarEvolutionTest.cpp

---
 .../Analysis/ScalarEvolutionTest.cpp          | 40 +++++++++----------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/llvm/unittests/Analysis/ScalarEvolutionTest.cpp b/llvm/unittests/Analysis/ScalarEvolutionTest.cpp
index 6c16f1b90e489..8504534693281 100644
--- a/llvm/unittests/Analysis/ScalarEvolutionTest.cpp
+++ b/llvm/unittests/Analysis/ScalarEvolutionTest.cpp
@@ -1789,8 +1789,8 @@ TEST_F(ScalarEvolutionsTest, SimplifyICmpOperands) {
 
     {
       CmpPredicate NewPred = ICmpInst::ICMP_SLT;
-      const SCEV *NewLHS = VSxA;
-      const SCEV *NewRHS = VSxB;
+      SCEVUse NewLHS = VSxA;
+      SCEVUse NewRHS = VSxB;
       EXPECT_TRUE(SE.SimplifyICmpOperands(NewPred, NewLHS, NewRHS));
       EXPECT_EQ(NewPred, ICmpInst::ICMP_SLT);
       EXPECT_EQ(NewLHS, A);
@@ -1799,8 +1799,8 @@ TEST_F(ScalarEvolutionsTest, SimplifyICmpOperands) {
 
     {
       CmpPredicate NewPred = ICmpInst::ICMP_ULT;
-      const SCEV *NewLHS = VSxA;
-      const SCEV *NewRHS = VSxB;
+      SCEVUse NewLHS = VSxA;
+      SCEVUse NewRHS = VSxB;
       EXPECT_TRUE(SE.SimplifyICmpOperands(NewPred, NewLHS, NewRHS));
       EXPECT_EQ(NewPred, ICmpInst::ICMP_ULT);
       EXPECT_EQ(NewLHS, A);
@@ -1809,8 +1809,8 @@ TEST_F(ScalarEvolutionsTest, SimplifyICmpOperands) {
 
     {
       CmpPredicate NewPred = ICmpInst::ICMP_EQ;
-      const SCEV *NewLHS = VSxA;
-      const SCEV *NewRHS = VSxB;
+      SCEVUse NewLHS = VSxA;
+      SCEVUse NewRHS = VSxB;
       EXPECT_TRUE(SE.SimplifyICmpOperands(NewPred, NewLHS, NewRHS));
       EXPECT_EQ(NewPred, ICmpInst::ICMP_EQ);
       EXPECT_EQ(NewLHS, A);
@@ -1827,8 +1827,8 @@ TEST_F(ScalarEvolutionsTest, SimplifyICmpOperands) {
                   isa<SCEVVScale>(cast<SCEVMulExpr>(CxVS)->getOperand(0)));
 
       CmpPredicate NewPred = ICmpInst::ICMP_SLT;
-      const SCEV *NewLHS = VSxA;
-      const SCEV *NewRHS = CxVS;
+      SCEVUse NewLHS = VSxA;
+      SCEVUse NewRHS = CxVS;
       EXPECT_TRUE(SE.SimplifyICmpOperands(NewPred, NewLHS, NewRHS));
       EXPECT_EQ(NewPred, ICmpInst::ICMP_SLT);
       EXPECT_EQ(NewLHS, A);
@@ -1846,15 +1846,15 @@ TEST_F(ScalarEvolutionsTest, SimplifyICmpOperands) {
 
     {
       CmpPredicate NewPred = ICmpInst::ICMP_SLT;
-      const SCEV *NewLHS = VSxA;
-      const SCEV *NewRHS = VSxB;
+      SCEVUse NewLHS = VSxA;
+      SCEVUse NewRHS = VSxB;
       EXPECT_FALSE(SE.SimplifyICmpOperands(NewPred, NewLHS, NewRHS));
     }
 
     {
       CmpPredicate NewPred = ICmpInst::ICMP_ULT;
-      const SCEV *NewLHS = VSxA;
-      const SCEV *NewRHS = VSxB;
+      SCEVUse NewLHS = VSxA;
+      SCEVUse NewRHS = VSxB;
       EXPECT_TRUE(SE.SimplifyICmpOperands(NewPred, NewLHS, NewRHS));
       EXPECT_EQ(NewPred, ICmpInst::ICMP_ULT);
       EXPECT_EQ(NewLHS, A);
@@ -1863,8 +1863,8 @@ TEST_F(ScalarEvolutionsTest, SimplifyICmpOperands) {
 
     {
       CmpPredicate NewPred = ICmpInst::ICMP_EQ;
-      const SCEV *NewLHS = VSxA;
-      const SCEV *NewRHS = VSxB;
+      SCEVUse NewLHS = VSxA;
+      SCEVUse NewRHS = VSxB;
       EXPECT_TRUE(SE.SimplifyICmpOperands(NewPred, NewLHS, NewRHS));
       EXPECT_EQ(NewPred, ICmpInst::ICMP_EQ);
       EXPECT_EQ(NewLHS, A);
@@ -1882,22 +1882,22 @@ TEST_F(ScalarEvolutionsTest, SimplifyICmpOperands) {
 
     {
       CmpPredicate NewPred = ICmpInst::ICMP_SLT;
-      const SCEV *NewLHS = VSxA;
-      const SCEV *NewRHS = VSxB;
+      SCEVUse NewLHS = VSxA;
+      SCEVUse NewRHS = VSxB;
       EXPECT_FALSE(SE.SimplifyICmpOperands(NewPred, NewLHS, NewRHS));
     }
 
     {
       CmpPredicate NewPred = ICmpInst::ICMP_ULT;
-      const SCEV *NewLHS = VSxA;
-      const SCEV *NewRHS = VSxB;
+      SCEVUse NewLHS = VSxA;
+      SCEVUse NewRHS = VSxB;
       EXPECT_FALSE(SE.SimplifyICmpOperands(NewPred, NewLHS, NewRHS));
     }
 
     {
       CmpPredicate NewPred = ICmpInst::ICMP_EQ;
-      const SCEV *NewLHS = VSxA;
-      const SCEV *NewRHS = VSxB;
+      SCEVUse NewLHS = VSxA;
+      SCEVUse NewRHS = VSxB;
       EXPECT_FALSE(SE.SimplifyICmpOperands(NewPred, NewLHS, NewRHS));
     }
   });



More information about the llvm-commits mailing list