1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

Mark lea fi# as being really rematerializable.

llvm-svn: 56698
This commit is contained in:
Dan Gohman 2008-09-26 21:30:20 +00:00
parent 5ce14d532c
commit 3bcb327e9c

View File

@ -819,11 +819,12 @@ X86InstrInfo::isReallyTriviallyReMaterializable(const MachineInstr *MI) const {
case X86::LEA32r:
case X86::LEA64r: {
if (MI->getOperand(1).isRegister() &&
MI->getOperand(2).isImmediate() &&
if (MI->getOperand(2).isImmediate() &&
MI->getOperand(3).isRegister() && MI->getOperand(3).getReg() == 0 &&
!MI->getOperand(4).isRegister()) {
// lea fi#, lea GV, etc. are all rematerializable.
if (!MI->getOperand(1).isRegister())
return true;
unsigned BaseReg = MI->getOperand(1).getReg();
if (BaseReg == 0)
return true;