mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-15 07:59:57 +00:00
Insert phi code at top of block
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5015 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
992447f91b
commit
920536333c
@ -340,9 +340,12 @@ void ISel::SelectPHINodes() {
|
||||
// Get the incoming value into a virtual register. If it is not already
|
||||
// available in a virtual register, insert the computation code into
|
||||
// PredMBB
|
||||
MachineBasicBlock::iterator PI = PredMBB->end()-1;
|
||||
//
|
||||
|
||||
MachineBasicBlock::iterator PI = PredMBB->begin();
|
||||
while ((*PI)->getOpcode() == X86::PHI) ++PI;
|
||||
|
||||
MI->addRegOperand(getReg(PN->getIncomingValue(i), PredMBB, PI));
|
||||
|
||||
|
||||
// FIXME: Pass in the MachineBasicBlocks instead of the basic blocks...
|
||||
MI->addPCDispOperand(PN->getIncomingBlock(i)); // PredMBB
|
||||
|
@ -340,9 +340,12 @@ void ISel::SelectPHINodes() {
|
||||
// Get the incoming value into a virtual register. If it is not already
|
||||
// available in a virtual register, insert the computation code into
|
||||
// PredMBB
|
||||
MachineBasicBlock::iterator PI = PredMBB->end()-1;
|
||||
//
|
||||
|
||||
MachineBasicBlock::iterator PI = PredMBB->begin();
|
||||
while ((*PI)->getOpcode() == X86::PHI) ++PI;
|
||||
|
||||
MI->addRegOperand(getReg(PN->getIncomingValue(i), PredMBB, PI));
|
||||
|
||||
|
||||
// FIXME: Pass in the MachineBasicBlocks instead of the basic blocks...
|
||||
MI->addPCDispOperand(PN->getIncomingBlock(i)); // PredMBB
|
||||
|
Loading…
Reference in New Issue
Block a user