John Thompson | 45c21ff | 2010-11-02 23:01:44 +0000 | [diff] [blame^] | 1 | ; RUN: llc < %s -march=x86 |
| 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" |
| 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 | |
| 12 | define void @single_R() nounwind { |
| 13 | entry: |
| 14 | %tmp = load 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 | |
| 20 | define void @single_q() nounwind { |
| 21 | entry: |
| 22 | %tmp = load 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 | |
| 28 | define void @single_Q() nounwind { |
| 29 | entry: |
| 30 | %tmp = load 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 | |
| 36 | define void @single_a() nounwind { |
| 37 | entry: |
| 38 | %tmp = load 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 | |
| 44 | define void @single_b() nounwind { |
| 45 | entry: |
| 46 | %tmp = load 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 | |
| 52 | define void @single_c() nounwind { |
| 53 | entry: |
| 54 | %tmp = load 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 | |
| 60 | define void @single_d() nounwind { |
| 61 | entry: |
| 62 | %tmp = load 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 | |
| 68 | define void @single_S() nounwind { |
| 69 | entry: |
| 70 | %tmp = load 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 | |
| 76 | define void @single_D() nounwind { |
| 77 | entry: |
| 78 | %tmp = load 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 | |
| 84 | define void @single_A() nounwind { |
| 85 | entry: |
| 86 | %tmp = load 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 | |
| 92 | define void @single_f() nounwind { |
| 93 | entry: |
| 94 | ret void |
| 95 | } |
| 96 | |
| 97 | define void @single_t() nounwind { |
| 98 | entry: |
| 99 | ret void |
| 100 | } |
| 101 | |
| 102 | define void @single_u() nounwind { |
| 103 | entry: |
| 104 | ret void |
| 105 | } |
| 106 | |
| 107 | define void @single_y() nounwind { |
| 108 | entry: |
| 109 | %tmp = load 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 | |
| 115 | define void @single_x() nounwind { |
| 116 | entry: |
| 117 | %tmp = load 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 | |
| 123 | define void @single_Y0() nounwind { |
| 124 | entry: |
| 125 | ret void |
| 126 | } |
| 127 | |
| 128 | define void @single_I() nounwind { |
| 129 | entry: |
| 130 | call void asm "foo $1,$0", "=*m,I,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind |
| 131 | ret void |
| 132 | } |
| 133 | |
| 134 | define void @single_J() nounwind { |
| 135 | entry: |
| 136 | call void asm "foo $1,$0", "=*m,J,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind |
| 137 | ret void |
| 138 | } |
| 139 | |
| 140 | define void @single_K() nounwind { |
| 141 | entry: |
| 142 | call void asm "foo $1,$0", "=*m,K,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind |
| 143 | ret void |
| 144 | } |
| 145 | |
| 146 | define void @single_L() nounwind { |
| 147 | entry: |
| 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 | |
| 153 | define void @single_M() nounwind { |
| 154 | entry: |
| 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 | |
| 160 | define void @single_N() nounwind { |
| 161 | entry: |
| 162 | call void asm "foo $1,$0", "=*m,N,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind |
| 163 | ret void |
| 164 | } |
| 165 | |
| 166 | define void @single_G() nounwind { |
| 167 | entry: |
| 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 | |
| 173 | define void @single_C() nounwind { |
| 174 | entry: |
| 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 | |
| 180 | define void @single_e() nounwind { |
| 181 | entry: |
| 182 | call void asm "foo $1,$0", "=*m,e,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind |
| 183 | ret void |
| 184 | } |
| 185 | |
| 186 | define void @single_Z() nounwind { |
| 187 | entry: |
| 188 | call void asm "foo $1,$0", "=*m,Z,~{dirflag},~{fpsr},~{flags}"(i32* @mout0, i32 1) nounwind |
| 189 | ret void |
| 190 | } |
| 191 | |
| 192 | define void @multi_R() nounwind { |
| 193 | entry: |
| 194 | %tmp = load 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 | |
| 199 | define void @multi_q() nounwind { |
| 200 | entry: |
| 201 | %tmp = load 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 | |
| 206 | define void @multi_Q() nounwind { |
| 207 | entry: |
| 208 | %tmp = load 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 | |
| 213 | define void @multi_a() nounwind { |
| 214 | entry: |
| 215 | %tmp = load 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 | |
| 220 | define void @multi_b() nounwind { |
| 221 | entry: |
| 222 | %tmp = load 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 | |
| 227 | define void @multi_c() nounwind { |
| 228 | entry: |
| 229 | %tmp = load 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 | |
| 234 | define void @multi_d() nounwind { |
| 235 | entry: |
| 236 | %tmp = load 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 | |
| 241 | define void @multi_S() nounwind { |
| 242 | entry: |
| 243 | %tmp = load 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 | |
| 248 | define void @multi_D() nounwind { |
| 249 | entry: |
| 250 | %tmp = load 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 | |
| 255 | define void @multi_A() nounwind { |
| 256 | entry: |
| 257 | %tmp = load 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 | |
| 262 | define void @multi_f() nounwind { |
| 263 | entry: |
| 264 | ret void |
| 265 | } |
| 266 | |
| 267 | define void @multi_t() nounwind { |
| 268 | entry: |
| 269 | ret void |
| 270 | } |
| 271 | |
| 272 | define void @multi_u() nounwind { |
| 273 | entry: |
| 274 | ret void |
| 275 | } |
| 276 | |
| 277 | define void @multi_y() nounwind { |
| 278 | entry: |
| 279 | %tmp = load 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 | |
| 284 | define void @multi_x() nounwind { |
| 285 | entry: |
| 286 | %tmp = load 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 | |
| 291 | define void @multi_Y0() nounwind { |
| 292 | entry: |
| 293 | ret void |
| 294 | } |
| 295 | |
| 296 | define void @multi_I() nounwind { |
| 297 | entry: |
| 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 | |
| 302 | define void @multi_J() nounwind { |
| 303 | entry: |
| 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 | |
| 308 | define void @multi_K() nounwind { |
| 309 | entry: |
| 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 | |
| 314 | define void @multi_L() nounwind { |
| 315 | entry: |
| 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 | |
| 321 | define void @multi_M() nounwind { |
| 322 | entry: |
| 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 | |
| 328 | define void @multi_N() nounwind { |
| 329 | entry: |
| 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 | |
| 334 | define void @multi_G() nounwind { |
| 335 | entry: |
| 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 | |
| 341 | define void @multi_C() nounwind { |
| 342 | entry: |
| 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 | |
| 348 | define void @multi_e() nounwind { |
| 349 | entry: |
| 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 | |
| 354 | define void @multi_Z() nounwind { |
| 355 | entry: |
| 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 | } |