summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-04-22 09:01:38 +0000
committerNikita Popov <nikita.ppv@gmail.com>2019-04-22 09:01:38 +0000
commit5aacc7a573111cddbb0275642c023f026af300bc (patch)
treebcad06c507c490a4391064d6af2c5191a4e2adda /llvm/lib/Analysis
parent5299e25f502131483c4555efa641b93bad81a893 (diff)
downloadbcm5719-llvm-5aacc7a573111cddbb0275642c023f026af300bc.tar.gz
bcm5719-llvm-5aacc7a573111cddbb0275642c023f026af300bc.zip
Revert "[ConstantRange] Rename make{Guaranteed -> Exact}NoWrapRegion() NFC"
This reverts commit 7bf4d7c07f2fac862ef34c82ad0fef6513452445. After thinking about this more, this isn't right, the range is not exact in the same sense as makeExactICmpRegion(). This needs a separate function. llvm-svn: 358876
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/LazyValueInfo.cpp2
-rw-r--r--llvm/lib/Analysis/ScalarEvolution.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Analysis/LazyValueInfo.cpp b/llvm/lib/Analysis/LazyValueInfo.cpp
index 260a2a6ebe0..02a829f500b 100644
--- a/llvm/lib/Analysis/LazyValueInfo.cpp
+++ b/llvm/lib/Analysis/LazyValueInfo.cpp
@@ -1146,7 +1146,7 @@ static ValueLatticeElement getValueFromOverflowCondition(
return ValueLatticeElement::getOverdefined();
// Calculate the possible values of %x for which no overflow occurs.
- ConstantRange NWR = ConstantRange::makeExactNoWrapRegion(
+ ConstantRange NWR = ConstantRange::makeGuaranteedNoWrapRegion(
WO->getBinaryOp(), ConstantRange(*C), WO->getNoWrapKind());
// If overflow is false, %x is constrained to NWR. If overflow is true, %x is
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index 1a6fc95b74c..1f69bc8f22e 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -2363,7 +2363,7 @@ StrengthenNoWrapFlags(ScalarEvolution *SE, SCEVTypes Type,
// (A <opcode> C) --> (A <opcode> C)<nsw> if the op doesn't sign overflow.
if (!(SignOrUnsignWrap & SCEV::FlagNSW)) {
- auto NSWRegion = ConstantRange::makeExactNoWrapRegion(
+ auto NSWRegion = ConstantRange::makeGuaranteedNoWrapRegion(
Opcode, C, OBO::NoSignedWrap);
if (NSWRegion.contains(SE->getSignedRange(Ops[1])))
Flags = ScalarEvolution::setFlags(Flags, SCEV::FlagNSW);
@@ -2371,7 +2371,7 @@ StrengthenNoWrapFlags(ScalarEvolution *SE, SCEVTypes Type,
// (A <opcode> C) --> (A <opcode> C)<nuw> if the op doesn't unsign overflow.
if (!(SignOrUnsignWrap & SCEV::FlagNUW)) {
- auto NUWRegion = ConstantRange::makeExactNoWrapRegion(
+ auto NUWRegion = ConstantRange::makeGuaranteedNoWrapRegion(
Opcode, C, OBO::NoUnsignedWrap);
if (NUWRegion.contains(SE->getUnsignedRange(Ops[1])))
Flags = ScalarEvolution::setFlags(Flags, SCEV::FlagNUW);
@@ -4471,7 +4471,7 @@ ScalarEvolution::proveNoWrapViaConstantRanges(const SCEVAddRecExpr *AR) {
ConstantRange AddRecRange = getSignedRange(AR);
ConstantRange IncRange = getSignedRange(AR->getStepRecurrence(*this));
- auto NSWRegion = ConstantRange::makeExactNoWrapRegion(
+ auto NSWRegion = ConstantRange::makeGuaranteedNoWrapRegion(
Instruction::Add, IncRange, OBO::NoSignedWrap);
if (NSWRegion.contains(AddRecRange))
Result = ScalarEvolution::setFlags(Result, SCEV::FlagNSW);
@@ -4481,7 +4481,7 @@ ScalarEvolution::proveNoWrapViaConstantRanges(const SCEVAddRecExpr *AR) {
ConstantRange AddRecRange = getUnsignedRange(AR);
ConstantRange IncRange = getUnsignedRange(AR->getStepRecurrence(*this));
- auto NUWRegion = ConstantRange::makeExactNoWrapRegion(
+ auto NUWRegion = ConstantRange::makeGuaranteedNoWrapRegion(
Instruction::Add, IncRange, OBO::NoUnsignedWrap);
if (NUWRegion.contains(AddRecRange))
Result = ScalarEvolution::setFlags(Result, SCEV::FlagNUW);
OpenPOWER on IntegriCloud