1 ; RUN: llc -mtriple=x86_64-unknown-unknown -mattr=+sse2 -fast-isel -O0 < %s | FileCheck %s --check-prefix=ALL --check-prefix=SSE --check-prefix=SSE2
2 ; RUN: llc -mtriple=x86_64-unknown-unknown -mattr=+sse4a -fast-isel -O0 < %s | FileCheck %s --check-prefix=ALL --check-prefix=SSE --check-prefix=SSE4A
3 ; RUN: llc -mtriple=x86_64-unknown-unknown -mattr=+avx -fast-isel -O0 < %s | FileCheck %s --check-prefix=ALL --check-prefix=AVX
5 define void @test_nti32(i32* nocapture %ptr, i32 %X) {
6 ; ALL-LABEL: test_nti32:
7 ; ALL: # BB#0: # %entry
8 ; ALL-NEXT: movntil %esi, (%rdi)
11 store i32 %X, i32* %ptr, align 4, !nontemporal !1
15 define void @test_nti64(i64* nocapture %ptr, i64 %X) {
16 ; ALL-LABEL: test_nti64:
17 ; ALL: # BB#0: # %entry
18 ; ALL-NEXT: movntiq %rsi, (%rdi)
21 store i64 %X, i64* %ptr, align 8, !nontemporal !1
25 define void @test_ntfloat(float* nocapture %ptr, float %X) {
26 ; SSE2-LABEL: test_ntfloat:
27 ; SSE2: # BB#0: # %entry
28 ; SSE2-NEXT: movss %xmm0, (%rdi)
31 ; SSE4A-LABEL: test_ntfloat:
32 ; SSE4A: # BB#0: # %entry
33 ; SSE4A-NEXT: movntss %xmm0, (%rdi)
36 ; AVX-LABEL: test_ntfloat:
37 ; AVX: # BB#0: # %entry
38 ; AVX-NEXT: vmovss %xmm0, (%rdi)
41 store float %X, float* %ptr, align 4, !nontemporal !1
45 define void @test_ntdouble(double* nocapture %ptr, double %X) {
46 ; SSE2-LABEL: test_ntdouble:
47 ; SSE2: # BB#0: # %entry
48 ; SSE2-NEXT: movsd %xmm0, (%rdi)
51 ; SSE4A-LABEL: test_ntdouble:
52 ; SSE4A: # BB#0: # %entry
53 ; SSE4A-NEXT: movntsd %xmm0, (%rdi)
56 ; AVX-LABEL: test_ntdouble:
57 ; AVX: # BB#0: # %entry
58 ; AVX-NEXT: vmovsd %xmm0, (%rdi)
61 store double %X, double* %ptr, align 8, !nontemporal !1
65 define void @test_nt4xfloat(<4 x float>* nocapture %ptr, <4 x float> %X) {
66 ; SSE-LABEL: test_nt4xfloat:
67 ; SSE: # BB#0: # %entry
68 ; SSE-NEXT: movntps %xmm0, (%rdi)
71 ; AVX-LABEL: test_nt4xfloat:
72 ; AVX: # BB#0: # %entry
73 ; AVX-NEXT: vmovntps %xmm0, (%rdi)
76 store <4 x float> %X, <4 x float>* %ptr, align 16, !nontemporal !1
80 define void @test_nt2xdouble(<2 x double>* nocapture %ptr, <2 x double> %X) {
81 ; SSE-LABEL: test_nt2xdouble:
82 ; SSE: # BB#0: # %entry
83 ; SSE-NEXT: movntpd %xmm0, (%rdi)
86 ; AVX-LABEL: test_nt2xdouble:
87 ; AVX: # BB#0: # %entry
88 ; AVX-NEXT: vmovntpd %xmm0, (%rdi)
91 store <2 x double> %X, <2 x double>* %ptr, align 16, !nontemporal !1
95 define void @test_nt2xi64(<2 x i64>* nocapture %ptr, <2 x i64> %X) {
96 ; SSE-LABEL: test_nt2xi64:
97 ; SSE: # BB#0: # %entry
98 ; SSE-NEXT: movntdq %xmm0, (%rdi)
101 ; AVX-LABEL: test_nt2xi64:
102 ; AVX: # BB#0: # %entry
103 ; AVX-NEXT: vmovntdq %xmm0, (%rdi)
106 store <2 x i64> %X, <2 x i64>* %ptr, align 16, !nontemporal !1