svn commit: r255978 - head/contrib/llvm/lib/Target/X86

Dimitry Andric dim at FreeBSD.org
Tue Oct 1 19:14:25 UTC 2013


Author: dim
Date: Tue Oct  1 19:14:24 2013
New Revision: 255978
URL: http://svnweb.freebsd.org/changeset/base/255978

Log:
  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 at hush.com>
  MFC after:	3 days

Modified:
  head/contrib/llvm/lib/Target/X86/X86FixupLEAs.cpp

Modified: head/contrib/llvm/lib/Target/X86/X86FixupLEAs.cpp
==============================================================================
--- head/contrib/llvm/lib/Target/X86/X86FixupLEAs.cpp	Tue Oct  1 18:41:53 2013	(r255977)
+++ head/contrib/llvm/lib/Target/X86/X86FixupLEAs.cpp	Tue Oct  1 19:14:24 2013	(r255978)
@@ -125,6 +125,15 @@ FixupLEAPass::postRAConvertToLEA(Machine
       // 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);
 }


More information about the svn-src-head mailing list