summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--polly/lib/Support/ScopHelper.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/polly/lib/Support/ScopHelper.cpp b/polly/lib/Support/ScopHelper.cpp
index 70c1f13047e..9acfed661d8 100644
--- a/polly/lib/Support/ScopHelper.cpp
+++ b/polly/lib/Support/ScopHelper.cpp
@@ -260,7 +260,8 @@ private:
// If a value mapping was given try if the underlying value is remapped.
if (VMap)
if (Value *NewVal = VMap->lookup(E->getValue()))
- return visit(SE.getSCEV(NewVal));
+ if (NewVal != E->getValue())
+ return visit(SE.getSCEV(NewVal));
Instruction *Inst = dyn_cast<Instruction>(E->getValue());
if (!Inst || (Inst->getOpcode() != Instruction::SRem &&
OpenPOWER on IntegriCloud