mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-20 03:23:01 +02:00
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
e896bbb2c0
commit
7157394614
@ -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
Block a user