[llvm-commits] [llvm] r126072 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp

Eric Christopher echristo at apple.com
Sat Feb 19 21:04:42 PST 2011


Author: echristo
Date: Sat Feb 19 23:04:42 2011
New Revision: 126072

URL: http://llvm.org/viewvc/llvm-project?rev=126072&view=rev
Log:
If both operands are loads from stores in memory we can't use movlpd/movlps
since one needs to be a register operand. Just use movss instead of forcing
an operand into a register.

Fixes PR9239

Modified:
    llvm/trunk/lib/Target/X86/X86ISelLowering.cpp

Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=126072&r1=126071&r2=126072&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Sat Feb 19 23:04:42 2011
@@ -5472,6 +5472,10 @@
   if (MayFoldVectorLoad(V1) && MayFoldIntoStore(Op))
     CanFoldLoad = true;
 
+  // Both of them can't be memory operations though.
+  if (MayFoldVectorLoad(V1) && MayFoldVectorLoad(V2))
+    CanFoldLoad = false;
+  
   if (CanFoldLoad) {
     if (HasSSE2 && NumElems == 2)
       return getTargetShuffleNode(X86ISD::MOVLPD, dl, VT, V1, V2, DAG);





More information about the llvm-commits mailing list