1; RUN: llc < %s -march=x86 -mattr=+mmx,+sse2 -no-integrated-as 2; ModuleID = 'mult-alt-x86.c' 3target 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" 4target triple = "i686-pc-win32" 5 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 11 12define void @single_R() nounwind { 13entry: 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 17 ret void 18} 19 20define void @single_q() nounwind { 21entry: 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 25 ret void 26} 27 28define void @single_Q() nounwind { 29entry: 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 33 ret void 34} 35 36define void @single_a() nounwind { 37entry: 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 41 ret void 42} 43 44define void @single_b() nounwind { 45entry: 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 49 ret void 50} 51 52define void @single_c() nounwind { 53entry: 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 57 ret void 58} 59 60define void @single_d() nounwind { 61entry: 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 65 ret void 66} 67 68define void @single_S() nounwind { 69entry: 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 73 ret void 74} 75 76define void @single_D() nounwind { 77entry: 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 81 ret void 82} 83 84define void @single_A() nounwind { 85entry: 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 89 ret void 90} 91 92define void @single_f() nounwind { 93entry: 94 ret void 95} 96 97define void @single_t() nounwind { 98entry: 99 ret void 100} 101 102define void @single_u() nounwind { 103entry: 104 ret void 105} 106 107define void @single_y() nounwind { 108entry: 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 112 ret void 113} 114 115define void @single_x() nounwind { 116entry: 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 120 ret void 121} 122 123define void @single_Y0() nounwind { 124entry: 125 ret void 126} 127 128define void @single_I() nounwind { 129entry: 130 call void asm "foo $1,$0", "=*m,I,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind 131 ret void 132} 133 134define void @single_J() nounwind { 135entry: 136 call void asm "foo $1,$0", "=*m,J,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind 137 ret void 138} 139 140define void @single_K() nounwind { 141entry: 142 call void asm "foo $1,$0", "=*m,K,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind 143 ret void 144} 145 146define void @single_L() nounwind { 147entry: 148; Missing lowering support for 'L'. 149; call void asm "foo $1,$0", "=*m,L,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind 150 ret void 151} 152 153define void @single_M() nounwind { 154entry: 155; Missing lowering support for 'M'. 156; call void asm "foo $1,$0", "=*m,M,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind 157 ret void 158} 159 160define void @single_N() nounwind { 161entry: 162 call void asm "foo $1,$0", "=*m,N,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind 163 ret void 164} 165 166define void @single_G() nounwind { 167entry: 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 170 ret void 171} 172 173define void @single_C() nounwind { 174entry: 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 177 ret void 178} 179 180define void @single_e() nounwind { 181entry: 182 call void asm "foo $1,$0", "=*m,e,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind 183 ret void 184} 185 186define void @single_Z() nounwind { 187entry: 188 call void asm "foo $1,$0", "=*m,Z,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind 189 ret void 190} 191 192define void @multi_R() nounwind { 193entry: 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 196 ret void 197} 198 199define void @multi_q() nounwind { 200entry: 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 203 ret void 204} 205 206define void @multi_Q() nounwind { 207entry: 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 210 ret void 211} 212 213define void @multi_a() nounwind { 214entry: 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 217 ret void 218} 219 220define void @multi_b() nounwind { 221entry: 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 224 ret void 225} 226 227define void @multi_c() nounwind { 228entry: 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 231 ret void 232} 233 234define void @multi_d() nounwind { 235entry: 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 238 ret void 239} 240 241define void @multi_S() nounwind { 242entry: 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 245 ret void 246} 247 248define void @multi_D() nounwind { 249entry: 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 252 ret void 253} 254 255define void @multi_A() nounwind { 256entry: 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 259 ret void 260} 261 262define void @multi_f() nounwind { 263entry: 264 ret void 265} 266 267define void @multi_t() nounwind { 268entry: 269 ret void 270} 271 272define void @multi_u() nounwind { 273entry: 274 ret void 275} 276 277define void @multi_y() nounwind { 278entry: 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 281 ret void 282} 283 284define void @multi_x() nounwind { 285entry: 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 288 ret void 289} 290 291define void @multi_Y0() nounwind { 292entry: 293 ret void 294} 295 296define void @multi_I() nounwind { 297entry: 298 call void asm "foo $1,$0", "=*r|m|m,r|I|m,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind 299 ret void 300} 301 302define void @multi_J() nounwind { 303entry: 304 call void asm "foo $1,$0", "=*r|m|m,r|J|m,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind 305 ret void 306} 307 308define void @multi_K() nounwind { 309entry: 310 call void asm "foo $1,$0", "=*r|m|m,r|K|m,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind 311 ret void 312} 313 314define void @multi_L() nounwind { 315entry: 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 318 ret void 319} 320 321define void @multi_M() nounwind { 322entry: 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 325 ret void 326} 327 328define void @multi_N() nounwind { 329entry: 330 call void asm "foo $1,$0", "=*r|m|m,r|N|m,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind 331 ret void 332} 333 334define void @multi_G() nounwind { 335entry: 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 338 ret void 339} 340 341define void @multi_C() nounwind { 342entry: 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 345 ret void 346} 347 348define void @multi_e() nounwind { 349entry: 350 call void asm "foo $1,$0", "=*r|m|m,r|e|m,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind 351 ret void 352} 353 354define void @multi_Z() nounwind { 355entry: 356 call void asm "foo $1,$0", "=*r|m|m,r|Z|m,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind 357 ret void 358} 359