[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@grosser.es> llvm-svn: 248946
This commit is contained in:
parent
4c5a4646bf
commit
59984322c3
|
@ -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 &&
|
||||
|
|
Loading…
Reference in New Issue