1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=x86_64-unknown-unknown -mattr=+sse2 -fast-isel -O0 < %s | FileCheck %s --check-prefix=ALL --check-prefix=SSE --check-prefix=SSE2
3 ; RUN: llc -mtriple=x86_64-unknown-unknown -mattr=+sse4a -fast-isel -O0 < %s | FileCheck %s --check-prefix=ALL --check-prefix=SSE --check-prefix=SSE4A
4 ; RUN: llc -mtriple=x86_64-unknown-unknown -mattr=+avx -fast-isel -O0 < %s | FileCheck %s --check-prefix=ALL --check-prefix=AVX
6 define void @test_nti32(i32* nocapture %ptr, i32 %X) {
7 ; ALL-LABEL: test_nti32:
8 ; ALL: # BB#0: # %entry
9 ; ALL-NEXT: movntil %esi, (%rdi)
12 store i32 %X, i32* %ptr, align 4, !nontemporal !1
16 define void @test_nti64(i64* nocapture %ptr, i64 %X) {
17 ; ALL-LABEL: test_nti64:
18 ; ALL: # BB#0: # %entry
19 ; ALL-NEXT: movntiq %rsi, (%rdi)
22 store i64 %X, i64* %ptr, align 8, !nontemporal !1
26 define void @test_ntfloat(float* nocapture %ptr, float %X) {
27 ; SSE2-LABEL: test_ntfloat:
28 ; SSE2: # BB#0: # %entry
29 ; SSE2-NEXT: movss %xmm0, (%rdi)
32 ; SSE4A-LABEL: test_ntfloat:
33 ; SSE4A: # BB#0: # %entry
34 ; SSE4A-NEXT: movntss %xmm0, (%rdi)
37 ; AVX-LABEL: test_ntfloat:
38 ; AVX: # BB#0: # %entry
39 ; AVX-NEXT: vmovss %xmm0, (%rdi)
42 store float %X, float* %ptr, align 4, !nontemporal !1
46 define void @test_ntdouble(double* nocapture %ptr, double %X) {
47 ; SSE2-LABEL: test_ntdouble:
48 ; SSE2: # BB#0: # %entry
49 ; SSE2-NEXT: movsd %xmm0, (%rdi)
52 ; SSE4A-LABEL: test_ntdouble:
53 ; SSE4A: # BB#0: # %entry
54 ; SSE4A-NEXT: movntsd %xmm0, (%rdi)
57 ; AVX-LABEL: test_ntdouble:
58 ; AVX: # BB#0: # %entry
59 ; AVX-NEXT: vmovsd %xmm0, (%rdi)
62 store double %X, double* %ptr, align 8, !nontemporal !1
66 define void @test_nt4xfloat(<4 x float>* nocapture %ptr, <4 x float> %X) {
67 ; SSE-LABEL: test_nt4xfloat:
68 ; SSE: # BB#0: # %entry
69 ; SSE-NEXT: movntps %xmm0, (%rdi)
72 ; AVX-LABEL: test_nt4xfloat:
73 ; AVX: # BB#0: # %entry
74 ; AVX-NEXT: vmovntps %xmm0, (%rdi)
77 store <4 x float> %X, <4 x float>* %ptr, align 16, !nontemporal !1
81 define void @test_nt2xdouble(<2 x double>* nocapture %ptr, <2 x double> %X) {
82 ; SSE-LABEL: test_nt2xdouble:
83 ; SSE: # BB#0: # %entry
84 ; SSE-NEXT: movntpd %xmm0, (%rdi)
87 ; AVX-LABEL: test_nt2xdouble:
88 ; AVX: # BB#0: # %entry
89 ; AVX-NEXT: vmovntpd %xmm0, (%rdi)
92 store <2 x double> %X, <2 x double>* %ptr, align 16, !nontemporal !1
96 define void @test_nt2xi64(<2 x i64>* nocapture %ptr, <2 x i64> %X) {
97 ; SSE-LABEL: test_nt2xi64:
98 ; SSE: # BB#0: # %entry
99 ; SSE-NEXT: movntdq %xmm0, (%rdi)
102 ; AVX-LABEL: test_nt2xi64:
103 ; AVX: # BB#0: # %entry
104 ; AVX-NEXT: vmovntdq %xmm0, (%rdi)
107 store <2 x i64> %X, <2 x i64>* %ptr, align 16, !nontemporal !1