[llvm] r186496 - Teach x86 fast-isel to use AVX opcodes for vector stores when AVX is enabled.

Craig Topper craig.topper at gmail.com
Tue Jul 16 23:58:23 PDT 2013


Author: ctopper
Date: Wed Jul 17 01:58:23 2013
New Revision: 186496

URL: http://llvm.org/viewvc/llvm-project?rev=186496&view=rev
Log:
Teach x86 fast-isel to use AVX opcodes for vector stores when AVX is enabled.

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

Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=186496&r1=186495&r2=186496&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Wed Jul 17 01:58:23 2013
@@ -264,24 +264,24 @@ X86FastISel::X86FastEmitStore(EVT VT, un
     break;
   case MVT::v4f32:
     if (Aligned)
-      Opc = X86::MOVAPSmr;
+      Opc = Subtarget->hasAVX() ? X86::VMOVAPSmr : X86::MOVAPSmr;
     else
-      Opc = X86::MOVUPSmr;
+      Opc = Subtarget->hasAVX() ? X86::VMOVUPSmr : X86::MOVUPSmr;
     break;
   case MVT::v2f64:
     if (Aligned)
-      Opc = X86::MOVAPSmr;
+      Opc = Subtarget->hasAVX() ? X86::VMOVAPSmr : X86::MOVAPSmr;
     else
-      Opc = X86::MOVUPSmr;
+      Opc = Subtarget->hasAVX() ? X86::VMOVUPSmr : X86::MOVUPSmr;
     break;
   case MVT::v4i32:
   case MVT::v2i64:
   case MVT::v8i16:
   case MVT::v16i8:
     if (Aligned)
-      Opc = X86::MOVDQAmr;
+      Opc = Subtarget->hasAVX() ? X86::VMOVDQAmr : X86::MOVDQAmr;
     else
-      Opc = X86::MOVDQUmr;
+      Opc = Subtarget->hasAVX() ? X86::VMOVDQUmr : X86::MOVDQUmr;
     break;
   }
 





More information about the llvm-commits mailing list