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

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

Issue 1387963002: Make sure that all globals are internal, except for "start" functions. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix new tests. Created 5 years, 2 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
« no previous file with comments | « tests_lit/llvm2ice_tests/vector-align.ll ('k') | tests_lit/llvm2ice_tests/vector-arith.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 --filetype=obj --disassemble --args -O2 \ 4 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 \
5 ; RUN: | FileCheck %s 5 ; RUN: -allow-externally-defined-symbols | FileCheck %s
6 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 \ 6 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 \
7 ; RUN: | FileCheck --check-prefix=OPTM1 %s 7 ; RUN: -allow-externally-defined-symbols | FileCheck --check-prefix=OPTM1 %s
8 8
9 ; The first five functions test that vectors are moved from their 9 ; The first five functions test that vectors are moved from their
10 ; correct argument location to xmm0. 10 ; correct argument location to xmm0.
11 11
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) { 12 define internal <4 x float> @test_returning_arg0(
13 <4 x float> %arg0, <4 x float> %arg1, <4 x float> %arg2, <4 x float> %arg3,
14 <4 x float> %arg4, <4 x float> %arg5) {
13 entry: 15 entry:
14 ret <4 x float> %arg0 16 ret <4 x float> %arg0
15 ; CHECK-LABEL: test_returning_arg0 17 ; CHECK-LABEL: test_returning_arg0
16 ; CHECK-NOT: mov 18 ; CHECK-NOT: mov
17 ; CHECK: ret 19 ; CHECK: ret
18 20
19 ; OPTM1-LABEL: test_returning_arg0 21 ; OPTM1-LABEL: test_returning_arg0
20 ; OPTM1: movups XMMWORD PTR [[LOC:.*]],xmm0 22 ; OPTM1: movups XMMWORD PTR [[LOC:.*]],xmm0
21 ; OPTM1: movups xmm0,XMMWORD PTR [[LOC]] 23 ; OPTM1: movups xmm0,XMMWORD PTR [[LOC]]
22 ; OPTM1: ret 24 ; OPTM1: ret
23 } 25 }
24 26
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) { 27 define internal <4 x float> @test_returning_arg1(
28 <4 x float> %arg0, <4 x float> %arg1, <4 x float> %arg2, <4 x float> %arg3,
29 <4 x float> %arg4, <4 x float> %arg5) {
26 entry: 30 entry:
27 ret <4 x float> %arg1 31 ret <4 x float> %arg1
28 ; CHECK-LABEL: test_returning_arg1 32 ; CHECK-LABEL: test_returning_arg1
29 ; CHECK: movups xmm0,xmm1 33 ; CHECK: movups xmm0,xmm1
30 ; CHECK: ret 34 ; CHECK: ret
31 35
32 ; OPTM1-LABEL: test_returning_arg1 36 ; OPTM1-LABEL: test_returning_arg1
33 ; OPTM1: movups XMMWORD PTR [[LOC:.*]],xmm1 37 ; OPTM1: movups XMMWORD PTR [[LOC:.*]],xmm1
34 ; OPTM1: movups xmm0,XMMWORD PTR [[LOC]] 38 ; OPTM1: movups xmm0,XMMWORD PTR [[LOC]]
35 ; OPTM1: ret 39 ; OPTM1: ret
36 } 40 }
37 41
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 define internal <4 x float> @test_returning_arg2(
43 <4 x float> %arg0, <4 x float> %arg1, <4 x float> %arg2, <4 x float> %arg3,
44 <4 x float> %arg4, <4 x float> %arg5) {
39 entry: 45 entry:
40 ret <4 x float> %arg2 46 ret <4 x float> %arg2
41 ; CHECK-LABEL: test_returning_arg2 47 ; CHECK-LABEL: test_returning_arg2
42 ; CHECK: movups xmm0,xmm2 48 ; CHECK: movups xmm0,xmm2
43 ; CHECK: ret 49 ; CHECK: ret
44 50
45 ; OPTM1-LABEL: test_returning_arg2 51 ; OPTM1-LABEL: test_returning_arg2
46 ; OPTM1: movups XMMWORD PTR [[LOC:.*]],xmm2 52 ; OPTM1: movups XMMWORD PTR [[LOC:.*]],xmm2
47 ; OPTM1: movups xmm0,XMMWORD PTR [[LOC]] 53 ; OPTM1: movups xmm0,XMMWORD PTR [[LOC]]
48 ; OPTM1: ret 54 ; OPTM1: ret
49 } 55 }
50 56
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) { 57 define internal <4 x float> @test_returning_arg3(
58 <4 x float> %arg0, <4 x float> %arg1, <4 x float> %arg2, <4 x float> %arg3,
59 <4 x float> %arg4, <4 x float> %arg5) {
52 entry: 60 entry:
53 ret <4 x float> %arg3 61 ret <4 x float> %arg3
54 ; CHECK-LABEL: test_returning_arg3 62 ; CHECK-LABEL: test_returning_arg3
55 ; CHECK: movups xmm0,xmm3 63 ; CHECK: movups xmm0,xmm3
56 ; CHECK: ret 64 ; CHECK: ret
57 65
58 ; OPTM1-LABEL: test_returning_arg3 66 ; OPTM1-LABEL: test_returning_arg3
59 ; OPTM1: movups XMMWORD PTR [[LOC:.*]],xmm3 67 ; OPTM1: movups XMMWORD PTR [[LOC:.*]],xmm3
60 ; OPTM1: movups xmm0,XMMWORD PTR [[LOC]] 68 ; OPTM1: movups xmm0,XMMWORD PTR [[LOC]]
61 ; OPTM1: ret 69 ; OPTM1: ret
62 } 70 }
63 71
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) { 72 define internal <4 x float> @test_returning_arg4(
73 <4 x float> %arg0, <4 x float> %arg1, <4 x float> %arg2, <4 x float> %arg3,
74 <4 x float> %arg4, <4 x float> %arg5) {
65 entry: 75 entry:
66 ret <4 x float> %arg4 76 ret <4 x float> %arg4
67 ; CHECK-LABEL: test_returning_arg4 77 ; CHECK-LABEL: test_returning_arg4
68 ; CHECK: movups xmm0,XMMWORD PTR [esp+0x4] 78 ; CHECK: movups xmm0,XMMWORD PTR [esp+0x4]
69 ; CHECK: ret 79 ; CHECK: ret
70 80
71 ; OPTM1-LABEL: test_returning_arg4 81 ; OPTM1-LABEL: test_returning_arg4
72 ; OPTM1: movups xmm0,XMMWORD PTR {{.*}} 82 ; OPTM1: movups xmm0,XMMWORD PTR {{.*}}
73 ; OPTM1: ret 83 ; OPTM1: ret
74 } 84 }
75 85
76 ; The next five functions check that xmm arguments are handled 86 ; The next five functions check that xmm arguments are handled
77 ; correctly when interspersed with stack arguments in the argument 87 ; correctly when interspersed with stack arguments in the argument
78 ; list. 88 ; list.
79 89
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) { 90 define internal <4 x float> @test_returning_interspersed_arg0(
91 i32 %i32arg0, double %doublearg0, <4 x float> %arg0, <4 x float> %arg1,
92 i32 %i32arg1, <4 x float> %arg2, double %doublearg1, <4 x float> %arg3,
93 i32 %i32arg2, double %doublearg2, float %floatarg0, <4 x float> %arg4,
94 <4 x float> %arg5, float %floatarg1) {
81 entry: 95 entry:
82 ret <4 x float> %arg0 96 ret <4 x float> %arg0
83 ; CHECK-LABEL: test_returning_interspersed_arg0 97 ; CHECK-LABEL: test_returning_interspersed_arg0
84 ; CHECK-NOT: mov 98 ; CHECK-NOT: mov
85 ; CHECK: ret 99 ; CHECK: ret
86 100
87 ; OPTM1-LABEL: test_returning_interspersed_arg0 101 ; OPTM1-LABEL: test_returning_interspersed_arg0
88 ; OPTM1: movups XMMWORD PTR [[LOC:.*]],xmm0 102 ; OPTM1: movups XMMWORD PTR [[LOC:.*]],xmm0
89 ; OPTM1: movups xmm0,XMMWORD PTR [[LOC]] 103 ; OPTM1: movups xmm0,XMMWORD PTR [[LOC]]
90 ; OPTM1: ret 104 ; OPTM1: ret
91 } 105 }
92 106
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) { 107 define internal <4 x float> @test_returning_interspersed_arg1(
108 i32 %i32arg0, double %doublearg0, <4 x float> %arg0, <4 x float> %arg1,
109 i32 %i32arg1, <4 x float> %arg2, double %doublearg1, <4 x float> %arg3,
110 i32 %i32arg2, double %doublearg2, float %floatarg0, <4 x float> %arg4,
111 <4 x float> %arg5, float %floatarg1) {
94 entry: 112 entry:
95 ret <4 x float> %arg1 113 ret <4 x float> %arg1
96 ; CHECK-LABEL: test_returning_interspersed_arg1 114 ; CHECK-LABEL: test_returning_interspersed_arg1
97 ; CHECK: movups xmm0,xmm1 115 ; CHECK: movups xmm0,xmm1
98 ; CHECK: ret 116 ; CHECK: ret
99 117
100 ; OPTM1-LABEL: test_returning_interspersed_arg1 118 ; OPTM1-LABEL: test_returning_interspersed_arg1
101 ; OPTM1: movups XMMWORD PTR [[LOC:.*]],xmm1 119 ; OPTM1: movups XMMWORD PTR [[LOC:.*]],xmm1
102 ; OPTM1: movups xmm0,XMMWORD PTR [[LOC]] 120 ; OPTM1: movups xmm0,XMMWORD PTR [[LOC]]
103 ; OPTM1: ret 121 ; OPTM1: ret
104 } 122 }
105 123
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) { 124 define internal <4 x float> @test_returning_interspersed_arg2(
125 i32 %i32arg0, double %doublearg0, <4 x float> %arg0, <4 x float> %arg1,
126 i32 %i32arg1, <4 x float> %arg2, double %doublearg1, <4 x float> %arg3,
127 i32 %i32arg2, double %doublearg2, float %floatarg0, <4 x float> %arg4,
128 <4 x float> %arg5, float %floatarg1) {
107 entry: 129 entry:
108 ret <4 x float> %arg2 130 ret <4 x float> %arg2
109 ; CHECK-LABEL: test_returning_interspersed_arg2 131 ; CHECK-LABEL: test_returning_interspersed_arg2
110 ; CHECK: movups xmm0,xmm2 132 ; CHECK: movups xmm0,xmm2
111 ; CHECK: ret 133 ; CHECK: ret
112 134
113 ; OPTM1-LABEL: test_returning_interspersed_arg2 135 ; OPTM1-LABEL: test_returning_interspersed_arg2
114 ; OPTM1: movups XMMWORD PTR [[LOC:.*]],xmm2 136 ; OPTM1: movups XMMWORD PTR [[LOC:.*]],xmm2
115 ; OPTM1: movups xmm0,XMMWORD PTR [[LOC]] 137 ; OPTM1: movups xmm0,XMMWORD PTR [[LOC]]
116 ; OPTM1: ret 138 ; OPTM1: ret
117 } 139 }
118 140
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) { 141 define internal <4 x float> @test_returning_interspersed_arg3(
142 i32 %i32arg0, double %doublearg0, <4 x float> %arg0, <4 x float> %arg1,
143 i32 %i32arg1, <4 x float> %arg2, double %doublearg1, <4 x float> %arg3,
144 i32 %i32arg2, double %doublearg2, float %floatarg0, <4 x float> %arg4,
145 <4 x float> %arg5, float %floatarg1) {
120 entry: 146 entry:
121 ret <4 x float> %arg3 147 ret <4 x float> %arg3
122 ; CHECK-LABEL: test_returning_interspersed_arg3 148 ; CHECK-LABEL: test_returning_interspersed_arg3
123 ; CHECK: movups xmm0,xmm3 149 ; CHECK: movups xmm0,xmm3
124 ; CHECK: ret 150 ; CHECK: ret
125 151
126 ; OPTM1-LABEL: test_returning_interspersed_arg3 152 ; OPTM1-LABEL: test_returning_interspersed_arg3
127 ; OPTM1: movups XMMWORD PTR [[LOC:.*]],xmm3 153 ; OPTM1: movups XMMWORD PTR [[LOC:.*]],xmm3
128 ; OPTM1: movups xmm0,XMMWORD PTR [[LOC]] 154 ; OPTM1: movups xmm0,XMMWORD PTR [[LOC]]
129 ; OPTM1: ret 155 ; OPTM1: ret
130 } 156 }
131 157
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) { 158 define internal <4 x float> @test_returning_interspersed_arg4(
159 i32 %i32arg0, double %doublearg0, <4 x float> %arg0, <4 x float> %arg1,
160 i32 %i32arg1, <4 x float> %arg2, double %doublearg1, <4 x float> %arg3,
161 i32 %i32arg2, double %doublearg2, float %floatarg0, <4 x float> %arg4,
162 <4 x float> %arg5, float %floatarg1) {
133 entry: 163 entry:
134 ret <4 x float> %arg4 164 ret <4 x float> %arg4
135 ; CHECK-LABEL: test_returning_interspersed_arg4 165 ; CHECK-LABEL: test_returning_interspersed_arg4
136 ; CHECK: movups xmm0,XMMWORD PTR [esp+0x34] 166 ; CHECK: movups xmm0,XMMWORD PTR [esp+0x34]
137 ; CHECK: ret 167 ; CHECK: ret
138 168
139 ; OPTM1-LABEL: test_returning_interspersed_arg4 169 ; OPTM1-LABEL: test_returning_interspersed_arg4
140 ; OPTM1: movups xmm0,XMMWORD PTR {{.*}} 170 ; OPTM1: movups xmm0,XMMWORD PTR {{.*}}
141 ; OPTM1: ret 171 ; OPTM1: ret
142 } 172 }
143 173
144 ; Test that vectors are passed correctly as arguments to a function. 174 ; Test that vectors are passed correctly as arguments to a function.
145 175
146 declare void @VectorArgs(<4 x float>, <4 x float>, <4 x float>, <4 x float>, <4 x float>, <4 x float>) 176 declare void @VectorArgs(<4 x float>, <4 x float>, <4 x float>, <4 x float>,
177 <4 x float>, <4 x float>)
147 178
148 declare void @killXmmRegisters() 179 declare void @killXmmRegisters()
149 180
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) { 181 define internal void @test_passing_vectors(
182 <4 x float> %arg0, <4 x float> %arg1, <4 x float> %arg2, <4 x float> %arg3,
183 <4 x float> %arg4, <4 x float> %arg5, <4 x float> %arg6, <4 x float> %arg7,
184 <4 x float> %arg8, <4 x float> %arg9) {
151 entry: 185 entry:
152 ; Kills XMM registers so that no in-arg lowering code interferes 186 ; Kills XMM registers so that no in-arg lowering code interferes
153 ; with the test. 187 ; with the test.
154 call void @killXmmRegisters() 188 call void @killXmmRegisters()
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) 189 call void @VectorArgs(<4 x float> %arg9, <4 x float> %arg8, <4 x float> %arg7,
190 <4 x float> %arg6, <4 x float> %arg5, <4 x float> %arg4)
156 ret void 191 ret void
157 ; CHECK-LABEL: test_passing_vectors 192 ; CHECK-LABEL: test_passing_vectors
158 ; CHECK: sub esp,0x20 193 ; CHECK: sub esp,0x20
159 ; CHECK: movups [[ARG5:.*]],XMMWORD PTR [esp+0x40] 194 ; CHECK: movups [[ARG5:.*]],XMMWORD PTR [esp+0x40]
160 ; CHECK: movups XMMWORD PTR [esp],[[ARG5]] 195 ; CHECK: movups XMMWORD PTR [esp],[[ARG5]]
161 ; CHECK: movups [[ARG6:.*]],XMMWORD PTR [esp+0x30] 196 ; CHECK: movups [[ARG6:.*]],XMMWORD PTR [esp+0x30]
162 ; CHECK: movups XMMWORD PTR [esp+0x10],[[ARG6]] 197 ; CHECK: movups XMMWORD PTR [esp+0x10],[[ARG6]]
163 ; CHECK: movups xmm0,XMMWORD PTR [esp+0x80] 198 ; CHECK: movups xmm0,XMMWORD PTR [esp+0x80]
164 ; CHECK: movups xmm1,XMMWORD PTR [esp+0x70] 199 ; CHECK: movups xmm1,XMMWORD PTR [esp+0x70]
165 ; CHECK: movups xmm2,XMMWORD PTR [esp+0x60] 200 ; CHECK: movups xmm2,XMMWORD PTR [esp+0x60]
166 ; CHECK: movups xmm3,XMMWORD PTR [esp+0x50] 201 ; CHECK: movups xmm3,XMMWORD PTR [esp+0x50]
167 ; CHECK: call {{.*}} R_{{.*}} VectorArgs 202 ; CHECK: call {{.*}} R_{{.*}} VectorArgs
168 ; CHECK-NEXT: add esp,0x20 203 ; CHECK-NEXT: add esp,0x20
169 204
170 ; OPTM1-LABEL: test_passing_vectors 205 ; OPTM1-LABEL: test_passing_vectors
171 ; OPTM1: sub esp,0x20 206 ; OPTM1: sub esp,0x20
172 ; OPTM1: movups [[ARG5:.*]],XMMWORD PTR {{.*}} 207 ; OPTM1: movups [[ARG5:.*]],XMMWORD PTR {{.*}}
173 ; OPTM1: movups XMMWORD PTR [esp],[[ARG5]] 208 ; OPTM1: movups XMMWORD PTR [esp],[[ARG5]]
174 ; OPTM1: movups [[ARG6:.*]],XMMWORD PTR {{.*}} 209 ; OPTM1: movups [[ARG6:.*]],XMMWORD PTR {{.*}}
175 ; OPTM1: movups XMMWORD PTR [esp+0x10],[[ARG6]] 210 ; OPTM1: movups XMMWORD PTR [esp+0x10],[[ARG6]]
176 ; OPTM1: movups xmm0,XMMWORD PTR {{.*}} 211 ; OPTM1: movups xmm0,XMMWORD PTR {{.*}}
177 ; OPTM1: movups xmm1,XMMWORD PTR {{.*}} 212 ; OPTM1: movups xmm1,XMMWORD PTR {{.*}}
178 ; OPTM1: movups xmm2,XMMWORD PTR {{.*}} 213 ; OPTM1: movups xmm2,XMMWORD PTR {{.*}}
179 ; OPTM1: movups xmm3,XMMWORD PTR {{.*}} 214 ; OPTM1: movups xmm3,XMMWORD PTR {{.*}}
180 ; OPTM1: call {{.*}} R_{{.*}} VectorArgs 215 ; OPTM1: call {{.*}} R_{{.*}} VectorArgs
181 ; OPTM1-NEXT: add esp,0x20 216 ; OPTM1-NEXT: add esp,0x20
182 } 217 }
183 218
184 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>) 219 declare void @InterspersedVectorArgs(
220 <4 x float>, i64, <4 x float>, i64, <4 x float>, float, <4 x float>,
221 double, <4 x float>, i32, <4 x float>)
185 222
186 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) { 223 define internal void @test_passing_vectors_interspersed(
224 <4 x float> %arg0, <4 x float> %arg1, <4 x float> %arg2, <4 x float> %arg3,
225 <4 x float> %arg4, <4 x float> %arg5, <4 x float> %arg6, <4 x float> %arg7,
226 <4 x float> %arg8, <4 x float> %arg9) {
187 entry: 227 entry:
188 ; Kills XMM registers so that no in-arg lowering code interferes 228 ; Kills XMM registers so that no in-arg lowering code interferes
189 ; with the test. 229 ; with the test.
190 call void @killXmmRegisters() 230 call void @killXmmRegisters()
191 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) 231 call void @InterspersedVectorArgs(<4 x float> %arg9, i64 0, <4 x float> %arg8,
232 i64 1, <4 x float> %arg7, float 2.000000e+00 ,
233 <4 x float> %arg6, double 3.000000e+00,
234 <4 x float> %arg5, i32 4, <4 x float> %arg4)
192 ret void 235 ret void
193 ; CHECK-LABEL: test_passing_vectors_interspersed 236 ; CHECK-LABEL: test_passing_vectors_interspersed
194 ; CHECK: sub esp,0x50 237 ; CHECK: sub esp,0x50
195 ; CHECK: movups [[ARG9:.*]],XMMWORD PTR [esp+0x70] 238 ; CHECK: movups [[ARG9:.*]],XMMWORD PTR [esp+0x70]
196 ; CHECK: movups XMMWORD PTR [esp+0x20],[[ARG9]] 239 ; CHECK: movups XMMWORD PTR [esp+0x20],[[ARG9]]
197 ; CHECK: movups [[ARG11:.*]],XMMWORD PTR [esp+0x60] 240 ; CHECK: movups [[ARG11:.*]],XMMWORD PTR [esp+0x60]
198 ; CHECK: movups XMMWORD PTR [esp+0x40],[[ARG11]] 241 ; CHECK: movups XMMWORD PTR [esp+0x40],[[ARG11]]
199 ; CHECK: movups xmm0,XMMWORD PTR [esp+0xb0] 242 ; CHECK: movups xmm0,XMMWORD PTR [esp+0xb0]
200 ; CHECK: movups xmm1,XMMWORD PTR [esp+0xa0] 243 ; CHECK: movups xmm1,XMMWORD PTR [esp+0xa0]
201 ; CHECK: movups xmm2,XMMWORD PTR [esp+0x90] 244 ; CHECK: movups xmm2,XMMWORD PTR [esp+0x90]
(...skipping 15 matching lines...) Expand all
217 ; OPTM1: call {{.*}} R_{{.*}} InterspersedVectorArgs 260 ; OPTM1: call {{.*}} R_{{.*}} InterspersedVectorArgs
218 ; OPTM1-NEXT: add esp,0x50 261 ; OPTM1-NEXT: add esp,0x50
219 ; OPTM1: ret 262 ; OPTM1: ret
220 } 263 }
221 264
222 ; Test that a vector returned from a function is recognized to be in 265 ; Test that a vector returned from a function is recognized to be in
223 ; xmm0. 266 ; xmm0.
224 267
225 declare <4 x float> @VectorReturn(<4 x float> %arg0) 268 declare <4 x float> @VectorReturn(<4 x float> %arg0)
226 269
227 define void @test_receiving_vectors(<4 x float> %arg0) { 270 define internal void @test_receiving_vectors(<4 x float> %arg0) {
228 entry: 271 entry:
229 %result = call <4 x float> @VectorReturn(<4 x float> %arg0) 272 %result = call <4 x float> @VectorReturn(<4 x float> %arg0)
230 %result2 = call <4 x float> @VectorReturn(<4 x float> %result) 273 %result2 = call <4 x float> @VectorReturn(<4 x float> %result)
231 ret void 274 ret void
232 ; CHECK-LABEL: test_receiving_vectors 275 ; CHECK-LABEL: test_receiving_vectors
233 ; CHECK: call {{.*}} R_{{.*}} VectorReturn 276 ; CHECK: call {{.*}} R_{{.*}} VectorReturn
234 ; CHECK-NOT: movups xmm0 277 ; CHECK-NOT: movups xmm0
235 ; CHECK: call {{.*}} R_{{.*}} VectorReturn 278 ; CHECK: call {{.*}} R_{{.*}} VectorReturn
236 ; CHECK: ret 279 ; CHECK: ret
237 280
238 ; OPTM1-LABEL: test_receiving_vectors 281 ; OPTM1-LABEL: test_receiving_vectors
239 ; OPTM1: call {{.*}} R_{{.*}} VectorReturn 282 ; OPTM1: call {{.*}} R_{{.*}} VectorReturn
240 ; OPTM1: movups {{.*}},xmm0 283 ; OPTM1: movups {{.*}},xmm0
241 ; OPTM1: movups xmm0,{{.*}} 284 ; OPTM1: movups xmm0,{{.*}}
242 ; OPTM1: call {{.*}} R_{{.*}} VectorReturn 285 ; OPTM1: call {{.*}} R_{{.*}} VectorReturn
243 ; OPTM1: ret 286 ; OPTM1: ret
244 } 287 }
OLDNEW
« no previous file with comments | « tests_lit/llvm2ice_tests/vector-align.ll ('k') | tests_lit/llvm2ice_tests/vector-arith.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698