Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(609)

Side by Side Diff: tests_lit/llvm2ice_tests/vector-arg.ll

Issue 914263005: Subzero: switch from llvm-objdump to objdump for lit tests (for LLVM merge) (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 ; This file checks that Subzero generates code in accordance with the 1 ; This file checks that Subzero generates code in accordance with the
2 ; calling convention for vectors. 2 ; calling convention for vectors.
3 3
4 ; RUN: %p2i -i %s --args -O2 --verbose none \ 4 ; RUN: %p2i -i %s --assemble --disassemble --args -O2 --verbose none \
5 ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \ 5 ; RUN: | FileCheck %s
6 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s 6 ; RUN: %p2i -i %s --assemble --disassemble --args -Om1 --verbose none \
7 ; RUN: %p2i -i %s --args -Om1 --verbose none \
8 ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
9 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
10 ; RUN: | FileCheck --check-prefix=OPTM1 %s 7 ; RUN: | FileCheck --check-prefix=OPTM1 %s
11 8
12 ; The first five functions test that vectors are moved from their 9 ; The first five functions test that vectors are moved from their
13 ; correct argument location to xmm0. 10 ; correct argument location to xmm0.
14 11
15 define <4 x float> @test_returning_arg0(<4 x float> %arg0, <4 x float> %arg1, <4 x float> %arg2, <4 x float> %arg3, <4 x float> %arg4, <4 x float> %arg5) { 12 define <4 x float> @test_returning_arg0(<4 x float> %arg0, <4 x float> %arg1, <4 x float> %arg2, <4 x float> %arg3, <4 x float> %arg4, <4 x float> %arg5) {
16 entry: 13 entry:
17 ret <4 x float> %arg0 14 ret <4 x float> %arg0
18 ; CHECK-LABEL: test_returning_arg0: 15 ; CHECK-LABEL: test_returning_arg0
19 ; CHECK-NOT: mov 16 ; CHECK-NOT: mov
20 ; CHECK: ret 17 ; CHECK: ret
21 18
22 ; OPTM1-LABEL: test_returning_arg0: 19 ; OPTM1-LABEL: test_returning_arg0
23 ; OPTM1: movups xmmword ptr [[LOC:.*]], xmm0 20 ; OPTM1: movups XMMWORD PTR [[LOC:.*]], xmm0
24 ; OPTM1: movups xmm0, xmmword ptr [[LOC]] 21 ; OPTM1: movups xmm0, XMMWORD PTR [[LOC]]
25 ; OPTM1: ret 22 ; OPTM1: ret
26 } 23 }
27 24
28 define <4 x float> @test_returning_arg1(<4 x float> %arg0, <4 x float> %arg1, <4 x float> %arg2, <4 x float> %arg3, <4 x float> %arg4, <4 x float> %arg5) { 25 define <4 x float> @test_returning_arg1(<4 x float> %arg0, <4 x float> %arg1, <4 x float> %arg2, <4 x float> %arg3, <4 x float> %arg4, <4 x float> %arg5) {
29 entry: 26 entry:
30 ret <4 x float> %arg1 27 ret <4 x float> %arg1
31 ; CHECK-LABEL: test_returning_arg1: 28 ; CHECK-LABEL: test_returning_arg1
32 ; CHECK: movups xmm0, xmm1 29 ; CHECK: movups xmm0,xmm1
33 ; CHECK: ret 30 ; CHECK: ret
34 31
35 ; OPTM1-LABEL: test_returning_arg1: 32 ; OPTM1-LABEL: test_returning_arg1
36 ; OPTM1: movups xmmword ptr [[LOC:.*]], xmm1 33 ; OPTM1: movups XMMWORD PTR [[LOC:.*]], xmm1
37 ; OPTM1: movups xmm0, xmmword ptr [[LOC]] 34 ; OPTM1: movups xmm0, XMMWORD PTR [[LOC]]
38 ; OPTM1: ret 35 ; OPTM1: ret
39 } 36 }
40 37
41 define <4 x float> @test_returning_arg2(<4 x float> %arg0, <4 x float> %arg1, <4 x float> %arg2, <4 x float> %arg3, <4 x float> %arg4, <4 x float> %arg5) { 38 define <4 x float> @test_returning_arg2(<4 x float> %arg0, <4 x float> %arg1, <4 x float> %arg2, <4 x float> %arg3, <4 x float> %arg4, <4 x float> %arg5) {
42 entry: 39 entry:
43 ret <4 x float> %arg2 40 ret <4 x float> %arg2
44 ; CHECK-LABEL: test_returning_arg2: 41 ; CHECK-LABEL: test_returning_arg2
45 ; CHECK: movups xmm0, xmm2 42 ; CHECK: movups xmm0,xmm2
46 ; CHECK: ret 43 ; CHECK: ret
47 44
48 ; OPTM1-LABEL: test_returning_arg2: 45 ; OPTM1-LABEL: test_returning_arg2
49 ; OPTM1: movups xmmword ptr [[LOC:.*]], xmm2 46 ; OPTM1: movups XMMWORD PTR [[LOC:.*]], xmm2
50 ; OPTM1: movups xmm0, xmmword ptr [[LOC]] 47 ; OPTM1: movups xmm0, XMMWORD PTR [[LOC]]
51 ; OPTM1: ret 48 ; OPTM1: ret
52 } 49 }
53 50
54 define <4 x float> @test_returning_arg3(<4 x float> %arg0, <4 x float> %arg1, <4 x float> %arg2, <4 x float> %arg3, <4 x float> %arg4, <4 x float> %arg5) { 51 define <4 x float> @test_returning_arg3(<4 x float> %arg0, <4 x float> %arg1, <4 x float> %arg2, <4 x float> %arg3, <4 x float> %arg4, <4 x float> %arg5) {
55 entry: 52 entry:
56 ret <4 x float> %arg3 53 ret <4 x float> %arg3
57 ; CHECK-LABEL: test_returning_arg3: 54 ; CHECK-LABEL: test_returning_arg3
58 ; CHECK: movups xmm0, xmm3 55 ; CHECK: movups xmm0,xmm3
59 ; CHECK: ret 56 ; CHECK: ret
60 57
61 ; OPTM1-LABEL: test_returning_arg3: 58 ; OPTM1-LABEL: test_returning_arg3
62 ; OPTM1: movups xmmword ptr [[LOC:.*]], xmm3 59 ; OPTM1: movups XMMWORD PTR [[LOC:.*]], xmm3
63 ; OPTM1: movups xmm0, xmmword ptr [[LOC]] 60 ; OPTM1: movups xmm0, XMMWORD PTR [[LOC]]
64 ; OPTM1: ret 61 ; OPTM1: ret
65 } 62 }
66 63
67 define <4 x float> @test_returning_arg4(<4 x float> %arg0, <4 x float> %arg1, <4 x float> %arg2, <4 x float> %arg3, <4 x float> %arg4, <4 x float> %arg5) { 64 define <4 x float> @test_returning_arg4(<4 x float> %arg0, <4 x float> %arg1, <4 x float> %arg2, <4 x float> %arg3, <4 x float> %arg4, <4 x float> %arg5) {
68 entry: 65 entry:
69 ret <4 x float> %arg4 66 ret <4 x float> %arg4
70 ; CHECK-LABEL: test_returning_arg4: 67 ; CHECK-LABEL: test_returning_arg4
71 ; CHECK: movups xmm0, xmmword ptr [esp + 4] 68 ; CHECK: movups xmm0,XMMWORD PTR [esp+4]
72 ; CHECK: ret 69 ; CHECK: ret
73 70
74 ; OPTM1-LABEL: test_returning_arg4: 71 ; OPTM1-LABEL: test_returning_arg4
75 ; OPTM1: movups xmm0, xmmword ptr {{.*}} 72 ; OPTM1: movups xmm0, XMMWORD PTR {{.*}}
76 ; OPTM1: ret 73 ; OPTM1: ret
77 } 74 }
78 75
79 ; The next five functions check that xmm arguments are handled 76 ; The next five functions check that xmm arguments are handled
80 ; correctly when interspersed with stack arguments in the argument 77 ; correctly when interspersed with stack arguments in the argument
81 ; list. 78 ; list.
82 79
83 define <4 x float> @test_returning_interspersed_arg0(i32 %i32arg0, double %doubl earg0, <4 x float> %arg0, <4 x float> %arg1, i32 %i32arg1, <4 x float> %arg2, do uble %doublearg1, <4 x float> %arg3, i32 %i32arg2, double %doublearg2, float %fl oatarg0, <4 x float> %arg4, <4 x float> %arg5, float %floatarg1) { 80 define <4 x float> @test_returning_interspersed_arg0(i32 %i32arg0, double %doubl earg0, <4 x float> %arg0, <4 x float> %arg1, i32 %i32arg1, <4 x float> %arg2, do uble %doublearg1, <4 x float> %arg3, i32 %i32arg2, double %doublearg2, float %fl oatarg0, <4 x float> %arg4, <4 x float> %arg5, float %floatarg1) {
84 entry: 81 entry:
85 ret <4 x float> %arg0 82 ret <4 x float> %arg0
86 ; CHECK-LABEL: test_returning_interspersed_arg0: 83 ; CHECK-LABEL: test_returning_interspersed_arg0
87 ; CHECK-NOT: mov 84 ; CHECK-NOT: mov
88 ; CHECK: ret 85 ; CHECK: ret
89 86
90 ; OPTM1-LABEL: test_returning_interspersed_arg0: 87 ; OPTM1-LABEL: test_returning_interspersed_arg0
91 ; OPTM1: movups xmmword ptr [[LOC:.*]], xmm0 88 ; OPTM1: movups XMMWORD PTR [[LOC:.*]], xmm0
92 ; OPTM1: movups xmm0, xmmword ptr [[LOC]] 89 ; OPTM1: movups xmm0, XMMWORD PTR [[LOC]]
93 ; OPTM1: ret 90 ; OPTM1: ret
94 } 91 }
95 92
96 define <4 x float> @test_returning_interspersed_arg1(i32 %i32arg0, double %doubl earg0, <4 x float> %arg0, <4 x float> %arg1, i32 %i32arg1, <4 x float> %arg2, do uble %doublearg1, <4 x float> %arg3, i32 %i32arg2, double %doublearg2, float %fl oatarg0, <4 x float> %arg4, <4 x float> %arg5, float %floatarg1) { 93 define <4 x float> @test_returning_interspersed_arg1(i32 %i32arg0, double %doubl earg0, <4 x float> %arg0, <4 x float> %arg1, i32 %i32arg1, <4 x float> %arg2, do uble %doublearg1, <4 x float> %arg3, i32 %i32arg2, double %doublearg2, float %fl oatarg0, <4 x float> %arg4, <4 x float> %arg5, float %floatarg1) {
97 entry: 94 entry:
98 ret <4 x float> %arg1 95 ret <4 x float> %arg1
99 ; CHECK-LABEL: test_returning_interspersed_arg1: 96 ; CHECK-LABEL: test_returning_interspersed_arg1
100 ; CHECK: movups xmm0, xmm1 97 ; CHECK: movups xmm0,xmm1
101 ; CHECK: ret 98 ; CHECK: ret
102 99
103 ; OPTM1-LABEL: test_returning_interspersed_arg1: 100 ; OPTM1-LABEL: test_returning_interspersed_arg1
104 ; OPTM1: movups xmmword ptr [[LOC:.*]], xmm1 101 ; OPTM1: movups XMMWORD PTR [[LOC:.*]], xmm1
105 ; OPTM1: movups xmm0, xmmword ptr [[LOC]] 102 ; OPTM1: movups xmm0, XMMWORD PTR [[LOC]]
106 ; OPTM1: ret 103 ; OPTM1: ret
107 } 104 }
108 105
109 define <4 x float> @test_returning_interspersed_arg2(i32 %i32arg0, double %doubl earg0, <4 x float> %arg0, <4 x float> %arg1, i32 %i32arg1, <4 x float> %arg2, do uble %doublearg1, <4 x float> %arg3, i32 %i32arg2, double %doublearg2, float %fl oatarg0, <4 x float> %arg4, <4 x float> %arg5, float %floatarg1) { 106 define <4 x float> @test_returning_interspersed_arg2(i32 %i32arg0, double %doubl earg0, <4 x float> %arg0, <4 x float> %arg1, i32 %i32arg1, <4 x float> %arg2, do uble %doublearg1, <4 x float> %arg3, i32 %i32arg2, double %doublearg2, float %fl oatarg0, <4 x float> %arg4, <4 x float> %arg5, float %floatarg1) {
110 entry: 107 entry:
111 ret <4 x float> %arg2 108 ret <4 x float> %arg2
112 ; CHECK-LABEL: test_returning_interspersed_arg2: 109 ; CHECK-LABEL: test_returning_interspersed_arg2
113 ; CHECK: movups xmm0, xmm2 110 ; CHECK: movups xmm0,xmm2
114 ; CHECK: ret 111 ; CHECK: ret
115 112
116 ; OPTM1-LABEL: test_returning_interspersed_arg2: 113 ; OPTM1-LABEL: test_returning_interspersed_arg2
117 ; OPTM1: movups xmmword ptr [[LOC:.*]], xmm2 114 ; OPTM1: movups XMMWORD PTR [[LOC:.*]], xmm2
118 ; OPTM1: movups xmm0, xmmword ptr [[LOC]] 115 ; OPTM1: movups xmm0, XMMWORD PTR [[LOC]]
119 ; OPTM1: ret 116 ; OPTM1: ret
120 } 117 }
121 118
122 define <4 x float> @test_returning_interspersed_arg3(i32 %i32arg0, double %doubl earg0, <4 x float> %arg0, <4 x float> %arg1, i32 %i32arg1, <4 x float> %arg2, do uble %doublearg1, <4 x float> %arg3, i32 %i32arg2, double %doublearg2, float %fl oatarg0, <4 x float> %arg4, <4 x float> %arg5, float %floatarg1) { 119 define <4 x float> @test_returning_interspersed_arg3(i32 %i32arg0, double %doubl earg0, <4 x float> %arg0, <4 x float> %arg1, i32 %i32arg1, <4 x float> %arg2, do uble %doublearg1, <4 x float> %arg3, i32 %i32arg2, double %doublearg2, float %fl oatarg0, <4 x float> %arg4, <4 x float> %arg5, float %floatarg1) {
123 entry: 120 entry:
124 ret <4 x float> %arg3 121 ret <4 x float> %arg3
125 ; CHECK-LABEL: test_returning_interspersed_arg3: 122 ; CHECK-LABEL: test_returning_interspersed_arg3
126 ; CHECK: movups xmm0, xmm3 123 ; CHECK: movups xmm0,xmm3
127 ; CHECK: ret 124 ; CHECK: ret
128 125
129 ; OPTM1-LABEL: test_returning_interspersed_arg3: 126 ; OPTM1-LABEL: test_returning_interspersed_arg3
130 ; OPTM1: movups xmmword ptr [[LOC:.*]], xmm3 127 ; OPTM1: movups XMMWORD PTR [[LOC:.*]], xmm3
131 ; OPTM1: movups xmm0, xmmword ptr [[LOC]] 128 ; OPTM1: movups xmm0, XMMWORD PTR [[LOC]]
132 ; OPTM1: ret 129 ; OPTM1: ret
133 } 130 }
134 131
135 define <4 x float> @test_returning_interspersed_arg4(i32 %i32arg0, double %doubl earg0, <4 x float> %arg0, <4 x float> %arg1, i32 %i32arg1, <4 x float> %arg2, do uble %doublearg1, <4 x float> %arg3, i32 %i32arg2, double %doublearg2, float %fl oatarg0, <4 x float> %arg4, <4 x float> %arg5, float %floatarg1) { 132 define <4 x float> @test_returning_interspersed_arg4(i32 %i32arg0, double %doubl earg0, <4 x float> %arg0, <4 x float> %arg1, i32 %i32arg1, <4 x float> %arg2, do uble %doublearg1, <4 x float> %arg3, i32 %i32arg2, double %doublearg2, float %fl oatarg0, <4 x float> %arg4, <4 x float> %arg5, float %floatarg1) {
136 entry: 133 entry:
137 ret <4 x float> %arg4 134 ret <4 x float> %arg4
138 ; CHECK-LABEL: test_returning_interspersed_arg4: 135 ; CHECK-LABEL: test_returning_interspersed_arg4
139 ; CHECK: movups xmm0, xmmword ptr [esp + 52] 136 ; CHECK: movups xmm0,XMMWORD PTR [esp+52]
140 ; CHECK: ret 137 ; CHECK: ret
141 138
142 ; OPTM1-LABEL: test_returning_interspersed_arg4: 139 ; OPTM1-LABEL: test_returning_interspersed_arg4
143 ; OPTM1: movups xmm0, xmmword ptr {{.*}} 140 ; OPTM1: movups xmm0, XMMWORD PTR {{.*}}
144 ; OPTM1: ret 141 ; OPTM1: ret
145 } 142 }
146 143
147 ; Test that vectors are passed correctly as arguments to a function. 144 ; Test that vectors are passed correctly as arguments to a function.
148 145
149 declare void @VectorArgs(<4 x float>, <4 x float>, <4 x float>, <4 x float>, <4 x float>, <4 x float>) 146 declare void @VectorArgs(<4 x float>, <4 x float>, <4 x float>, <4 x float>, <4 x float>, <4 x float>)
150 147
151 declare void @killXmmRegisters() 148 declare void @killXmmRegisters()
152 149
153 define void @test_passing_vectors(<4 x float> %arg0, <4 x float> %arg1, <4 x flo at> %arg2, <4 x float> %arg3, <4 x float> %arg4, <4 x float> %arg5, <4 x float> %arg6, <4 x float> %arg7, <4 x float> %arg8, <4 x float> %arg9) { 150 define void @test_passing_vectors(<4 x float> %arg0, <4 x float> %arg1, <4 x flo at> %arg2, <4 x float> %arg3, <4 x float> %arg4, <4 x float> %arg5, <4 x float> %arg6, <4 x float> %arg7, <4 x float> %arg8, <4 x float> %arg9) {
154 entry: 151 entry:
155 ; Kills XMM registers so that no in-arg lowering code interferes 152 ; Kills XMM registers so that no in-arg lowering code interferes
156 ; with the test. 153 ; with the test.
157 call void @killXmmRegisters() 154 call void @killXmmRegisters()
158 call void @VectorArgs(<4 x float> %arg9, <4 x float> %arg8, <4 x float> %arg7, <4 x float> %arg6, <4 x float> %arg5, <4 x float> %arg4) 155 call void @VectorArgs(<4 x float> %arg9, <4 x float> %arg8, <4 x float> %arg7, <4 x float> %arg6, <4 x float> %arg5, <4 x float> %arg4)
159 ret void 156 ret void
160 ; CHECK-LABEL: test_passing_vectors: 157 ; CHECK-LABEL: test_passing_vectors
161 ; CHECK: sub esp, 32 158 ; CHECK: sub esp, 32
162 ; CHECK: movups [[ARG5:.*]], xmmword ptr [esp + 64] 159 ; CHECK: movups [[ARG5:.*]],XMMWORD PTR [esp+64]
163 ; CHECK: movups xmmword ptr [esp], [[ARG5]] 160 ; CHECK: movups XMMWORD PTR [esp],[[ARG5]]
164 ; CHECK: movups [[ARG6:.*]], xmmword ptr [esp + 48] 161 ; CHECK: movups [[ARG6:.*]],XMMWORD PTR [esp+48]
165 ; CHECK: movups xmmword ptr [esp + 16], [[ARG6]] 162 ; CHECK: movups XMMWORD PTR [esp+16],[[ARG6]]
166 ; CHECK: movups xmm0, xmmword ptr [esp + 128] 163 ; CHECK: movups xmm0,XMMWORD PTR [esp+128]
167 ; CHECK: movups xmm1, xmmword ptr [esp + 112] 164 ; CHECK: movups xmm1,XMMWORD PTR [esp+112]
168 ; CHECK: movups xmm2, xmmword ptr [esp + 96] 165 ; CHECK: movups xmm2,XMMWORD PTR [esp+96]
169 ; CHECK: movups xmm3, xmmword ptr [esp + 80] 166 ; CHECK: movups xmm3,XMMWORD PTR [esp+80]
170 ; CHECK: call VectorArgs 167 ; CHECK: call
168 ; CHECK-NEXT: R_{{.*}} VectorArgs
171 ; CHECK-NEXT: add esp, 32 169 ; CHECK-NEXT: add esp, 32
172 170
173 ; OPTM1-LABEL: test_passing_vectors: 171 ; OPTM1-LABEL: test_passing_vectors
174 ; OPTM1: sub esp, 32 172 ; OPTM1: sub esp, 32
175 ; OPTM1: movups [[ARG5:.*]], xmmword ptr {{.*}} 173 ; OPTM1: movups [[ARG5:.*]], XMMWORD PTR {{.*}}
176 ; OPTM1: movups xmmword ptr [esp], [[ARG5]] 174 ; OPTM1: movups XMMWORD PTR [esp], [[ARG5]]
177 ; OPTM1: movups [[ARG6:.*]], xmmword ptr {{.*}} 175 ; OPTM1: movups [[ARG6:.*]], XMMWORD PTR {{.*}}
178 ; OPTM1: movups xmmword ptr [esp + 16], [[ARG6]] 176 ; OPTM1: movups XMMWORD PTR [esp + 16], [[ARG6]]
179 ; OPTM1: movups xmm0, xmmword ptr {{.*}} 177 ; OPTM1: movups xmm0, XMMWORD PTR {{.*}}
180 ; OPTM1: movups xmm1, xmmword ptr {{.*}} 178 ; OPTM1: movups xmm1, XMMWORD PTR {{.*}}
181 ; OPTM1: movups xmm2, xmmword ptr {{.*}} 179 ; OPTM1: movups xmm2, XMMWORD PTR {{.*}}
182 ; OPTM1: movups xmm3, xmmword ptr {{.*}} 180 ; OPTM1: movups xmm3, XMMWORD PTR {{.*}}
183 ; OPTM1: call VectorArgs 181 ; OPTM1: call VectorArgs
184 ; OPTM1-NEXT: add esp, 32 182 ; OPTM1-NEXT: add esp, 32
185 } 183 }
186 184
187 declare void @InterspersedVectorArgs(<4 x float>, i64, <4 x float>, i64, <4 x fl oat>, float, <4 x float>, double, <4 x float>, i32, <4 x float>) 185 declare void @InterspersedVectorArgs(<4 x float>, i64, <4 x float>, i64, <4 x fl oat>, float, <4 x float>, double, <4 x float>, i32, <4 x float>)
188 186
189 define void @test_passing_vectors_interspersed(<4 x float> %arg0, <4 x float> %a rg1, <4 x float> %arg2, <4 x float> %arg3, <4 x float> %arg4, <4 x float> %arg5, <4 x float> %arg6, <4 x float> %arg7, <4 x float> %arg8, <4 x float> %arg9) { 187 define void @test_passing_vectors_interspersed(<4 x float> %arg0, <4 x float> %a rg1, <4 x float> %arg2, <4 x float> %arg3, <4 x float> %arg4, <4 x float> %arg5, <4 x float> %arg6, <4 x float> %arg7, <4 x float> %arg8, <4 x float> %arg9) {
190 entry: 188 entry:
191 ; Kills XMM registers so that no in-arg lowering code interferes 189 ; Kills XMM registers so that no in-arg lowering code interferes
192 ; with the test. 190 ; with the test.
193 call void @killXmmRegisters() 191 call void @killXmmRegisters()
194 call void @InterspersedVectorArgs(<4 x float> %arg9, i64 0, <4 x float> %arg8, i64 1, <4 x float> %arg7, float 2.000000e+00, <4 x float> %arg6, double 3.00000 0e+00, <4 x float> %arg5, i32 4, <4 x float> %arg4) 192 call void @InterspersedVectorArgs(<4 x float> %arg9, i64 0, <4 x float> %arg8, i64 1, <4 x float> %arg7, float 2.000000e+00, <4 x float> %arg6, double 3.00000 0e+00, <4 x float> %arg5, i32 4, <4 x float> %arg4)
195 ret void 193 ret void
196 ; CHECK-LABEL: test_passing_vectors_interspersed: 194 ; CHECK-LABEL: test_passing_vectors_interspersed
197 ; CHECK: sub esp, 80 195 ; CHECK: sub esp, 80
198 ; CHECK: movups [[ARG9:.*]], xmmword ptr [esp + 112] 196 ; CHECK: movups [[ARG9:.*]],XMMWORD PTR [esp+112]
199 ; CHECK: movups xmmword ptr [esp + 32], [[ARG9]] 197 ; CHECK: movups XMMWORD PTR [esp+32],[[ARG9]]
200 ; CHECK: movups [[ARG11:.*]], xmmword ptr [esp + 96] 198 ; CHECK: movups [[ARG11:.*]],XMMWORD PTR [esp+96]
201 ; CHECK: movups xmmword ptr [esp + 64], [[ARG11]] 199 ; CHECK: movups XMMWORD PTR [esp+64],[[ARG11]]
202 ; CHECK: movups xmm0, xmmword ptr [esp + 176] 200 ; CHECK: movups xmm0,XMMWORD PTR [esp+176]
203 ; CHECK: movups xmm1, xmmword ptr [esp + 160] 201 ; CHECK: movups xmm1,XMMWORD PTR [esp+160]
204 ; CHECK: movups xmm2, xmmword ptr [esp + 144] 202 ; CHECK: movups xmm2,XMMWORD PTR [esp+144]
205 ; CHECK: movups xmm3, xmmword ptr [esp + 128] 203 ; CHECK: movups xmm3,XMMWORD PTR [esp+128]
206 ; CHECK: call InterspersedVectorArgs 204 ; CHECK: call
205 ; CHECK-NEXT: R_{{.*}} InterspersedVectorArgs
207 ; CHECK-NEXT: add esp, 80 206 ; CHECK-NEXT: add esp, 80
208 ; CHECK: ret 207 ; CHECK: ret
209 208
210 ; OPTM1-LABEL: test_passing_vectors_interspersed: 209 ; OPTM1-LABEL: test_passing_vectors_interspersed
211 ; OPTM1: sub esp, 80 210 ; OPTM1: sub esp, 80
212 ; OPTM1: movups [[ARG9:.*]], xmmword ptr {{.*}} 211 ; OPTM1: movups [[ARG9:.*]], XMMWORD PTR {{.*}}
213 ; OPTM1: movups xmmword ptr [esp + 32], [[ARG9]] 212 ; OPTM1: movups XMMWORD PTR [esp + 32], [[ARG9]]
214 ; OPTM1: movups [[ARG11:.*]], xmmword ptr {{.*}} 213 ; OPTM1: movups [[ARG11:.*]], XMMWORD PTR {{.*}}
215 ; OPTM1: movups xmmword ptr [esp + 64], [[ARG11]] 214 ; OPTM1: movups XMMWORD PTR [esp + 64], [[ARG11]]
216 ; OPTM1: movups xmm0, xmmword ptr {{.*}} 215 ; OPTM1: movups xmm0, XMMWORD PTR {{.*}}
217 ; OPTM1: movups xmm1, xmmword ptr {{.*}} 216 ; OPTM1: movups xmm1, XMMWORD PTR {{.*}}
218 ; OPTM1: movups xmm2, xmmword ptr {{.*}} 217 ; OPTM1: movups xmm2, XMMWORD PTR {{.*}}
219 ; OPTM1: movups xmm3, xmmword ptr {{.*}} 218 ; OPTM1: movups xmm3, XMMWORD PTR {{.*}}
220 ; OPTM1: call InterspersedVectorArgs 219 ; OPTM1: call InterspersedVectorArgs
221 ; OPTM1-NEXT: add esp, 80 220 ; OPTM1-NEXT: add esp, 80
222 ; OPTM1: ret 221 ; OPTM1: ret
223 } 222 }
224 223
225 ; Test that a vector returned from a function is recognized to be in 224 ; Test that a vector returned from a function is recognized to be in
226 ; xmm0. 225 ; xmm0.
227 226
228 declare <4 x float> @VectorReturn(<4 x float> %arg0) 227 declare <4 x float> @VectorReturn(<4 x float> %arg0)
229 228
230 define void @test_receiving_vectors(<4 x float> %arg0) { 229 define void @test_receiving_vectors(<4 x float> %arg0) {
231 entry: 230 entry:
232 %result = call <4 x float> @VectorReturn(<4 x float> %arg0) 231 %result = call <4 x float> @VectorReturn(<4 x float> %arg0)
233 %result2 = call <4 x float> @VectorReturn(<4 x float> %result) 232 %result2 = call <4 x float> @VectorReturn(<4 x float> %result)
234 ret void 233 ret void
235 ; CHECK-LABEL: test_receiving_vectors: 234 ; CHECK-LABEL: test_receiving_vectors
236 ; CHECK: call VectorReturn 235 ; CHECK: call
236 ; CHECK-NEXT: R_{{.*}} VectorReturn
237 ; CHECK-NOT: movups xmm0 237 ; CHECK-NOT: movups xmm0
238 ; CHECK: call VectorReturn 238 ; CHECK: call
239 ; CHECK-NEXT: R_{{.*}} VectorReturn
239 ; CHECK: ret 240 ; CHECK: ret
240 241
241 ; OPTM1-LABEL: test_receiving_vectors: 242 ; OPTM1-LABEL: test_receiving_vectors
242 ; OPTM1: call VectorReturn 243 ; OPTM1: call VectorReturn
243 ; OPTM1: movups {{.*}}, xmm0 244 ; OPTM1: movups {{.*}}, xmm0
244 ; OPTM1: movups xmm0, {{.*}} 245 ; OPTM1: movups xmm0, {{.*}}
245 ; OPTM1: call VectorReturn 246 ; OPTM1: call VectorReturn
246 ; OPTM1: ret 247 ; OPTM1: ret
247 } 248 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698