1 ; RUN: llc < %s -mattr=+mmx,+sse2 -no-integrated-as
2 ; ModuleID = 'mult-alt-x86.c'
3 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f80:128:128-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32"
4 target triple = "i686-pc-win32"
6 @mout0 = common global i32 0, align 4
7 @min1 = common global i32 0, align 4
8 @dout0 = common global double 0.000000e+000, align 8
9 @din1 = common global double 0.000000e+000, align 8
10 @marray = common global [2 x i32] zeroinitializer, align 4
12 define void @single_R() nounwind {
14 %tmp = load i32, i32* @min1, align 4
15 %0 = call i32 asm "foo $1,$0", "=R,R,~{dirflag},~{fpsr},~{flags}"(i32 %tmp) nounwind
16 store i32 %0, i32* @mout0, align 4
20 define void @single_q() nounwind {
22 %tmp = load i32, i32* @min1, align 4
23 %0 = call i32 asm "foo $1,$0", "=q,q,~{dirflag},~{fpsr},~{flags}"(i32 %tmp) nounwind
24 store i32 %0, i32* @mout0, align 4
28 define void @single_Q() nounwind {
30 %tmp = load i32, i32* @min1, align 4
31 %0 = call i32 asm "foo $1,$0", "=Q,Q,~{dirflag},~{fpsr},~{flags}"(i32 %tmp) nounwind
32 store i32 %0, i32* @mout0, align 4
36 define void @single_a() nounwind {
38 %tmp = load i32, i32* @min1, align 4
39 %0 = call i32 asm "foo $1,$0", "={ax},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %tmp) nounwind
40 store i32 %0, i32* @mout0, align 4
44 define void @single_b() nounwind {
46 %tmp = load i32, i32* @min1, align 4
47 %0 = call i32 asm "foo $1,$0", "={bx},{bx},~{dirflag},~{fpsr},~{flags}"(i32 %tmp) nounwind
48 store i32 %0, i32* @mout0, align 4
52 define void @single_c() nounwind {
54 %tmp = load i32, i32* @min1, align 4
55 %0 = call i32 asm "foo $1,$0", "={cx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 %tmp) nounwind
56 store i32 %0, i32* @mout0, align 4
60 define void @single_d() nounwind {
62 %tmp = load i32, i32* @min1, align 4
63 %0 = call i32 asm "foo $1,$0", "={dx},{dx},~{dirflag},~{fpsr},~{flags}"(i32 %tmp) nounwind
64 store i32 %0, i32* @mout0, align 4
68 define void @single_S() nounwind {
70 %tmp = load i32, i32* @min1, align 4
71 %0 = call i32 asm "foo $1,$0", "={si},{si},~{dirflag},~{fpsr},~{flags}"(i32 %tmp) nounwind
72 store i32 %0, i32* @mout0, align 4
76 define void @single_D() nounwind {
78 %tmp = load i32, i32* @min1, align 4
79 %0 = call i32 asm "foo $1,$0", "={di},{di},~{dirflag},~{fpsr},~{flags}"(i32 %tmp) nounwind
80 store i32 %0, i32* @mout0, align 4
84 define void @single_A() nounwind {
86 %tmp = load i32, i32* @min1, align 4
87 %0 = call i32 asm "foo $1,$0", "=A,A,~{dirflag},~{fpsr},~{flags}"(i32 %tmp) nounwind
88 store i32 %0, i32* @mout0, align 4
92 define void @single_f() nounwind {
97 define void @single_t() nounwind {
102 define void @single_u() nounwind {
107 define void @single_y() nounwind {
109 %tmp = load double, double* @din1, align 8
110 %0 = call double asm "foo $1,$0", "=y,y,~{dirflag},~{fpsr},~{flags}"(double %tmp) nounwind
111 store double %0, double* @dout0, align 8
115 define void @single_x() nounwind {
117 %tmp = load double, double* @din1, align 8
118 %0 = call double asm "foo $1,$0", "=x,x,~{dirflag},~{fpsr},~{flags}"(double %tmp) nounwind
119 store double %0, double* @dout0, align 8
123 define void @single_Y0() nounwind {
128 define void @single_I() nounwind {
130 call void asm "foo $1,$0", "=*m,I,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind
134 define void @single_J() nounwind {
136 call void asm "foo $1,$0", "=*m,J,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind
140 define void @single_K() nounwind {
142 call void asm "foo $1,$0", "=*m,K,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind
146 define void @single_L() nounwind {
148 ; Missing lowering support for 'L'.
149 ; call void asm "foo $1,$0", "=*m,L,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind
153 define void @single_M() nounwind {
155 ; Missing lowering support for 'M'.
156 ; call void asm "foo $1,$0", "=*m,M,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind
160 define void @single_N() nounwind {
162 call void asm "foo $1,$0", "=*m,N,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind
166 define void @single_G() nounwind {
168 ; Missing lowering support for 'G'.
169 ; call void asm "foo $1,$0", "=*m,G,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, double 1.000000e+000) nounwind
173 define void @single_C() nounwind {
175 ; Missing lowering support for 'C'.
176 ; call void asm "foo $1,$0", "=*m,C,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, double 1.000000e+000) nounwind
180 define void @single_e() nounwind {
182 call void asm "foo $1,$0", "=*m,e,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind
186 define void @single_Z() nounwind {
188 call void asm "foo $1,$0", "=*m,Z,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind
192 define void @multi_R() nounwind {
194 %tmp = load i32, i32* @min1, align 4
195 call void asm "foo $1,$0", "=*r|R|m,r|R|m,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 %tmp) nounwind
199 define void @multi_q() nounwind {
201 %tmp = load i32, i32* @min1, align 4
202 call void asm "foo $1,$0", "=*r|q|m,r|q|m,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 %tmp) nounwind
206 define void @multi_Q() nounwind {
208 %tmp = load i32, i32* @min1, align 4
209 call void asm "foo $1,$0", "=*r|Q|m,r|Q|m,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 %tmp) nounwind
213 define void @multi_a() nounwind {
215 %tmp = load i32, i32* @min1, align 4
216 call void asm "foo $1,$0", "=*r|{ax}|m,r|{ax}|m,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 %tmp) nounwind
220 define void @multi_b() nounwind {
222 %tmp = load i32, i32* @min1, align 4
223 call void asm "foo $1,$0", "=*r|{bx}|m,r|{bx}|m,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 %tmp) nounwind
227 define void @multi_c() nounwind {
229 %tmp = load i32, i32* @min1, align 4
230 call void asm "foo $1,$0", "=*r|{cx}|m,r|{cx}|m,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 %tmp) nounwind
234 define void @multi_d() nounwind {
236 %tmp = load i32, i32* @min1, align 4
237 call void asm "foo $1,$0", "=*r|{dx}|m,r|{dx},~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 %tmp) nounwind
241 define void @multi_S() nounwind {
243 %tmp = load i32, i32* @min1, align 4
244 call void asm "foo $1,$0", "=*r|{si}|m,r|{si}|m,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 %tmp) nounwind
248 define void @multi_D() nounwind {
250 %tmp = load i32, i32* @min1, align 4
251 call void asm "foo $1,$0", "=*r|{di}|m,r|{di}|m,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 %tmp) nounwind
255 define void @multi_A() nounwind {
257 %tmp = load i32, i32* @min1, align 4
258 call void asm "foo $1,$0", "=*r|A|m,r|A|m,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 %tmp) nounwind
262 define void @multi_f() nounwind {
267 define void @multi_t() nounwind {
272 define void @multi_u() nounwind {
277 define void @multi_y() nounwind {
279 %tmp = load double, double* @din1, align 8
280 call void asm "foo $1,$0", "=*r|y|m,r|y|m,~{dirflag},~{fpsr},~{flags}"(double* @dout0, double %tmp) nounwind
284 define void @multi_x() nounwind {
286 %tmp = load double, double* @din1, align 8
287 call void asm "foo $1,$0", "=*r|x|m,r|x|m,~{dirflag},~{fpsr},~{flags}"(double* @dout0, double %tmp) nounwind
291 define void @multi_Y0() nounwind {
296 define void @multi_I() nounwind {
298 call void asm "foo $1,$0", "=*r|m|m,r|I|m,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind
302 define void @multi_J() nounwind {
304 call void asm "foo $1,$0", "=*r|m|m,r|J|m,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind
308 define void @multi_K() nounwind {
310 call void asm "foo $1,$0", "=*r|m|m,r|K|m,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind
314 define void @multi_L() nounwind {
316 ; Missing lowering support for 'L'.
317 ; call void asm "foo $1,$0", "=*r|m|m,r|L|m,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind
321 define void @multi_M() nounwind {
323 ; Missing lowering support for 'M'.
324 ; call void asm "foo $1,$0", "=*r|m|m,r|M|m,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind
328 define void @multi_N() nounwind {
330 call void asm "foo $1,$0", "=*r|m|m,r|N|m,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind
334 define void @multi_G() nounwind {
336 ; Missing lowering support for 'G'.
337 ; call void asm "foo $1,$0", "=*r|m|m,r|G|m,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, double 1.000000e+000) nounwind
341 define void @multi_C() nounwind {
343 ; Missing lowering support for 'C'.
344 ; call void asm "foo $1,$0", "=*r|m|m,r|C|m,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, double 1.000000e+000) nounwind
348 define void @multi_e() nounwind {
350 call void asm "foo $1,$0", "=*r|m|m,r|e|m,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind
354 define void @multi_Z() nounwind {
356 call void asm "foo $1,$0", "=*r|m|m,r|Z|m,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind