[llvm] r358875 - [ConstantRange] Rename make{Guaranteed -> Exact}NoWrapRegion() NFC

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 22 01:36:05 PDT 2019


Author: nikic
Date: Mon Apr 22 01:36:05 2019
New Revision: 358875

URL: http://llvm.org/viewvc/llvm-project?rev=358875&view=rev
Log:
[ConstantRange] Rename make{Guaranteed -> Exact}NoWrapRegion() NFC

Following D60632 makeGuaranteedNoWrapRegion() always returns an
exact nowrap region. Rename the function accordingly. This is in
line with the naming of makeExactICmpRegion().

Modified:
    llvm/trunk/include/llvm/IR/ConstantRange.h
    llvm/trunk/lib/Analysis/LazyValueInfo.cpp
    llvm/trunk/lib/Analysis/ScalarEvolution.cpp
    llvm/trunk/lib/IR/ConstantRange.cpp
    llvm/trunk/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
    llvm/trunk/unittests/IR/ConstantRangeTest.cpp

Modified: llvm/trunk/include/llvm/IR/ConstantRange.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/ConstantRange.h?rev=358875&r1=358874&r2=358875&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/ConstantRange.h (original)
+++ llvm/trunk/include/llvm/IR/ConstantRange.h Mon Apr 22 01:36:05 2019
@@ -131,16 +131,16 @@ public:
   ///
   /// Examples:
   ///  typedef OverflowingBinaryOperator OBO;
-  ///  #define MGNR makeGuaranteedNoWrapRegion
-  ///  MGNR(Add, [i8 1, 2), OBO::NoSignedWrap) == [-128, 127)
-  ///  MGNR(Add, [i8 1, 2), OBO::NoUnsignedWrap) == [0, -1)
-  ///  MGNR(Add, [i8 0, 1), OBO::NoUnsignedWrap) == Full Set
-  ///  MGNR(Add, [i8 -1, 6), OBO::NoSignedWrap) == [INT_MIN+1, INT_MAX-4)
-  ///  MGNR(Sub, [i8 1, 2), OBO::NoSignedWrap) == [-127, 128)
-  ///  MGNR(Sub, [i8 1, 2), OBO::NoUnsignedWrap) == [1, 0)
-  static ConstantRange makeGuaranteedNoWrapRegion(Instruction::BinaryOps BinOp,
-                                                  const ConstantRange &Other,
-                                                  unsigned NoWrapKind);
+  ///  #define MENR makeExactNoWrapRegion
+  ///  MENR(Add, [i8 1, 2), OBO::NoSignedWrap) == [-128, 127)
+  ///  MENR(Add, [i8 1, 2), OBO::NoUnsignedWrap) == [0, -1)
+  ///  MENR(Add, [i8 0, 1), OBO::NoUnsignedWrap) == Full Set
+  ///  MENR(Add, [i8 -1, 6), OBO::NoSignedWrap) == [INT_MIN+1, INT_MAX-4)
+  ///  MENR(Sub, [i8 1, 2), OBO::NoSignedWrap) == [-127, 128)
+  ///  MENR(Sub, [i8 1, 2), OBO::NoUnsignedWrap) == [1, 0)
+  static ConstantRange makeExactNoWrapRegion(Instruction::BinaryOps BinOp,
+                                             const ConstantRange &Other,
+                                             unsigned NoWrapKind);
 
   /// Set up \p Pred and \p RHS such that
   /// ConstantRange::makeExactICmpRegion(Pred, RHS) == *this.  Return true if

Modified: llvm/trunk/lib/Analysis/LazyValueInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LazyValueInfo.cpp?rev=358875&r1=358874&r2=358875&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/LazyValueInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/LazyValueInfo.cpp Mon Apr 22 01:36:05 2019
@@ -1146,7 +1146,7 @@ static ValueLatticeElement getValueFromO
     return ValueLatticeElement::getOverdefined();
 
   // Calculate the possible values of %x for which no overflow occurs.
-  ConstantRange NWR = ConstantRange::makeGuaranteedNoWrapRegion(
+  ConstantRange NWR = ConstantRange::makeExactNoWrapRegion(
       WO->getBinaryOp(), ConstantRange(*C), WO->getNoWrapKind());
 
   // If overflow is false, %x is constrained to NWR. If overflow is true, %x is

Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=358875&r1=358874&r2=358875&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Mon Apr 22 01:36:05 2019
@@ -2363,7 +2363,7 @@ StrengthenNoWrapFlags(ScalarEvolution *S
 
     // (A <opcode> C) --> (A <opcode> C)<nsw> if the op doesn't sign overflow.
     if (!(SignOrUnsignWrap & SCEV::FlagNSW)) {
-      auto NSWRegion = ConstantRange::makeGuaranteedNoWrapRegion(
+      auto NSWRegion = ConstantRange::makeExactNoWrapRegion(
           Opcode, C, OBO::NoSignedWrap);
       if (NSWRegion.contains(SE->getSignedRange(Ops[1])))
         Flags = ScalarEvolution::setFlags(Flags, SCEV::FlagNSW);
@@ -2371,7 +2371,7 @@ StrengthenNoWrapFlags(ScalarEvolution *S
 
     // (A <opcode> C) --> (A <opcode> C)<nuw> if the op doesn't unsign overflow.
     if (!(SignOrUnsignWrap & SCEV::FlagNUW)) {
-      auto NUWRegion = ConstantRange::makeGuaranteedNoWrapRegion(
+      auto NUWRegion = ConstantRange::makeExactNoWrapRegion(
           Opcode, C, OBO::NoUnsignedWrap);
       if (NUWRegion.contains(SE->getUnsignedRange(Ops[1])))
         Flags = ScalarEvolution::setFlags(Flags, SCEV::FlagNUW);
@@ -4471,7 +4471,7 @@ ScalarEvolution::proveNoWrapViaConstantR
     ConstantRange AddRecRange = getSignedRange(AR);
     ConstantRange IncRange = getSignedRange(AR->getStepRecurrence(*this));
 
-    auto NSWRegion = ConstantRange::makeGuaranteedNoWrapRegion(
+    auto NSWRegion = ConstantRange::makeExactNoWrapRegion(
         Instruction::Add, IncRange, OBO::NoSignedWrap);
     if (NSWRegion.contains(AddRecRange))
       Result = ScalarEvolution::setFlags(Result, SCEV::FlagNSW);
@@ -4481,7 +4481,7 @@ ScalarEvolution::proveNoWrapViaConstantR
     ConstantRange AddRecRange = getUnsignedRange(AR);
     ConstantRange IncRange = getUnsignedRange(AR->getStepRecurrence(*this));
 
-    auto NUWRegion = ConstantRange::makeGuaranteedNoWrapRegion(
+    auto NUWRegion = ConstantRange::makeExactNoWrapRegion(
         Instruction::Add, IncRange, OBO::NoUnsignedWrap);
     if (NUWRegion.contains(AddRecRange))
       Result = ScalarEvolution::setFlags(Result, SCEV::FlagNUW);

Modified: llvm/trunk/lib/IR/ConstantRange.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/ConstantRange.cpp?rev=358875&r1=358874&r2=358875&view=diff
==============================================================================
--- llvm/trunk/lib/IR/ConstantRange.cpp (original)
+++ llvm/trunk/lib/IR/ConstantRange.cpp Mon Apr 22 01:36:05 2019
@@ -181,9 +181,9 @@ bool ConstantRange::getEquivalentICmp(Cm
 }
 
 ConstantRange
-ConstantRange::makeGuaranteedNoWrapRegion(Instruction::BinaryOps BinOp,
-                                          const ConstantRange &Other,
-                                          unsigned NoWrapKind) {
+ConstantRange::makeExactNoWrapRegion(Instruction::BinaryOps BinOp,
+                                     const ConstantRange &Other,
+                                     unsigned NoWrapKind) {
   using OBO = OverflowingBinaryOperator;
 
   // Computes the intersection of CR0 and CR1.  It is different from
@@ -262,7 +262,7 @@ ConstantRange::makeGuaranteedNoWrapRegio
     return Result;
 
   case Instruction::Mul: {
-    // Equivalent to calling makeGuaranteedNoWrapRegion() on [V, V+1).
+    // Equivalent to calling makeExactNoWrapRegion() on [V, V+1).
     const bool Unsigned = NoWrapKind == OBO::NoUnsignedWrap;
     const auto makeSingleValueRegion = [Unsigned,
                                         BitWidth](APInt V) -> ConstantRange {
@@ -841,10 +841,9 @@ ConstantRange::add(const ConstantRange &
 ConstantRange ConstantRange::addWithNoSignedWrap(const APInt &Other) const {
   // Calculate the subset of this range such that "X + Other" is
   // guaranteed not to wrap (overflow) for all X in this subset.
-  // makeGuaranteedNoWrapRegion will produce an exact NSW range.
-  auto NSWRange = ConstantRange::makeGuaranteedNoWrapRegion(BinaryOperator::Add,
-                                      ConstantRange(Other),
-                                      OverflowingBinaryOperator::NoSignedWrap);
+  auto NSWRange = ConstantRange::makeExactNoWrapRegion(
+      BinaryOperator::Add, ConstantRange(Other),
+      OverflowingBinaryOperator::NoSignedWrap);
   auto NSWConstrainedRange = intersectWith(NSWRange);
 
   return NSWConstrainedRange.add(ConstantRange(Other));

Modified: llvm/trunk/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp?rev=358875&r1=358874&r2=358875&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp Mon Apr 22 01:36:05 2019
@@ -402,7 +402,7 @@ static bool processSwitch(SwitchInst *SI
 static bool willNotOverflow(WithOverflowInst *WO, LazyValueInfo *LVI) {
   Value *RHS = WO->getRHS();
   ConstantRange RRange = LVI->getConstantRange(RHS, WO->getParent(), WO);
-  ConstantRange NWRegion = ConstantRange::makeGuaranteedNoWrapRegion(
+  ConstantRange NWRegion = ConstantRange::makeExactNoWrapRegion(
       WO->getBinaryOp(), RRange, WO->getNoWrapKind());
   // As an optimization, do not compute LRange if we do not need it.
   if (NWRegion.isEmptySet())
@@ -640,7 +640,7 @@ static bool processBinOp(BinaryOperator
 
   bool Changed = false;
   if (!NUW) {
-    ConstantRange NUWRange = ConstantRange::makeGuaranteedNoWrapRegion(
+    ConstantRange NUWRange = ConstantRange::makeExactNoWrapRegion(
         BinOp->getOpcode(), RRange, OBO::NoUnsignedWrap);
     if (!NUWRange.isEmptySet()) {
       bool NewNUW = NUWRange.contains(LazyLRange());
@@ -649,7 +649,7 @@ static bool processBinOp(BinaryOperator
     }
   }
   if (!NSW) {
-    ConstantRange NSWRange = ConstantRange::makeGuaranteedNoWrapRegion(
+    ConstantRange NSWRange = ConstantRange::makeExactNoWrapRegion(
         BinOp->getOpcode(), RRange, OBO::NoSignedWrap);
     if (!NSWRange.isEmptySet()) {
       bool NewNSW = NSWRange.contains(LazyLRange());

Modified: llvm/trunk/unittests/IR/ConstantRangeTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/IR/ConstantRangeTest.cpp?rev=358875&r1=358874&r2=358875&view=diff
==============================================================================
--- llvm/trunk/unittests/IR/ConstantRangeTest.cpp (original)
+++ llvm/trunk/unittests/IR/ConstantRangeTest.cpp Mon Apr 22 01:36:05 2019
@@ -891,7 +891,7 @@ TEST(ConstantRange, MakeSatisfyingICmpRe
       ConstantRange(APInt(8, 4), APInt(8, -128)));
 }
 
-TEST(ConstantRange, MakeGuaranteedNoWrapRegion) {
+TEST(ConstantRange, MakeExactNoWrapRegion) {
   const int IntMin4Bits = 8;
   const int IntMax4Bits = 7;
   typedef OverflowingBinaryOperator OBO;
@@ -899,12 +899,12 @@ TEST(ConstantRange, MakeGuaranteedNoWrap
   for (int Const : {0, -1, -2, 1, 2, IntMin4Bits, IntMax4Bits}) {
     APInt C(4, Const, true /* = isSigned */);
 
-    auto NUWRegion = ConstantRange::makeGuaranteedNoWrapRegion(
+    auto NUWRegion = ConstantRange::makeExactNoWrapRegion(
         Instruction::Add, C, OBO::NoUnsignedWrap);
 
     EXPECT_FALSE(NUWRegion.isEmptySet());
 
-    auto NSWRegion = ConstantRange::makeGuaranteedNoWrapRegion(
+    auto NSWRegion = ConstantRange::makeExactNoWrapRegion(
         Instruction::Add, C, OBO::NoSignedWrap);
 
     EXPECT_FALSE(NSWRegion.isEmptySet());
@@ -927,12 +927,12 @@ TEST(ConstantRange, MakeGuaranteedNoWrap
   for (int Const : {0, -1, -2, 1, 2, IntMin4Bits, IntMax4Bits}) {
     APInt C(4, Const, true /* = isSigned */);
 
-    auto NUWRegion = ConstantRange::makeGuaranteedNoWrapRegion(
+    auto NUWRegion = ConstantRange::makeExactNoWrapRegion(
         Instruction::Sub, C, OBO::NoUnsignedWrap);
 
     EXPECT_FALSE(NUWRegion.isEmptySet());
 
-    auto NSWRegion = ConstantRange::makeGuaranteedNoWrapRegion(
+    auto NSWRegion = ConstantRange::makeExactNoWrapRegion(
         Instruction::Sub, C, OBO::NoSignedWrap);
 
     EXPECT_FALSE(NSWRegion.isEmptySet());
@@ -952,102 +952,102 @@ TEST(ConstantRange, MakeGuaranteedNoWrap
     }
   }
 
-  auto NSWForAllValues = ConstantRange::makeGuaranteedNoWrapRegion(
+  auto NSWForAllValues = ConstantRange::makeExactNoWrapRegion(
       Instruction::Add, ConstantRange(32, /* isFullSet = */ true),
       OBO::NoSignedWrap);
   EXPECT_TRUE(NSWForAllValues.isSingleElement() &&
               NSWForAllValues.getSingleElement()->isMinValue());
 
-  NSWForAllValues = ConstantRange::makeGuaranteedNoWrapRegion(
+  NSWForAllValues = ConstantRange::makeExactNoWrapRegion(
       Instruction::Sub, ConstantRange(32, /* isFullSet = */ true),
       OBO::NoSignedWrap);
   EXPECT_TRUE(NSWForAllValues.isSingleElement() &&
               NSWForAllValues.getSingleElement()->isMaxValue());
 
-  auto NUWForAllValues = ConstantRange::makeGuaranteedNoWrapRegion(
+  auto NUWForAllValues = ConstantRange::makeExactNoWrapRegion(
       Instruction::Add, ConstantRange(32, /* isFullSet = */ true),
       OBO::NoUnsignedWrap);
   EXPECT_TRUE(NUWForAllValues.isSingleElement() &&
               NUWForAllValues.getSingleElement()->isMinValue());
 
-  NUWForAllValues = ConstantRange::makeGuaranteedNoWrapRegion(
+  NUWForAllValues = ConstantRange::makeExactNoWrapRegion(
       Instruction::Sub, ConstantRange(32, /* isFullSet = */ true),
       OBO::NoUnsignedWrap);
   EXPECT_TRUE(NUWForAllValues.isSingleElement() &&
               NUWForAllValues.getSingleElement()->isMaxValue());
 
-  EXPECT_TRUE(ConstantRange::makeGuaranteedNoWrapRegion(
+  EXPECT_TRUE(ConstantRange::makeExactNoWrapRegion(
       Instruction::Add, APInt(32, 0), OBO::NoUnsignedWrap).isFullSet());
-  EXPECT_TRUE(ConstantRange::makeGuaranteedNoWrapRegion(
+  EXPECT_TRUE(ConstantRange::makeExactNoWrapRegion(
       Instruction::Add, APInt(32, 0), OBO::NoSignedWrap).isFullSet());
-  EXPECT_TRUE(ConstantRange::makeGuaranteedNoWrapRegion(
+  EXPECT_TRUE(ConstantRange::makeExactNoWrapRegion(
       Instruction::Sub, APInt(32, 0), OBO::NoUnsignedWrap).isFullSet());
-  EXPECT_TRUE(ConstantRange::makeGuaranteedNoWrapRegion(
+  EXPECT_TRUE(ConstantRange::makeExactNoWrapRegion(
       Instruction::Sub, APInt(32, 0), OBO::NoSignedWrap).isFullSet());
 
   ConstantRange OneToFive(APInt(32, 1), APInt(32, 6));
-  EXPECT_EQ(ConstantRange::makeGuaranteedNoWrapRegion(
+  EXPECT_EQ(ConstantRange::makeExactNoWrapRegion(
                 Instruction::Add, OneToFive, OBO::NoSignedWrap),
             ConstantRange(APInt::getSignedMinValue(32),
                           APInt::getSignedMaxValue(32) - 4));
-  EXPECT_EQ(ConstantRange::makeGuaranteedNoWrapRegion(
+  EXPECT_EQ(ConstantRange::makeExactNoWrapRegion(
                 Instruction::Add, OneToFive, OBO::NoUnsignedWrap),
             ConstantRange(APInt::getMinValue(32), APInt::getMinValue(32) - 5));
-  EXPECT_EQ(ConstantRange::makeGuaranteedNoWrapRegion(
+  EXPECT_EQ(ConstantRange::makeExactNoWrapRegion(
                 Instruction::Sub, OneToFive, OBO::NoSignedWrap),
             ConstantRange(APInt::getSignedMinValue(32) + 5,
                           APInt::getSignedMinValue(32)));
-  EXPECT_EQ(ConstantRange::makeGuaranteedNoWrapRegion(
+  EXPECT_EQ(ConstantRange::makeExactNoWrapRegion(
                 Instruction::Sub, OneToFive, OBO::NoUnsignedWrap),
             ConstantRange(APInt::getMinValue(32) + 5, APInt::getMinValue(32)));
 
   ConstantRange MinusFiveToMinusTwo(APInt(32, -5), APInt(32, -1));
-  EXPECT_EQ(ConstantRange::makeGuaranteedNoWrapRegion(
+  EXPECT_EQ(ConstantRange::makeExactNoWrapRegion(
                 Instruction::Add, MinusFiveToMinusTwo, OBO::NoSignedWrap),
             ConstantRange(APInt::getSignedMinValue(32) + 5,
                           APInt::getSignedMinValue(32)));
-  EXPECT_EQ(ConstantRange::makeGuaranteedNoWrapRegion(
+  EXPECT_EQ(ConstantRange::makeExactNoWrapRegion(
                 Instruction::Add, MinusFiveToMinusTwo, OBO::NoUnsignedWrap),
             ConstantRange(APInt(32, 0), APInt(32, 2)));
-  EXPECT_EQ(ConstantRange::makeGuaranteedNoWrapRegion(
+  EXPECT_EQ(ConstantRange::makeExactNoWrapRegion(
                 Instruction::Sub, MinusFiveToMinusTwo, OBO::NoSignedWrap),
             ConstantRange(APInt::getSignedMinValue(32),
                           APInt::getSignedMaxValue(32) - 4));
-  EXPECT_EQ(ConstantRange::makeGuaranteedNoWrapRegion(
+  EXPECT_EQ(ConstantRange::makeExactNoWrapRegion(
                 Instruction::Sub, MinusFiveToMinusTwo, OBO::NoUnsignedWrap),
             ConstantRange(APInt::getMaxValue(32) - 1,
                           APInt::getMinValue(32)));
 
   ConstantRange MinusOneToOne(APInt(32, -1), APInt(32, 2));
-  EXPECT_EQ(ConstantRange::makeGuaranteedNoWrapRegion(
+  EXPECT_EQ(ConstantRange::makeExactNoWrapRegion(
                 Instruction::Add, MinusOneToOne, OBO::NoSignedWrap),
             ConstantRange(APInt::getSignedMinValue(32) + 1,
                           APInt::getSignedMinValue(32) - 1));
-  EXPECT_EQ(ConstantRange::makeGuaranteedNoWrapRegion(
+  EXPECT_EQ(ConstantRange::makeExactNoWrapRegion(
                 Instruction::Add, MinusOneToOne, OBO::NoUnsignedWrap),
             ConstantRange(APInt(32, 0), APInt(32, 1)));
-  EXPECT_EQ(ConstantRange::makeGuaranteedNoWrapRegion(
+  EXPECT_EQ(ConstantRange::makeExactNoWrapRegion(
                 Instruction::Sub, MinusOneToOne, OBO::NoSignedWrap),
             ConstantRange(APInt::getSignedMinValue(32) + 1,
                           APInt::getSignedMinValue(32) - 1));
-  EXPECT_EQ(ConstantRange::makeGuaranteedNoWrapRegion(
+  EXPECT_EQ(ConstantRange::makeExactNoWrapRegion(
                 Instruction::Sub, MinusOneToOne, OBO::NoUnsignedWrap),
             ConstantRange(APInt::getMaxValue(32),
                           APInt::getMinValue(32)));
 
   ConstantRange One(APInt(32, 1), APInt(32, 2));
-  EXPECT_EQ(ConstantRange::makeGuaranteedNoWrapRegion(
+  EXPECT_EQ(ConstantRange::makeExactNoWrapRegion(
                 Instruction::Add, One, OBO::NoSignedWrap),
             ConstantRange(APInt::getSignedMinValue(32),
                           APInt::getSignedMaxValue(32)));
-  EXPECT_EQ(ConstantRange::makeGuaranteedNoWrapRegion(
+  EXPECT_EQ(ConstantRange::makeExactNoWrapRegion(
                 Instruction::Add, One, OBO::NoUnsignedWrap),
             ConstantRange(APInt::getMinValue(32), APInt::getMaxValue(32)));
-  EXPECT_EQ(ConstantRange::makeGuaranteedNoWrapRegion(
+  EXPECT_EQ(ConstantRange::makeExactNoWrapRegion(
                 Instruction::Sub, One, OBO::NoSignedWrap),
             ConstantRange(APInt::getSignedMinValue(32) + 1,
                           APInt::getSignedMinValue(32)));
-  EXPECT_EQ(ConstantRange::makeGuaranteedNoWrapRegion(
+  EXPECT_EQ(ConstantRange::makeExactNoWrapRegion(
                 Instruction::Sub, One, OBO::NoUnsignedWrap),
             ConstantRange(APInt::getMinValue(32) + 1, APInt::getMinValue(32)));
 }
@@ -1063,7 +1063,7 @@ void TestNoWrapRegionExhaustive(Instruct
           return;
 
         ConstantRange NoWrap =
-            ConstantRange::makeGuaranteedNoWrapRegion(BinOp, CR2, NoWrapKind);
+            ConstantRange::makeExactNoWrapRegion(BinOp, CR2, NoWrapKind);
         ForeachNumInConstantRange(CR1, [&](const APInt &N1) {
           bool NoOverflow = true;
           ForeachNumInConstantRange(CR2, [&](const APInt &N2) {
@@ -1075,7 +1075,7 @@ void TestNoWrapRegionExhaustive(Instruct
       });
 }
 
-// Show that makeGuaranteedNoWrapRegion is precise if only one of
+// Show that makeExactNoWrapRegion is precise if only one of
 // NoUnsignedWrap or NoSignedWrap is used.
 TEST(ConstantRange, NoWrapRegionExhaustive) {
   TestNoWrapRegionExhaustive(
@@ -1204,12 +1204,12 @@ TEST(ConstantRange, GetEquivalentICmp) {
   EXPECT_EQ(RHS, APInt(32, -1));
 }
 
-TEST(ConstantRange, MakeGuaranteedNoWrapRegionMulUnsignedSingleValue) {
+TEST(ConstantRange, MakeExactNoWrapRegionMulUnsignedSingleValue) {
   typedef OverflowingBinaryOperator OBO;
 
   for (uint64_t I = std::numeric_limits<uint8_t>::min();
        I <= std::numeric_limits<uint8_t>::max(); I++) {
-    auto Range = ConstantRange::makeGuaranteedNoWrapRegion(
+    auto Range = ConstantRange::makeExactNoWrapRegion(
         Instruction::Mul, ConstantRange(APInt(8, I), APInt(8, I + 1)),
         OBO::NoUnsignedWrap);
 
@@ -1222,12 +1222,12 @@ TEST(ConstantRange, MakeGuaranteedNoWrap
   }
 }
 
-TEST(ConstantRange, MakeGuaranteedNoWrapRegionMulSignedSingleValue) {
+TEST(ConstantRange, MakeExactNoWrapRegionMulSignedSingleValue) {
   typedef OverflowingBinaryOperator OBO;
 
   for (int64_t I = std::numeric_limits<int8_t>::min();
        I <= std::numeric_limits<int8_t>::max(); I++) {
-    auto Range = ConstantRange::makeGuaranteedNoWrapRegion(
+    auto Range = ConstantRange::makeExactNoWrapRegion(
         Instruction::Mul,
         ConstantRange(APInt(8, I, /*isSigned=*/true),
                       APInt(8, I + 1, /*isSigned=*/true)),
@@ -1243,28 +1243,28 @@ TEST(ConstantRange, MakeGuaranteedNoWrap
   }
 }
 
-TEST(ConstantRange, MakeGuaranteedNoWrapRegionMulUnsignedRange) {
+TEST(ConstantRange, MakeExactNoWrapRegionMulUnsignedRange) {
   typedef OverflowingBinaryOperator OBO;
 
   for (uint64_t Lo = std::numeric_limits<uint8_t>::min();
        Lo <= std::numeric_limits<uint8_t>::max(); Lo++) {
     for (uint64_t Hi = Lo; Hi <= std::numeric_limits<uint8_t>::max(); Hi++) {
       EXPECT_EQ(
-          ConstantRange::makeGuaranteedNoWrapRegion(
+          ConstantRange::makeExactNoWrapRegion(
               Instruction::Mul, ConstantRange(APInt(8, Lo), APInt(8, Hi + 1)),
               OBO::NoUnsignedWrap),
-          ConstantRange::makeGuaranteedNoWrapRegion(
+          ConstantRange::makeExactNoWrapRegion(
               Instruction::Mul, ConstantRange(APInt(8, Hi), APInt(8, Hi + 1)),
               OBO::NoUnsignedWrap));
     }
   }
 }
 
-TEST(ConstantRange, MakeGuaranteedNoWrapRegionMulSignedRange) {
+TEST(ConstantRange, MakeExactNoWrapRegionMulSignedRange) {
   typedef OverflowingBinaryOperator OBO;
 
   int Lo = -12, Hi = 16;
-  auto Range = ConstantRange::makeGuaranteedNoWrapRegion(
+  auto Range = ConstantRange::makeExactNoWrapRegion(
       Instruction::Mul,
       ConstantRange(APInt(8, Lo, /*isSigned=*/true),
                     APInt(8, Hi + 1, /*isSigned=*/true)),




More information about the llvm-commits mailing list