mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-12 07:21:56 +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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191711 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a6d841561b
commit
2967a80412
@ -125,6 +125,14 @@ FixupLEAPass::postRAConvertToLEA(MachineFunction::iterator &MFI,
|
||||
// which requires isImm() to be true
|
||||
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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user