1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -relocation-model=static -mtriple=i686-unknown -mattr=+mmx,+sse3 | FileCheck %s --check-prefix=X32
3 ; RUN: llc < %s -relocation-model=static -mtriple=x86_64-unknown -mattr=+mmx,+sse3 | FileCheck %s --check-prefix=X64
5 ; 64-bit stores here do not use MMX.
7 @M1 = external dso_local global <1 x i64>
8 @M2 = external dso_local global <2 x i32>
10 @S1 = external dso_local global <2 x i64>
11 @S2 = external dso_local global <4 x i32>
13 define void @test1() {
16 ; X32-NEXT: movl $0, M1+4
17 ; X32-NEXT: movl $0, M1
18 ; X32-NEXT: xorps %xmm0, %xmm0
19 ; X32-NEXT: movlps %xmm0, M2
24 ; X64-NEXT: movq $0, M1(%rip)
25 ; X64-NEXT: movq $0, M2(%rip)
27 store <1 x i64> zeroinitializer, ptr @M1
28 store <2 x i32> zeroinitializer, ptr @M2
32 define void @test2() {
35 ; X32-NEXT: movl $-1, M1+4
36 ; X32-NEXT: movl $-1, M1
37 ; X32-NEXT: pcmpeqd %xmm0, %xmm0
38 ; X32-NEXT: movq %xmm0, M2
43 ; X64-NEXT: movq $-1, M1(%rip)
44 ; X64-NEXT: movq $-1, M2(%rip)
46 store <1 x i64> < i64 -1 >, ptr @M1
47 store <2 x i32> < i32 -1, i32 -1 >, ptr @M2
51 define void @test3() {
54 ; X32-NEXT: xorps %xmm0, %xmm0
55 ; X32-NEXT: movaps %xmm0, S1
56 ; X32-NEXT: movaps %xmm0, S2
61 ; X64-NEXT: xorps %xmm0, %xmm0
62 ; X64-NEXT: movaps %xmm0, S1(%rip)
63 ; X64-NEXT: movaps %xmm0, S2(%rip)
65 store <2 x i64> zeroinitializer, ptr @S1
66 store <4 x i32> zeroinitializer, ptr @S2
70 define void @test4() {
73 ; X32-NEXT: pcmpeqd %xmm0, %xmm0
74 ; X32-NEXT: movdqa %xmm0, S1
75 ; X32-NEXT: movdqa %xmm0, S2
80 ; X64-NEXT: pcmpeqd %xmm0, %xmm0
81 ; X64-NEXT: movdqa %xmm0, S1(%rip)
82 ; X64-NEXT: movdqa %xmm0, S2(%rip)
84 store <2 x i64> < i64 -1, i64 -1>, ptr @S1
85 store <4 x i32> < i32 -1, i32 -1, i32 -1, i32 -1 >, ptr @S2