summaryrefslogtreecommitdiffstats
path: root/polly/lib/Analysis/TempScopInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'polly/lib/Analysis/TempScopInfo.cpp')
-rw-r--r--polly/lib/Analysis/TempScopInfo.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/polly/lib/Analysis/TempScopInfo.cpp b/polly/lib/Analysis/TempScopInfo.cpp
index 5aa8d9669e9..066f06811a4 100644
--- a/polly/lib/Analysis/TempScopInfo.cpp
+++ b/polly/lib/Analysis/TempScopInfo.cpp
@@ -230,13 +230,12 @@ void TempScopInfo::buildLoopBounds(TempScop &Scop) {
void TempScopInfo::buildAffineCondition(Value &V, bool inverted,
Comparison **Comp) const {
if (ConstantInt *C = dyn_cast<ConstantInt>(&V)) {
- // If this is always true condition, we will create 1 >= 0,
- // otherwise we will create 1 == 0.
+ // If this is always true condition, we will create 0 == 0,
+ // otherwise we will create 0 != 0.
const SCEV *LHS = SE->getConstant(C->getType(), 0);
- const SCEV *RHS = SE->getConstant(C->getType(), 1);
if (C->isOne() == inverted)
- *Comp = new Comparison(RHS, LHS, ICmpInst::ICMP_NE);
+ *Comp = new Comparison(LHS, LHS, ICmpInst::ICMP_NE);
else
*Comp = new Comparison(LHS, LHS, ICmpInst::ICMP_EQ);
OpenPOWER on IntegriCloud