diff options
author | dim <dim@FreeBSD.org> | 2013-10-01 19:14:24 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-10-01 19:14:24 +0000 |
commit | c637526317adafce2838292024d3dc0ea0c7f4ce (patch) | |
tree | 5e0d72bb2e3ef0c46a3242c9fee531883c94bb39 /contrib/llvm/lib/Target | |
parent | 3f9b2596429813d2d1d8d1b5805610f7d711624c (diff) | |
download | FreeBSD-src-c637526317adafce2838292024d3dc0ea0c7f4ce.zip FreeBSD-src-c637526317adafce2838292024d3dc0ea0c7f4ce.tar.gz |
Pull in r191711 from upstream llvm trunk:
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.
Pull in r191715 from upstream llvm trunk:
Forgot to add a break statement.
This should enable building the x11-toolskits/libXaw port with
CPUTYPE=atom.
Approved by: re (gjb)
Reported by: Kenta Suzumoto <kentas@hush.com>
MFC after: 3 days
Diffstat (limited to 'contrib/llvm/lib/Target')
-rw-r--r-- | contrib/llvm/lib/Target/X86/X86FixupLEAs.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/contrib/llvm/lib/Target/X86/X86FixupLEAs.cpp b/contrib/llvm/lib/Target/X86/X86FixupLEAs.cpp index 0dd034c..e8c88a3 100644 --- a/contrib/llvm/lib/Target/X86/X86FixupLEAs.cpp +++ b/contrib/llvm/lib/Target/X86/X86FixupLEAs.cpp @@ -125,6 +125,15 @@ FixupLEAPass::postRAConvertToLEA(MachineFunction::iterator &MFI, // which requires isImm() to be true return 0; } + break; + 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); } |