1; RUN: llc < %s -march=arm -no-integrated-as 2; ModuleID = 'mult-alt-generic.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-v64:64:64-v128:128:128-a0:0:64-n32" 4target triple = "arm" 5 6@mout0 = common global i32 0, align 4 7@min1 = common global i32 0, align 4 8@marray = common global [2 x i32] zeroinitializer, align 4 9 10define arm_aapcscc void @single_m() nounwind { 11entry: 12 call void asm "foo $1,$0", "=*m,*m"(i32* @mout0, i32* @min1) nounwind 13 ret void 14} 15 16define arm_aapcscc void @single_o() nounwind { 17entry: 18 %out0 = alloca i32, align 4 19 %index = alloca i32, align 4 20 store i32 0, i32* %out0, align 4 21 store i32 1, i32* %index, align 4 22 ret void 23} 24 25define arm_aapcscc void @single_V() nounwind { 26entry: 27 ret void 28} 29 30define arm_aapcscc void @single_lt() nounwind { 31entry: 32 %out0 = alloca i32, align 4 33 %in1 = alloca i32, align 4 34 store i32 0, i32* %out0, align 4 35 store i32 1, i32* %in1, align 4 36 %tmp = load i32, i32* %in1, align 4 37 %0 = call i32 asm "foo $1,$0", "=r,<r"(i32 %tmp) nounwind 38 store i32 %0, i32* %out0, align 4 39 %tmp1 = load i32, i32* %in1, align 4 40 %1 = call i32 asm "foo $1,$0", "=r,r<"(i32 %tmp1) nounwind 41 store i32 %1, i32* %out0, align 4 42 ret void 43} 44 45define arm_aapcscc void @single_gt() nounwind { 46entry: 47 %out0 = alloca i32, align 4 48 %in1 = alloca i32, align 4 49 store i32 0, i32* %out0, align 4 50 store i32 1, i32* %in1, align 4 51 %tmp = load i32, i32* %in1, align 4 52 %0 = call i32 asm "foo $1,$0", "=r,>r"(i32 %tmp) nounwind 53 store i32 %0, i32* %out0, align 4 54 %tmp1 = load i32, i32* %in1, align 4 55 %1 = call i32 asm "foo $1,$0", "=r,r>"(i32 %tmp1) nounwind 56 store i32 %1, i32* %out0, align 4 57 ret void 58} 59 60define arm_aapcscc void @single_r() nounwind { 61entry: 62 %out0 = alloca i32, align 4 63 %in1 = alloca i32, align 4 64 store i32 0, i32* %out0, align 4 65 store i32 1, i32* %in1, align 4 66 %tmp = load i32, i32* %in1, align 4 67 %0 = call i32 asm "foo $1,$0", "=r,r"(i32 %tmp) nounwind 68 store i32 %0, i32* %out0, align 4 69 ret void 70} 71 72define arm_aapcscc void @single_i() nounwind { 73entry: 74 %out0 = alloca i32, align 4 75 store i32 0, i32* %out0, align 4 76 %0 = call i32 asm "foo $1,$0", "=r,i"(i32 1) nounwind 77 store i32 %0, i32* %out0, align 4 78 ret void 79} 80 81define arm_aapcscc void @single_n() nounwind { 82entry: 83 %out0 = alloca i32, align 4 84 store i32 0, i32* %out0, align 4 85 %0 = call i32 asm "foo $1,$0", "=r,n"(i32 1) nounwind 86 store i32 %0, i32* %out0, align 4 87 ret void 88} 89 90define arm_aapcscc void @single_E() nounwind { 91entry: 92 %out0 = alloca double, align 8 93 store double 0.000000e+000, double* %out0, align 8 94; No lowering support. 95; %0 = call double asm "foo $1,$0", "=r,E"(double 1.000000e+001) nounwind 96; store double %0, double* %out0, align 8 97 ret void 98} 99 100define arm_aapcscc void @single_F() nounwind { 101entry: 102 %out0 = alloca double, align 8 103 store double 0.000000e+000, double* %out0, align 8 104; No lowering support. 105; %0 = call double asm "foo $1,$0", "=r,F"(double 1.000000e+000) nounwind 106; store double %0, double* %out0, align 8 107 ret void 108} 109 110define arm_aapcscc void @single_s() nounwind { 111entry: 112 %out0 = alloca i32, align 4 113 store i32 0, i32* %out0, align 4 114 ret void 115} 116 117define arm_aapcscc void @single_g() nounwind { 118entry: 119 %out0 = alloca i32, align 4 120 %in1 = alloca i32, align 4 121 store i32 0, i32* %out0, align 4 122 store i32 1, i32* %in1, align 4 123 %tmp = load i32, i32* %in1, align 4 124 %0 = call i32 asm "foo $1,$0", "=r,imr"(i32 %tmp) nounwind 125 store i32 %0, i32* %out0, align 4 126 %tmp1 = load i32, i32* @min1, align 4 127 %1 = call i32 asm "foo $1,$0", "=r,imr"(i32 %tmp1) nounwind 128 store i32 %1, i32* %out0, align 4 129 %2 = call i32 asm "foo $1,$0", "=r,imr"(i32 1) nounwind 130 store i32 %2, i32* %out0, align 4 131 ret void 132} 133 134define arm_aapcscc void @single_X() nounwind { 135entry: 136 %out0 = alloca i32, align 4 137 %in1 = alloca i32, align 4 138 store i32 0, i32* %out0, align 4 139 store i32 1, i32* %in1, align 4 140 %tmp = load i32, i32* %in1, align 4 141 %0 = call i32 asm "foo $1,$0", "=r,X"(i32 %tmp) nounwind 142 store i32 %0, i32* %out0, align 4 143 %tmp1 = load i32, i32* @min1, align 4 144 %1 = call i32 asm "foo $1,$0", "=r,X"(i32 %tmp1) nounwind 145 store i32 %1, i32* %out0, align 4 146 %2 = call i32 asm "foo $1,$0", "=r,X"(i32 1) nounwind 147 store i32 %2, i32* %out0, align 4 148 %3 = call i32 asm "foo $1,$0", "=r,X"(i32* getelementptr inbounds ([2 x i32], [2 x i32]* @marray, i32 0, i32 0)) nounwind 149 store i32 %3, i32* %out0, align 4 150; No lowering support. 151; %4 = call i32 asm "foo $1,$0", "=r,X"(double 1.000000e+001) nounwind 152; store i32 %4, i32* %out0, align 4 153; %5 = call i32 asm "foo $1,$0", "=r,X"(double 1.000000e+000) nounwind 154; store i32 %5, i32* %out0, align 4 155 ret void 156} 157 158define arm_aapcscc void @single_p() nounwind { 159entry: 160 %out0 = alloca i32, align 4 161 store i32 0, i32* %out0, align 4 162 %0 = call i32 asm "foo $1,$0", "=r,r"(i32* getelementptr inbounds ([2 x i32], [2 x i32]* @marray, i32 0, i32 0)) nounwind 163 store i32 %0, i32* %out0, align 4 164 ret void 165} 166 167define arm_aapcscc void @multi_m() nounwind { 168entry: 169 %tmp = load i32, i32* @min1, align 4 170 call void asm "foo $1,$0", "=*m|r,m|r"(i32* @mout0, i32 %tmp) nounwind 171 ret void 172} 173 174define arm_aapcscc void @multi_o() nounwind { 175entry: 176 %out0 = alloca i32, align 4 177 %index = alloca i32, align 4 178 store i32 0, i32* %out0, align 4 179 store i32 1, i32* %index, align 4 180 ret void 181} 182 183define arm_aapcscc void @multi_V() nounwind { 184entry: 185 ret void 186} 187 188define arm_aapcscc void @multi_lt() nounwind { 189entry: 190 %out0 = alloca i32, align 4 191 %in1 = alloca i32, align 4 192 store i32 0, i32* %out0, align 4 193 store i32 1, i32* %in1, align 4 194 %tmp = load i32, i32* %in1, align 4 195 %0 = call i32 asm "foo $1,$0", "=r|r,r|<r"(i32 %tmp) nounwind 196 store i32 %0, i32* %out0, align 4 197 %tmp1 = load i32, i32* %in1, align 4 198 %1 = call i32 asm "foo $1,$0", "=r|r,r|r<"(i32 %tmp1) nounwind 199 store i32 %1, i32* %out0, align 4 200 ret void 201} 202 203define arm_aapcscc void @multi_gt() nounwind { 204entry: 205 %out0 = alloca i32, align 4 206 %in1 = alloca i32, align 4 207 store i32 0, i32* %out0, align 4 208 store i32 1, i32* %in1, align 4 209 %tmp = load i32, i32* %in1, align 4 210 %0 = call i32 asm "foo $1,$0", "=r|r,r|>r"(i32 %tmp) nounwind 211 store i32 %0, i32* %out0, align 4 212 %tmp1 = load i32, i32* %in1, align 4 213 %1 = call i32 asm "foo $1,$0", "=r|r,r|r>"(i32 %tmp1) nounwind 214 store i32 %1, i32* %out0, align 4 215 ret void 216} 217 218define arm_aapcscc void @multi_r() nounwind { 219entry: 220 %out0 = alloca i32, align 4 221 %in1 = alloca i32, align 4 222 store i32 0, i32* %out0, align 4 223 store i32 1, i32* %in1, align 4 224 %tmp = load i32, i32* %in1, align 4 225 %0 = call i32 asm "foo $1,$0", "=r|r,r|m"(i32 %tmp) nounwind 226 store i32 %0, i32* %out0, align 4 227 ret void 228} 229 230define arm_aapcscc void @multi_i() nounwind { 231entry: 232 %out0 = alloca i32, align 4 233 store i32 0, i32* %out0, align 4 234 %0 = call i32 asm "foo $1,$0", "=r|r,r|i"(i32 1) nounwind 235 store i32 %0, i32* %out0, align 4 236 ret void 237} 238 239define arm_aapcscc void @multi_n() nounwind { 240entry: 241 %out0 = alloca i32, align 4 242 store i32 0, i32* %out0, align 4 243 %0 = call i32 asm "foo $1,$0", "=r|r,r|n"(i32 1) nounwind 244 store i32 %0, i32* %out0, align 4 245 ret void 246} 247 248define arm_aapcscc void @multi_E() nounwind { 249entry: 250 %out0 = alloca double, align 8 251 store double 0.000000e+000, double* %out0, align 8 252; No lowering support. 253; %0 = call double asm "foo $1,$0", "=r|r,r|E"(double 1.000000e+001) nounwind 254; store double %0, double* %out0, align 8 255 ret void 256} 257 258define arm_aapcscc void @multi_F() nounwind { 259entry: 260 %out0 = alloca double, align 8 261 store double 0.000000e+000, double* %out0, align 8 262; No lowering support. 263; %0 = call double asm "foo $1,$0", "=r|r,r|F"(double 1.000000e+000) nounwind 264; store double %0, double* %out0, align 8 265 ret void 266} 267 268define arm_aapcscc void @multi_s() nounwind { 269entry: 270 %out0 = alloca i32, align 4 271 store i32 0, i32* %out0, align 4 272 ret void 273} 274 275define arm_aapcscc void @multi_g() nounwind { 276entry: 277 %out0 = alloca i32, align 4 278 %in1 = alloca i32, align 4 279 store i32 0, i32* %out0, align 4 280 store i32 1, i32* %in1, align 4 281 %tmp = load i32, i32* %in1, align 4 282 %0 = call i32 asm "foo $1,$0", "=r|r,r|imr"(i32 %tmp) nounwind 283 store i32 %0, i32* %out0, align 4 284 %tmp1 = load i32, i32* @min1, align 4 285 %1 = call i32 asm "foo $1,$0", "=r|r,r|imr"(i32 %tmp1) nounwind 286 store i32 %1, i32* %out0, align 4 287 %2 = call i32 asm "foo $1,$0", "=r|r,r|imr"(i32 1) nounwind 288 store i32 %2, i32* %out0, align 4 289 ret void 290} 291 292define arm_aapcscc void @multi_X() nounwind { 293entry: 294 %out0 = alloca i32, align 4 295 %in1 = alloca i32, align 4 296 store i32 0, i32* %out0, align 4 297 store i32 1, i32* %in1, align 4 298 %tmp = load i32, i32* %in1, align 4 299 %0 = call i32 asm "foo $1,$0", "=r|r,r|X"(i32 %tmp) nounwind 300 store i32 %0, i32* %out0, align 4 301 %tmp1 = load i32, i32* @min1, align 4 302 %1 = call i32 asm "foo $1,$0", "=r|r,r|X"(i32 %tmp1) nounwind 303 store i32 %1, i32* %out0, align 4 304 %2 = call i32 asm "foo $1,$0", "=r|r,r|X"(i32 1) nounwind 305 store i32 %2, i32* %out0, align 4 306 %3 = call i32 asm "foo $1,$0", "=r|r,r|X"(i32* getelementptr inbounds ([2 x i32], [2 x i32]* @marray, i32 0, i32 0)) nounwind 307 store i32 %3, i32* %out0, align 4 308; No lowering support. 309; %4 = call i32 asm "foo $1,$0", "=r|r,r|X"(double 1.000000e+001) nounwind 310; store i32 %4, i32* %out0, align 4 311; %5 = call i32 asm "foo $1,$0", "=r|r,r|X"(double 1.000000e+000) nounwind 312; store i32 %5, i32* %out0, align 4 313 ret void 314} 315 316define arm_aapcscc void @multi_p() nounwind { 317entry: 318 %out0 = alloca i32, align 4 319 store i32 0, i32* %out0, align 4 320 %0 = call i32 asm "foo $1,$0", "=r|r,r|r"(i32* getelementptr inbounds ([2 x i32], [2 x i32]* @marray, i32 0, i32 0)) nounwind 321 store i32 %0, i32* %out0, align 4 322 ret void 323} 324