[llvm] r191711 - The X86FixupLEAs pass for Intel Atom must not call convertToThreeAddress
Dimitry Andric
dimitry at andric.com
Tue Oct 1 05:34:07 PDT 2013
I added a relatively small test case in PR16785, but maybe it can be reduced a little bit more, if it is converted to .ll?
-Dimitry
On Oct 1, 2013, at 01:25, Rafael EspĂndola <rafael.espindola at gmail.com> wrote:
> Test case?
>
> On Monday, September 30, 2013, Preston Gurd wrote:
> Author: pgurd
> Date: Mon Sep 30 18:18:42 2013
> New Revision: 191711
>
> URL: http://llvm.org/viewvc/llvm-project?rev=191711&view=rev
> Log:
> 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.
>
>
> Modified:
> llvm/trunk/lib/Target/X86/X86FixupLEAs.cpp
>
> Modified: llvm/trunk/lib/Target/X86/X86FixupLEAs.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FixupLEAs.cpp?rev=191711&r1=191710&r2=191711&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86FixupLEAs.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86FixupLEAs.cpp Mon Sep 30 18:18:42 2013
> @@ -125,6 +125,14 @@ FixupLEAPass::postRAConvertToLEA(Machine
> // 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);
> }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131001/70151f08/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131001/70151f08/attachment.sig>
More information about the llvm-commits
mailing list