[llvm-commits] [llvm] r131330 - in /llvm/trunk: lib/Target/X86/X86InstrSSE.td test/CodeGen/X86/movntdq-no-avx.ll

Rafael Espindola rafael.espindola at gmail.com
Fri May 13 17:30:01 PDT 2011


Author: rafael
Date: Fri May 13 19:30:01 2011
New Revision: 131330

URL: http://llvm.org/viewvc/llvm-project?rev=131330&view=rev
Log:
Don't produce a vmovntdq if we don't have AVX support.

Added:
    llvm/trunk/test/CodeGen/X86/movntdq-no-avx.ll
Modified:
    llvm/trunk/lib/Target/X86/X86InstrSSE.td

Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=131330&r1=131329&r2=131330&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Fri May 13 19:30:01 2011
@@ -1900,7 +1900,7 @@
                                                      addr:$dst)]>, VEX;
 
   def : Pat<(alignednontemporalstore (v2i64 VR128:$src), addr:$dst),
-            (VMOVNTDQmr addr:$dst, VR128:$src)>;
+            (VMOVNTDQmr addr:$dst, VR128:$src)>, Requires<[HasAVX]>;
 
   def VMOVNTPSYmr : VPSI<0x2B, MRMDestMem, (outs),
                        (ins f256mem:$dst, VR256:$src),

Added: llvm/trunk/test/CodeGen/X86/movntdq-no-avx.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/movntdq-no-avx.ll?rev=131330&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/movntdq-no-avx.ll (added)
+++ llvm/trunk/test/CodeGen/X86/movntdq-no-avx.ll Fri May 13 19:30:01 2011
@@ -0,0 +1,12 @@
+; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu | FileCheck %s
+
+; Test that we produce a movntdq, not a vmovntdq
+; CHECK-NOT: vmovntdq
+
+define void @test(<2 x i64>* nocapture %a, <2 x i64> %b) nounwind optsize {
+entry:
+  store <2 x i64> %b, <2 x i64>* %a, align 16, !nontemporal !0
+  ret void
+}
+
+!0 = metadata !{i32 1}





More information about the llvm-commits mailing list