mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-07 12:30:44 +00:00
Be more careful when modifying PHI nodes. Patch by Andre Tavares.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79407 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
663c2d2580
commit
3417e8f185
@ -316,7 +316,8 @@ void SSI::fixPhis() {
|
||||
for (unsigned i = 0, e = PN->getNumIncomingValues(); i < e; ++i) {
|
||||
PHINode *PN_father;
|
||||
if ((PN_father = dyn_cast<PHINode>(PN->getIncomingValue(i))) &&
|
||||
PN->getParent() == PN_father->getParent()) {
|
||||
PN->getParent() == PN_father->getParent() &&
|
||||
!DT_->dominates(PN->getParent(), PN->getIncomingBlock(i))) {
|
||||
BasicBlock *BB = PN->getIncomingBlock(i);
|
||||
int pos = PN_father->getBasicBlockIndex(BB);
|
||||
PN->setIncomingValue(i, PN_father->getIncomingValue(pos));
|
||||
|
Loading…
Reference in New Issue
Block a user