mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
Fix another instance where PHI nodes need special treatment.
llvm-svn: 28774
This commit is contained in:
parent
fab2186a2f
commit
c50df7da72
@ -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…
x
Reference in New Issue
Block a user