aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-05-14 00:30:01 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-05-14 00:30:01 +0000
commita3f88148e66b6b42d5843f33db675ffa935ccb15 (patch)
tree5ac98e482eb01f973f0090ccccb95e33be0ae0ea
parentd25d16c901405a329fc99f2cb845105164e540e6 (diff)
Don't produce a vmovntdq if we don't have AVX support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131330 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/X86InstrSSE.td2
-rw-r--r--test/CodeGen/X86/movntdq-no-avx.ll12
2 files changed, 13 insertions, 1 deletions
diff --git a/lib/Target/X86/X86InstrSSE.td b/lib/Target/X86/X86InstrSSE.td
index 4b6550bddd..87f54b6583 100644
--- a/lib/Target/X86/X86InstrSSE.td
+++ b/lib/Target/X86/X86InstrSSE.td
@@ -1900,7 +1900,7 @@ let AddedComplexity = 400 in { // Prefer non-temporal versions
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),
diff --git a/test/CodeGen/X86/movntdq-no-avx.ll b/test/CodeGen/X86/movntdq-no-avx.ll
new file mode 100644
index 0000000000..8b7e6ef152
--- /dev/null
+++ b/test/CodeGen/X86/movntdq-no-avx.ll
@@ -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}