mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-04-12 04:26:43 +00:00
The X86FixupLEAs pass for Intel Atom must not call convertToThreeAddress
on ADD16rr opcodes, if src1 != src, since that would cause convertToThreeAddress to try to create a virtual register. This is not permitted after register allocation, which is when the X86FixupLEAs pass runs. This patch fixes PR16785. llvm-svn: 191711
This commit is contained in:
parent
d9670853b9
commit
a352cdea56
@ -125,6 +125,14 @@ FixupLEAPass::postRAConvertToLEA(MachineFunction::iterator &MFI,
|
|||||||
// which requires isImm() to be true
|
// which requires isImm() to be true
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
case X86::ADD16rr:
|
||||||
|
case X86::ADD16rr_DB:
|
||||||
|
if (MI->getOperand(1).getReg() != MI->getOperand(2).getReg()) {
|
||||||
|
// if src1 != src2, then convertToThreeAddress will
|
||||||
|
// need to create a Virtual register, which we cannot do
|
||||||
|
// after register allocation.
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return TII->convertToThreeAddress(MFI, MBBI, 0);
|
return TII->convertToThreeAddress(MFI, MBBI, 0);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user