mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-25 13:27:52 +00:00
Simplify code that toggle optional operand to ARM::CPSR.
llvm-svn: 119484
This commit is contained in:
parent
2cc6515616
commit
eed919e2fb
@ -1546,9 +1546,9 @@ OptimizeCompareInstr(MachineInstr *CmpInstr, unsigned SrcReg, int CmpMask,
|
||||
case ARM::SUBri:
|
||||
case ARM::t2ADDri:
|
||||
case ARM::t2SUBri:
|
||||
MI->RemoveOperand(5);
|
||||
MachineInstrBuilder(MI)
|
||||
.addReg(ARM::CPSR, RegState::Define | RegState::Implicit);
|
||||
// Toggle the optional operand to CPSR.
|
||||
MI->getOperand(5).setReg(ARM::CPSR);
|
||||
MI->getOperand(5).setIsDef(true);
|
||||
CmpInstr->eraseFromParent();
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user