summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCBranchSelector.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCBranchSelector.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp b/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp
index 4d63c5b5703..69393040891 100644
--- a/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp
+++ b/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp
@@ -186,9 +186,9 @@ bool PPCBSel::runOnMachineFunction(MachineFunction &Fn) {
}
// Otherwise, we have to expand it to a long branch.
- MachineInstr *OldBranch = I;
- DebugLoc dl = OldBranch->getDebugLoc();
-
+ MachineInstr &OldBranch = *I;
+ DebugLoc dl = OldBranch.getDebugLoc();
+
if (I->getOpcode() == PPC::BCC) {
// The BCC operands are:
// 0. PPC branch predicate
@@ -222,8 +222,8 @@ bool PPCBSel::runOnMachineFunction(MachineFunction &Fn) {
I = BuildMI(MBB, I, dl, TII->get(PPC::B)).addMBB(Dest);
// Remove the old branch from the function.
- OldBranch->eraseFromParent();
-
+ OldBranch.eraseFromParent();
+
// Remember that this instruction is 8-bytes, increase the size of the
// block by 4, remember to iterate.
BlockSizes[MBB.getNumber()] += 4;
OpenPOWER on IntegriCloud