1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mattr=-avx -fast-isel -mcpu=core2 -O0 -regalloc=fast -asm-verbose=0 -fast-isel-abort=1 | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mattr=+avx -fast-isel -mcpu=core2 -O0 -regalloc=fast -asm-verbose=0 -fast-isel-abort=1 | FileCheck %s --check-prefix=AVX 3*9880d681SAndroid Build Coastguard Worker 4*9880d681SAndroid Build Coastguard Workertarget datalayout = "e-p:64:64:64-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-s0:64:64-f80:128:128-n8:16:32:64" 5*9880d681SAndroid Build Coastguard Workertarget triple = "x86_64-apple-darwin10.0.0" 6*9880d681SAndroid Build Coastguard Worker 7*9880d681SAndroid Build Coastguard Worker; Make sure that fast-isel folds the immediate into the binop even though it 8*9880d681SAndroid Build Coastguard Worker; is non-canonical. 9*9880d681SAndroid Build Coastguard Workerdefine i32 @test1(i32 %i) nounwind ssp { 10*9880d681SAndroid Build Coastguard Worker %and = and i32 8, %i 11*9880d681SAndroid Build Coastguard Worker ret i32 %and 12*9880d681SAndroid Build Coastguard Worker} 13*9880d681SAndroid Build Coastguard Worker 14*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test1: 15*9880d681SAndroid Build Coastguard Worker; CHECK: andl $8, 16*9880d681SAndroid Build Coastguard Worker 17*9880d681SAndroid Build Coastguard Worker 18*9880d681SAndroid Build Coastguard Worker; rdar://9289512 - The load should fold into the compare. 19*9880d681SAndroid Build Coastguard Workerdefine void @test2(i64 %x) nounwind ssp { 20*9880d681SAndroid Build Coastguard Workerentry: 21*9880d681SAndroid Build Coastguard Worker %x.addr = alloca i64, align 8 22*9880d681SAndroid Build Coastguard Worker store i64 %x, i64* %x.addr, align 8 23*9880d681SAndroid Build Coastguard Worker %tmp = load i64, i64* %x.addr, align 8 24*9880d681SAndroid Build Coastguard Worker %cmp = icmp sgt i64 %tmp, 42 25*9880d681SAndroid Build Coastguard Worker br i1 %cmp, label %if.then, label %if.end 26*9880d681SAndroid Build Coastguard Worker 27*9880d681SAndroid Build Coastguard Workerif.then: ; preds = %entry 28*9880d681SAndroid Build Coastguard Worker br label %if.end 29*9880d681SAndroid Build Coastguard Worker 30*9880d681SAndroid Build Coastguard Workerif.end: ; preds = %if.then, %entry 31*9880d681SAndroid Build Coastguard Worker ret void 32*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test2: 33*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rdi, -8(%rsp) 34*9880d681SAndroid Build Coastguard Worker; CHECK: cmpq $42, -8(%rsp) 35*9880d681SAndroid Build Coastguard Worker} 36*9880d681SAndroid Build Coastguard Worker 37*9880d681SAndroid Build Coastguard Worker 38*9880d681SAndroid Build Coastguard Worker 39*9880d681SAndroid Build Coastguard Worker 40*9880d681SAndroid Build Coastguard Worker@G = external global i32 41*9880d681SAndroid Build Coastguard Workerdefine i64 @test3() nounwind { 42*9880d681SAndroid Build Coastguard Worker %A = ptrtoint i32* @G to i64 43*9880d681SAndroid Build Coastguard Worker ret i64 %A 44*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test3: 45*9880d681SAndroid Build Coastguard Worker; CHECK: movq _G@GOTPCREL(%rip), %rax 46*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: ret 47*9880d681SAndroid Build Coastguard Worker} 48*9880d681SAndroid Build Coastguard Worker 49*9880d681SAndroid Build Coastguard Worker 50*9880d681SAndroid Build Coastguard Worker 51*9880d681SAndroid Build Coastguard Worker; rdar://9289558 52*9880d681SAndroid Build Coastguard Worker@rtx_length = external global [153 x i8] 53*9880d681SAndroid Build Coastguard Worker 54*9880d681SAndroid Build Coastguard Workerdefine i32 @test4(i64 %idxprom9) nounwind { 55*9880d681SAndroid Build Coastguard Worker %arrayidx10 = getelementptr inbounds [153 x i8], [153 x i8]* @rtx_length, i32 0, i64 %idxprom9 56*9880d681SAndroid Build Coastguard Worker %tmp11 = load i8, i8* %arrayidx10, align 1 57*9880d681SAndroid Build Coastguard Worker %conv = zext i8 %tmp11 to i32 58*9880d681SAndroid Build Coastguard Worker ret i32 %conv 59*9880d681SAndroid Build Coastguard Worker 60*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test4: 61*9880d681SAndroid Build Coastguard Worker; CHECK: movq _rtx_length@GOTPCREL(%rip), %rax 62*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: movzbl (%rax,%rdi), %eax 63*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: ret 64*9880d681SAndroid Build Coastguard Worker} 65*9880d681SAndroid Build Coastguard Worker 66*9880d681SAndroid Build Coastguard Worker 67*9880d681SAndroid Build Coastguard Worker; PR3242 - Out of range shifts should not be folded by fastisel. 68*9880d681SAndroid Build Coastguard Workerdefine void @test5(i32 %x, i32* %p) nounwind { 69*9880d681SAndroid Build Coastguard Worker %y = ashr i32 %x, 50000 70*9880d681SAndroid Build Coastguard Worker store i32 %y, i32* %p 71*9880d681SAndroid Build Coastguard Worker ret void 72*9880d681SAndroid Build Coastguard Worker 73*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test5: 74*9880d681SAndroid Build Coastguard Worker; CHECK: movl $50000, %ecx 75*9880d681SAndroid Build Coastguard Worker; CHECK: sarl %cl, %edi 76*9880d681SAndroid Build Coastguard Worker; CHECK: ret 77*9880d681SAndroid Build Coastguard Worker} 78*9880d681SAndroid Build Coastguard Worker 79*9880d681SAndroid Build Coastguard Worker; rdar://9289501 - fast isel should fold trivial multiplies to shifts. 80*9880d681SAndroid Build Coastguard Workerdefine i64 @test6(i64 %x) nounwind ssp { 81*9880d681SAndroid Build Coastguard Workerentry: 82*9880d681SAndroid Build Coastguard Worker %mul = mul nsw i64 %x, 8 83*9880d681SAndroid Build Coastguard Worker ret i64 %mul 84*9880d681SAndroid Build Coastguard Worker 85*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test6: 86*9880d681SAndroid Build Coastguard Worker; CHECK: shlq $3, %rdi 87*9880d681SAndroid Build Coastguard Worker} 88*9880d681SAndroid Build Coastguard Worker 89*9880d681SAndroid Build Coastguard Workerdefine i32 @test7(i32 %x) nounwind ssp { 90*9880d681SAndroid Build Coastguard Workerentry: 91*9880d681SAndroid Build Coastguard Worker %mul = mul nsw i32 %x, 8 92*9880d681SAndroid Build Coastguard Worker ret i32 %mul 93*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test7: 94*9880d681SAndroid Build Coastguard Worker; CHECK: shll $3, %edi 95*9880d681SAndroid Build Coastguard Worker} 96*9880d681SAndroid Build Coastguard Worker 97*9880d681SAndroid Build Coastguard Worker 98*9880d681SAndroid Build Coastguard Worker; rdar://9289507 - folding of immediates into 64-bit operations. 99*9880d681SAndroid Build Coastguard Workerdefine i64 @test8(i64 %x) nounwind ssp { 100*9880d681SAndroid Build Coastguard Workerentry: 101*9880d681SAndroid Build Coastguard Worker %add = add nsw i64 %x, 7 102*9880d681SAndroid Build Coastguard Worker ret i64 %add 103*9880d681SAndroid Build Coastguard Worker 104*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test8: 105*9880d681SAndroid Build Coastguard Worker; CHECK: addq $7, %rdi 106*9880d681SAndroid Build Coastguard Worker} 107*9880d681SAndroid Build Coastguard Worker 108*9880d681SAndroid Build Coastguard Workerdefine i64 @test9(i64 %x) nounwind ssp { 109*9880d681SAndroid Build Coastguard Workerentry: 110*9880d681SAndroid Build Coastguard Worker %add = mul nsw i64 %x, 7 111*9880d681SAndroid Build Coastguard Worker ret i64 %add 112*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test9: 113*9880d681SAndroid Build Coastguard Worker; CHECK: imulq $7, %rdi, %rax 114*9880d681SAndroid Build Coastguard Worker} 115*9880d681SAndroid Build Coastguard Worker 116*9880d681SAndroid Build Coastguard Worker; rdar://9297011 - Don't reject udiv by a power of 2. 117*9880d681SAndroid Build Coastguard Workerdefine i32 @test10(i32 %X) nounwind { 118*9880d681SAndroid Build Coastguard Worker %Y = udiv i32 %X, 8 119*9880d681SAndroid Build Coastguard Worker ret i32 %Y 120*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test10: 121*9880d681SAndroid Build Coastguard Worker; CHECK: shrl $3, 122*9880d681SAndroid Build Coastguard Worker} 123*9880d681SAndroid Build Coastguard Worker 124*9880d681SAndroid Build Coastguard Workerdefine i32 @test11(i32 %X) nounwind { 125*9880d681SAndroid Build Coastguard Worker %Y = sdiv exact i32 %X, 8 126*9880d681SAndroid Build Coastguard Worker ret i32 %Y 127*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test11: 128*9880d681SAndroid Build Coastguard Worker; CHECK: sarl $3, 129*9880d681SAndroid Build Coastguard Worker} 130*9880d681SAndroid Build Coastguard Worker 131*9880d681SAndroid Build Coastguard Worker 132*9880d681SAndroid Build Coastguard Worker; rdar://9297006 - Trunc to bool. 133*9880d681SAndroid Build Coastguard Workerdefine void @test12(i8 %tmp) nounwind ssp noredzone { 134*9880d681SAndroid Build Coastguard Workerentry: 135*9880d681SAndroid Build Coastguard Worker %tobool = trunc i8 %tmp to i1 136*9880d681SAndroid Build Coastguard Worker br i1 %tobool, label %if.then, label %if.end 137*9880d681SAndroid Build Coastguard Worker 138*9880d681SAndroid Build Coastguard Workerif.then: ; preds = %entry 139*9880d681SAndroid Build Coastguard Worker call void @test12(i8 0) noredzone 140*9880d681SAndroid Build Coastguard Worker br label %if.end 141*9880d681SAndroid Build Coastguard Worker 142*9880d681SAndroid Build Coastguard Workerif.end: ; preds = %if.then, %entry 143*9880d681SAndroid Build Coastguard Worker ret void 144*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test12: 145*9880d681SAndroid Build Coastguard Worker; CHECK: testb $1, 146*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: je L 147*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: xorl %edi, %edi 148*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: callq 149*9880d681SAndroid Build Coastguard Worker} 150*9880d681SAndroid Build Coastguard Worker 151*9880d681SAndroid Build Coastguard Workerdeclare void @test13f(i1 %X) 152*9880d681SAndroid Build Coastguard Worker 153*9880d681SAndroid Build Coastguard Workerdefine void @test13() nounwind { 154*9880d681SAndroid Build Coastguard Worker call void @test13f(i1 0) 155*9880d681SAndroid Build Coastguard Worker ret void 156*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test13: 157*9880d681SAndroid Build Coastguard Worker; CHECK: xorl %edi, %edi 158*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: callq 159*9880d681SAndroid Build Coastguard Worker} 160*9880d681SAndroid Build Coastguard Worker 161*9880d681SAndroid Build Coastguard Worker 162*9880d681SAndroid Build Coastguard Worker 163*9880d681SAndroid Build Coastguard Worker; rdar://9297003 - fast isel bails out on all functions taking bools 164*9880d681SAndroid Build Coastguard Workerdefine void @test14(i8 %tmp) nounwind ssp noredzone { 165*9880d681SAndroid Build Coastguard Workerentry: 166*9880d681SAndroid Build Coastguard Worker %tobool = trunc i8 %tmp to i1 167*9880d681SAndroid Build Coastguard Worker call void @test13f(i1 zeroext %tobool) noredzone 168*9880d681SAndroid Build Coastguard Worker ret void 169*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test14: 170*9880d681SAndroid Build Coastguard Worker; CHECK: andb $1, 171*9880d681SAndroid Build Coastguard Worker; CHECK: callq 172*9880d681SAndroid Build Coastguard Worker} 173*9880d681SAndroid Build Coastguard Worker 174*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.memcpy.p0i8.p0i8.i64(i8*, i8*, i64, i32, i1) 175*9880d681SAndroid Build Coastguard Worker 176*9880d681SAndroid Build Coastguard Worker; rdar://9289488 - fast-isel shouldn't bail out on llvm.memcpy 177*9880d681SAndroid Build Coastguard Workerdefine void @test15(i8* %a, i8* %b) nounwind { 178*9880d681SAndroid Build Coastguard Worker call void @llvm.memcpy.p0i8.p0i8.i64(i8* %a, i8* %b, i64 4, i32 4, i1 false) 179*9880d681SAndroid Build Coastguard Worker ret void 180*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test15: 181*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: movl (%rsi), %eax 182*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: movl %eax, (%rdi) 183*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: ret 184*9880d681SAndroid Build Coastguard Worker} 185*9880d681SAndroid Build Coastguard Worker 186*9880d681SAndroid Build Coastguard Worker; Handling for varargs calls 187*9880d681SAndroid Build Coastguard Workerdeclare void @test16callee(...) nounwind 188*9880d681SAndroid Build Coastguard Workerdefine void @test16() nounwind { 189*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test16: 190*9880d681SAndroid Build Coastguard Worker; CHECK: movl $1, %edi 191*9880d681SAndroid Build Coastguard Worker; CHECK: movb $0, %al 192*9880d681SAndroid Build Coastguard Worker; CHECK: callq _test16callee 193*9880d681SAndroid Build Coastguard Worker call void (...) @test16callee(i32 1) 194*9880d681SAndroid Build Coastguard Worker br label %block2 195*9880d681SAndroid Build Coastguard Worker 196*9880d681SAndroid Build Coastguard Workerblock2: 197*9880d681SAndroid Build Coastguard Worker; CHECK: movsd LCP{{.*}}_{{.*}}(%rip), %xmm0 198*9880d681SAndroid Build Coastguard Worker; CHECK: movb $1, %al 199*9880d681SAndroid Build Coastguard Worker; CHECK: callq _test16callee 200*9880d681SAndroid Build Coastguard Worker 201*9880d681SAndroid Build Coastguard Worker; AVX: vmovsd LCP{{.*}}_{{.*}}(%rip), %xmm0 202*9880d681SAndroid Build Coastguard Worker; AVX: movb $1, %al 203*9880d681SAndroid Build Coastguard Worker; AVX: callq _test16callee 204*9880d681SAndroid Build Coastguard Worker call void (...) @test16callee(double 1.000000e+00) 205*9880d681SAndroid Build Coastguard Worker ret void 206*9880d681SAndroid Build Coastguard Worker} 207*9880d681SAndroid Build Coastguard Worker 208*9880d681SAndroid Build Coastguard Worker 209*9880d681SAndroid Build Coastguard Workerdeclare void @foo() unnamed_addr ssp align 2 210*9880d681SAndroid Build Coastguard Worker 211*9880d681SAndroid Build Coastguard Worker; Verify that we don't fold the load into the compare here. That would move it 212*9880d681SAndroid Build Coastguard Worker; w.r.t. the call. 213*9880d681SAndroid Build Coastguard Workerdefine i32 @test17(i32 *%P) ssp nounwind { 214*9880d681SAndroid Build Coastguard Workerentry: 215*9880d681SAndroid Build Coastguard Worker %tmp = load i32, i32* %P 216*9880d681SAndroid Build Coastguard Worker %cmp = icmp ne i32 %tmp, 5 217*9880d681SAndroid Build Coastguard Worker call void @foo() 218*9880d681SAndroid Build Coastguard Worker br i1 %cmp, label %if.then, label %if.else 219*9880d681SAndroid Build Coastguard Worker 220*9880d681SAndroid Build Coastguard Workerif.then: ; preds = %entry 221*9880d681SAndroid Build Coastguard Worker ret i32 1 222*9880d681SAndroid Build Coastguard Worker 223*9880d681SAndroid Build Coastguard Workerif.else: ; preds = %entry 224*9880d681SAndroid Build Coastguard Worker ret i32 2 225*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test17: 226*9880d681SAndroid Build Coastguard Worker; CHECK: movl (%rdi), %eax 227*9880d681SAndroid Build Coastguard Worker; CHECK: callq _foo 228*9880d681SAndroid Build Coastguard Worker; CHECK: cmpl $5, %eax 229*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: je 230*9880d681SAndroid Build Coastguard Worker} 231*9880d681SAndroid Build Coastguard Worker 232*9880d681SAndroid Build Coastguard Worker; Check that 0.0 is materialized using xorps 233*9880d681SAndroid Build Coastguard Workerdefine void @test18(float* %p1) { 234*9880d681SAndroid Build Coastguard Worker store float 0.0, float* %p1 235*9880d681SAndroid Build Coastguard Worker ret void 236*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test18: 237*9880d681SAndroid Build Coastguard Worker; CHECK: xorps 238*9880d681SAndroid Build Coastguard Worker} 239*9880d681SAndroid Build Coastguard Worker 240*9880d681SAndroid Build Coastguard Worker; Without any type hints, doubles use the smaller xorps instead of xorpd. 241*9880d681SAndroid Build Coastguard Workerdefine void @test19(double* %p1) { 242*9880d681SAndroid Build Coastguard Worker store double 0.0, double* %p1 243*9880d681SAndroid Build Coastguard Worker ret void 244*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test19: 245*9880d681SAndroid Build Coastguard Worker; CHECK: xorps 246*9880d681SAndroid Build Coastguard Worker} 247*9880d681SAndroid Build Coastguard Worker 248*9880d681SAndroid Build Coastguard Worker; Check that we fast-isel sret 249*9880d681SAndroid Build Coastguard Worker%struct.a = type { i64, i64, i64 } 250*9880d681SAndroid Build Coastguard Workerdefine void @test20() nounwind ssp { 251*9880d681SAndroid Build Coastguard Workerentry: 252*9880d681SAndroid Build Coastguard Worker %tmp = alloca %struct.a, align 8 253*9880d681SAndroid Build Coastguard Worker call void @test20sret(%struct.a* sret %tmp) 254*9880d681SAndroid Build Coastguard Worker ret void 255*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test20: 256*9880d681SAndroid Build Coastguard Worker; CHECK: leaq (%rsp), %rdi 257*9880d681SAndroid Build Coastguard Worker; CHECK: callq _test20sret 258*9880d681SAndroid Build Coastguard Worker} 259*9880d681SAndroid Build Coastguard Workerdeclare void @test20sret(%struct.a* sret) 260*9880d681SAndroid Build Coastguard Worker 261*9880d681SAndroid Build Coastguard Worker; Check that -0.0 is not materialized using xor 262*9880d681SAndroid Build Coastguard Workerdefine void @test21(double* %p1) { 263*9880d681SAndroid Build Coastguard Worker store double -0.0, double* %p1 264*9880d681SAndroid Build Coastguard Worker ret void 265*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test21: 266*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: xor 267*9880d681SAndroid Build Coastguard Worker; CHECK: movsd LCPI 268*9880d681SAndroid Build Coastguard Worker} 269*9880d681SAndroid Build Coastguard Worker 270*9880d681SAndroid Build Coastguard Worker; Check that immediate arguments to a function 271*9880d681SAndroid Build Coastguard Worker; do not cause massive spilling and are used 272*9880d681SAndroid Build Coastguard Worker; as immediates just before the call. 273*9880d681SAndroid Build Coastguard Workerdefine void @test22() nounwind { 274*9880d681SAndroid Build Coastguard Workerentry: 275*9880d681SAndroid Build Coastguard Worker call void @foo22(i32 0) 276*9880d681SAndroid Build Coastguard Worker call void @foo22(i32 1) 277*9880d681SAndroid Build Coastguard Worker call void @foo22(i32 2) 278*9880d681SAndroid Build Coastguard Worker call void @foo22(i32 3) 279*9880d681SAndroid Build Coastguard Worker ret void 280*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test22: 281*9880d681SAndroid Build Coastguard Worker; CHECK: xorl %edi, %edi 282*9880d681SAndroid Build Coastguard Worker; CHECK: callq _foo22 283*9880d681SAndroid Build Coastguard Worker; CHECK: movl $1, %edi 284*9880d681SAndroid Build Coastguard Worker; CHECK: callq _foo22 285*9880d681SAndroid Build Coastguard Worker; CHECK: movl $2, %edi 286*9880d681SAndroid Build Coastguard Worker; CHECK: callq _foo22 287*9880d681SAndroid Build Coastguard Worker; CHECK: movl $3, %edi 288*9880d681SAndroid Build Coastguard Worker; CHECK: callq _foo22 289*9880d681SAndroid Build Coastguard Worker} 290*9880d681SAndroid Build Coastguard Worker 291*9880d681SAndroid Build Coastguard Workerdeclare void @foo22(i32) 292*9880d681SAndroid Build Coastguard Worker 293*9880d681SAndroid Build Coastguard Worker; PR13563 294*9880d681SAndroid Build Coastguard Workerdefine void @test23(i8* noalias sret %result) { 295*9880d681SAndroid Build Coastguard Worker %a = alloca i8 296*9880d681SAndroid Build Coastguard Worker %b = call i8* @foo23() 297*9880d681SAndroid Build Coastguard Worker ret void 298*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test23: 299*9880d681SAndroid Build Coastguard Worker; CHECK: call 300*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rdi, %rax 301*9880d681SAndroid Build Coastguard Worker; CHECK: ret 302*9880d681SAndroid Build Coastguard Worker} 303*9880d681SAndroid Build Coastguard Worker 304*9880d681SAndroid Build Coastguard Workerdeclare i8* @foo23() 305*9880d681SAndroid Build Coastguard Worker 306*9880d681SAndroid Build Coastguard Workerdeclare void @takesi32ptr(i32* %arg) 307*9880d681SAndroid Build Coastguard Worker 308*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: allocamaterialize 309*9880d681SAndroid Build Coastguard Workerdefine void @allocamaterialize() { 310*9880d681SAndroid Build Coastguard Worker %a = alloca i32 311*9880d681SAndroid Build Coastguard Worker; CHECK: leaq {{.*}}, %rdi 312*9880d681SAndroid Build Coastguard Worker call void @takesi32ptr(i32* %a) 313*9880d681SAndroid Build Coastguard Worker ret void 314*9880d681SAndroid Build Coastguard Worker} 315