[AMDGPU] Remove unused variables from SIOptimizeExecMasking

Differential Revision: https://reviews.llvm.org/D25110


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283087 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Konstantin Zhuravlyov 2016-10-03 04:43:22 +00:00
parent dd1b9ba7a3
commit 4d2168214e

View File

@ -266,17 +266,14 @@ bool SIOptimizeExecMasking::runOnMachineFunction(MachineFunction &MF) {
MachineOperand &Src0 = SaveExecInst->getOperand(1);
MachineOperand &Src1 = SaveExecInst->getOperand(2);
MachineOperand *CopyOp = nullptr;
MachineOperand *OtherOp = nullptr;
if (Src0.isReg() && Src0.getReg() == CopyFromExec) {
CopyOp = &Src0;
OtherOp = &Src1;
} else if (Src1.isReg() && Src1.getReg() == CopyFromExec) {
if (!SaveExecInst->isCommutable())
break;
CopyOp = &Src1;
OtherOp = &Src0;
} else
llvm_unreachable("unexpected");