[polly] r248946 - [FIX] Handle identity mappings in the ScopExpander

Johannes Doerfert via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 30 14:12:12 PDT 2015


Author: jdoerfert
Date: Wed Sep 30 16:12:12 2015
New Revision: 248946

URL: http://llvm.org/viewvc/llvm-project?rev=248946&view=rev
Log:
[FIX] Handle identity mappings in the ScopExpander

  If the VMap in the ScopExpander contains identity mappings
  we now ignore the mapping.

Reported-by: Tobias Grosser <tobias at grosser.es>


Modified:
    polly/trunk/lib/Support/ScopHelper.cpp

Modified: polly/trunk/lib/Support/ScopHelper.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Support/ScopHelper.cpp?rev=248946&r1=248945&r2=248946&view=diff
==============================================================================
--- polly/trunk/lib/Support/ScopHelper.cpp (original)
+++ polly/trunk/lib/Support/ScopHelper.cpp Wed Sep 30 16:12:12 2015
@@ -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 &&




More information about the llvm-commits mailing list