summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/SystemZ
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-07-06 15:49:48 +0000
committerDan Gohman <gohman@apple.com>2010-07-06 15:49:48 +0000
commitf4f04107ef62ed845d83eef163e7761bea6b2856 (patch)
tree87b84ea55b541a3032522c772002d01d7d4bbfb7 /llvm/lib/Target/SystemZ
parent33134fa75fcd0d671b6c46b3669505883bfaef6f (diff)
downloadbcm5719-llvm-f4f04107ef62ed845d83eef163e7761bea6b2856.tar.gz
bcm5719-llvm-f4f04107ef62ed845d83eef163e7761bea6b2856.zip
Revert r107655.
llvm-svn: 107668
Diffstat (limited to 'llvm/lib/Target/SystemZ')
-rw-r--r--llvm/lib/Target/SystemZ/SystemZISelLowering.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
index 642d2ea32f9..56c0b9c7099 100644
--- a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
@@ -827,20 +827,16 @@ SystemZTargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
MachineBasicBlock *copy0MBB = F->CreateMachineBasicBlock(LLVM_BB);
MachineBasicBlock *copy1MBB = F->CreateMachineBasicBlock(LLVM_BB);
SystemZCC::CondCodes CC = (SystemZCC::CondCodes)MI->getOperand(3).getImm();
+ BuildMI(BB, dl, TII.getBrCond(CC)).addMBB(copy1MBB);
F->insert(I, copy0MBB);
F->insert(I, copy1MBB);
// Update machine-CFG edges by transferring all successors of the current
// block to the new block which will contain the Phi node for the select.
- copy1MBB->splice(copy1MBB->begin(), BB,
- llvm::next(MachineBasicBlock::iterator(MI)),
- BB->end());
- copy1MBB->transferSuccessorsAndUpdatePHIs(BB);
+ copy1MBB->transferSuccessors(BB);
// Next, add the true and fallthrough blocks as its successors.
BB->addSuccessor(copy0MBB);
BB->addSuccessor(copy1MBB);
- BuildMI(BB, dl, TII.getBrCond(CC)).addMBB(copy1MBB);
-
// copy0MBB:
// %FalseValue = ...
// # fallthrough to copy1MBB
@@ -853,11 +849,11 @@ SystemZTargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
// %Result = phi [ %FalseValue, copy0MBB ], [ %TrueValue, thisMBB ]
// ...
BB = copy1MBB;
- BuildMI(*BB, BB->begin(), dl, TII.get(SystemZ::PHI),
+ BuildMI(BB, dl, TII.get(SystemZ::PHI),
MI->getOperand(0).getReg())
.addReg(MI->getOperand(2).getReg()).addMBB(copy0MBB)
.addReg(MI->getOperand(1).getReg()).addMBB(thisMBB);
- MI->eraseFromParent(); // The pseudo instruction is gone now.
+ F->DeleteMachineInstr(MI); // The pseudo instruction is gone now.
return BB;
}
OpenPOWER on IntegriCloud