mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-17 08:36:52 +00:00
Whoops, got my cases swapped.
llvm-svn: 11526
This commit is contained in:
parent
e227ae6b88
commit
1db99b1949
@ -146,12 +146,8 @@ bool PH::PeepholeOptimize(MachineBasicBlock &MBB,
|
||||
case X86::XORri32: Opcode = X86::XORri32b; break;
|
||||
}
|
||||
unsigned R0 = MI->getOperand(0).getReg();
|
||||
unsigned Scale = MI->getOperand(1).getImmedValue();
|
||||
unsigned R1 = MI->getOperand(2).getReg();
|
||||
unsigned Offset = MI->getOperand(3).getImmedValue();
|
||||
I = MBB.insert(MBB.erase(I),
|
||||
BuildMI(Opcode, 5).addReg(R0).addZImm(Scale).
|
||||
addReg(R1).addSImm(Offset).addZImm((char)Val));
|
||||
BuildMI(Opcode, 1, R0, MOTy::UseAndDef).addZImm((char)Val));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -171,8 +167,12 @@ bool PH::PeepholeOptimize(MachineBasicBlock &MBB,
|
||||
case X86::ANDmi32: Opcode = X86::ANDmi32b; break;
|
||||
}
|
||||
unsigned R0 = MI->getOperand(0).getReg();
|
||||
unsigned Scale = MI->getOperand(1).getImmedValue();
|
||||
unsigned R1 = MI->getOperand(2).getReg();
|
||||
unsigned Offset = MI->getOperand(3).getImmedValue();
|
||||
I = MBB.insert(MBB.erase(I),
|
||||
BuildMI(Opcode, 1, R0, MOTy::UseAndDef).addZImm((char)Val));
|
||||
BuildMI(Opcode, 5).addReg(R0).addZImm(Scale).
|
||||
addReg(R1).addSImm(Offset).addZImm((char)Val));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user