mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-02 16:56:50 +00:00
Fix another instance where PHI nodes need special treatment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28774 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3cc86cc11f
commit
8b92d0cae1
@ -215,6 +215,12 @@ void LCSSA::processInstruction(Instruction* Instr,
|
||||
for (Instruction::use_iterator UI = Instr->use_begin(), UE = Instr->use_end();
|
||||
UI != UE; ++UI) {
|
||||
Instruction* use = cast<Instruction>(*UI);
|
||||
BasicBlock* UserBB = use->getParent();
|
||||
if (PHINode* p = dyn_cast<PHINode>(use)) {
|
||||
unsigned OperandNo = UI.getOperandNo();
|
||||
UserBB = p->getIncomingBlock(OperandNo/2);
|
||||
}
|
||||
|
||||
// Don't need to update uses within the loop body.
|
||||
if (!inLoop(use->getParent()))
|
||||
Uses.push_back(use);
|
||||
|
Loading…
Reference in New Issue
Block a user