summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
diff options
context:
space:
mode:
authorSerguei Katkov <serguei.katkov@azul.com>2018-01-22 07:47:02 +0000
committerSerguei Katkov <serguei.katkov@azul.com>2018-01-22 07:47:02 +0000
commitf38041dc3e51d1dd437b5fae852c27ffcc68c800 (patch)
tree409fe2180602087c39fb54769bc9d0d0c0cd5599 /llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
parent56939f7e75a753e47c34007648d39d27564cbed0 (diff)
downloadbcm5719-llvm-f38041dc3e51d1dd437b5fae852c27ffcc68c800.tar.gz
bcm5719-llvm-f38041dc3e51d1dd437b5fae852c27ffcc68c800.zip
Revert [SCEV] Fix isLoopEntryGuardedByCond usage
It causes buildbot failures. New added assert is fired. It seems not all usages of isLoopEntryGuardedByCond are fixed. llvm-svn: 323079
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp b/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
index 1af77d84f85..c8e58a1e93a 100644
--- a/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
@@ -934,9 +934,9 @@ LoopStructure::parseLoopStructure(ScalarEvolution &SE,
return None;
}
- if (!SE.isAvailableAtLoopEntry(RightSCEV, &L) ||
- !SE.isLoopEntryGuardedByCond(&L, BoundPred, IndVarStart,
- SE.getAddExpr(RightSCEV, Step))) {
+ if (!SE.isLoopEntryGuardedByCond(
+ &L, BoundPred, IndVarStart,
+ SE.getAddExpr(RightSCEV, Step))) {
FailureReason = "Induction variable start not bounded by upper limit";
return None;
}
@@ -948,8 +948,7 @@ LoopStructure::parseLoopStructure(ScalarEvolution &SE,
RightValue = B.CreateAdd(RightValue, One);
}
} else {
- if (!SE.isAvailableAtLoopEntry(RightSCEV, &L) ||
- !SE.isLoopEntryGuardedByCond(&L, BoundPred, IndVarStart, RightSCEV)) {
+ if (!SE.isLoopEntryGuardedByCond(&L, BoundPred, IndVarStart, RightSCEV)) {
FailureReason = "Induction variable start not bounded by upper limit";
return None;
}
@@ -1015,10 +1014,9 @@ LoopStructure::parseLoopStructure(ScalarEvolution &SE,
return None;
}
- if (!SE.isAvailableAtLoopEntry(RightSCEV, &L) ||
- !SE.isLoopEntryGuardedByCond(
- &L, BoundPred, IndVarStart,
- SE.getMinusSCEV(RightSCEV, SE.getOne(RightSCEV->getType())))) {
+ if (!SE.isLoopEntryGuardedByCond(
+ &L, BoundPred, IndVarStart,
+ SE.getMinusSCEV(RightSCEV, SE.getOne(RightSCEV->getType())))) {
FailureReason = "Induction variable start not bounded by lower limit";
return None;
}
@@ -1030,8 +1028,7 @@ LoopStructure::parseLoopStructure(ScalarEvolution &SE,
RightValue = B.CreateSub(RightValue, One);
}
} else {
- if (!SE.isAvailableAtLoopEntry(RightSCEV, &L) ||
- !SE.isLoopEntryGuardedByCond(&L, BoundPred, IndVarStart, RightSCEV)) {
+ if (!SE.isLoopEntryGuardedByCond(&L, BoundPred, IndVarStart, RightSCEV)) {
FailureReason = "Induction variable start not bounded by lower limit";
return None;
}
OpenPOWER on IntegriCloud