mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-04-01 07:11:45 +00:00
Make this code less confusing. Instead of reassigning BB, just operate
on the original variables, so it's easier to see what is being done to which blocks. llvm-svn: 102759
This commit is contained in:
parent
7ed4688b9e
commit
a78e35e7d9
@ -8556,21 +8556,17 @@ X86TargetLowering::EmitLoweredSelect(MachineInstr *MI,
|
||||
// copy0MBB:
|
||||
// %FalseValue = ...
|
||||
// # fallthrough to sinkMBB
|
||||
BB = copy0MBB;
|
||||
|
||||
// Update machine-CFG edges
|
||||
BB->addSuccessor(sinkMBB);
|
||||
copy0MBB->addSuccessor(sinkMBB);
|
||||
|
||||
// sinkMBB:
|
||||
// %Result = phi [ %FalseValue, copy0MBB ], [ %TrueValue, thisMBB ]
|
||||
// ...
|
||||
BB = sinkMBB;
|
||||
BuildMI(BB, DL, TII->get(X86::PHI), MI->getOperand(0).getReg())
|
||||
BuildMI(sinkMBB, DL, TII->get(X86::PHI), MI->getOperand(0).getReg())
|
||||
.addReg(MI->getOperand(1).getReg()).addMBB(copy0MBB)
|
||||
.addReg(MI->getOperand(2).getReg()).addMBB(thisMBB);
|
||||
|
||||
F->DeleteMachineInstr(MI); // The pseudo instruction is gone now.
|
||||
return BB;
|
||||
return sinkMBB;
|
||||
}
|
||||
|
||||
MachineBasicBlock *
|
||||
|
Loading…
x
Reference in New Issue
Block a user