AMDGPU: Remove register operand from si_mask_branch

It isn't used for anything, and is also misleading since
it could be spilled at the end of the block, so it can't be relied
on. There ends up being a verifier error about using an undefined
register since the spill kills the register.

llvm-svn: 279899
This commit is contained in:
Matt Arsenault 2016-08-27 00:42:21 +00:00
parent 42034d009d
commit f98a596954
2 changed files with 3 additions and 5 deletions

View File

@ -1803,7 +1803,7 @@ let hasSideEffects = 1 in {
// Dummy terminator instruction to use after control flow instructions
// replaced with exec mask operations.
def SI_MASK_BRANCH : PseudoInstSI <
(outs), (ins brtarget:$target, SReg_64:$dst)> {
(outs), (ins brtarget:$target)> {
let isBranch = 0;
let isTerminator = 1;
let isBarrier = 0;

View File

@ -136,8 +136,7 @@ void SILowerControlFlow::emitIf(MachineInstr &MI) {
// be used later when inserting skips.
MachineInstr *NewBr =
BuildMI(MBB, I, DL, TII->get(AMDGPU::SI_MASK_BRANCH))
.addOperand(MI.getOperand(2))
.addReg(SaveExecReg, getKillRegState(SaveExec.isKill()));
.addOperand(MI.getOperand(2));
if (!LIS) {
MI.eraseFromParent();
@ -196,8 +195,7 @@ void SILowerControlFlow::emitElse(MachineInstr &MI) {
// Insert a pseudo terminator to help keep the verifier happy.
MachineInstr *Branch =
BuildMI(MBB, Term, DL, TII->get(AMDGPU::SI_MASK_BRANCH))
.addMBB(DestBB)
.addReg(DstReg);
.addMBB(DestBB);
if (!LIS) {
MI.eraseFromParent();