forked from OSchip/llvm-project
ScalerEvolution: Only erase temporary values if they actually have been added
This addresses post-review comments from Sanjoy Das for r261485. llvm-svn: 261486
This commit is contained in:
parent
11332e5ec5
commit
934fcf4dc6
|
@ -3895,13 +3895,14 @@ const SCEV *ScalarEvolution::createAddRecFromPHI(PHINode *PN) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Remove the temporary PHI node SCEV that has been inserted while intending
|
||||
// to create an AddRecExpr for this PHI node. We can not keep this temporary
|
||||
// as it will prevent later (possibly simpler) SCEV expressions to be added
|
||||
// to the ValueExprMap.
|
||||
ValueExprMap.erase(PN);
|
||||
}
|
||||
|
||||
// Remove the temporary PHI node SCEV that has been inserted while intending
|
||||
// to create an AddRecExpr for this PHI node. We can not keep this temporary
|
||||
// as it will prevent later (possibly simpler) SCEV expressions to be added
|
||||
// to the ValueExprMap.
|
||||
ValueExprMap.erase(PN);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue