1; RUN: llc < %s -march=x86 | FileCheck %s 2 3target triple = "i686-pc-linux-gnu" 4@str = internal constant [9 x i8] c"%f+%f*i\0A\00" ; <[9 x i8]*> [#uses=1] 5 6define i32 @main() { 7; CHECK-LABEL: main: 8; CHECK-NOT: ret 9; CHECK: subl $12, %esp 10; CHECK: pushl 11; CHECK: pushl 12; CHECK: pushl 13; CHECK: pushl 14; CHECK: pushl 15; CHECK: calll cexp 16; CHECK: addl $28, %esp 17; CHECK: ret 18 19entry: 20 %retval = alloca i32, align 4 ; <i32*> [#uses=1] 21 %tmp = alloca { double, double }, align 16 ; <{ double, double }*> [#uses=4] 22 %tmp1 = alloca { double, double }, align 16 ; <{ double, double }*> [#uses=4] 23 %tmp2 = alloca { double, double }, align 16 ; <{ double, double }*> [#uses=3] 24 %pi = alloca double, align 8 ; <double*> [#uses=2] 25 %z = alloca { double, double }, align 16 ; <{ double, double }*> [#uses=4] 26 %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] 27 store double 0x400921FB54442D18, double* %pi 28 %tmp.upgrd.1 = load double, double* %pi ; <double> [#uses=1] 29 %real = getelementptr { double, double }, { double, double }* %tmp1, i64 0, i32 0 ; <double*> [#uses=1] 30 store double 0.000000e+00, double* %real 31 %real3 = getelementptr { double, double }, { double, double }* %tmp1, i64 0, i32 1 ; <double*> [#uses=1] 32 store double %tmp.upgrd.1, double* %real3 33 %tmp.upgrd.2 = getelementptr { double, double }, { double, double }* %tmp, i64 0, i32 0 ; <double*> [#uses=1] 34 %tmp4 = getelementptr { double, double }, { double, double }* %tmp1, i64 0, i32 0 ; <double*> [#uses=1] 35 %tmp5 = load double, double* %tmp4 ; <double> [#uses=1] 36 store double %tmp5, double* %tmp.upgrd.2 37 %tmp6 = getelementptr { double, double }, { double, double }* %tmp, i64 0, i32 1 ; <double*> [#uses=1] 38 %tmp7 = getelementptr { double, double }, { double, double }* %tmp1, i64 0, i32 1 ; <double*> [#uses=1] 39 %tmp8 = load double, double* %tmp7 ; <double> [#uses=1] 40 store double %tmp8, double* %tmp6 41 %tmp.upgrd.3 = bitcast { double, double }* %tmp to { i64, i64 }* ; <{ i64, i64 }*> [#uses=1] 42 %tmp.upgrd.4 = getelementptr { i64, i64 }, { i64, i64 }* %tmp.upgrd.3, i64 0, i32 0 ; <i64*> [#uses=1] 43 %tmp.upgrd.5 = load i64, i64* %tmp.upgrd.4 ; <i64> [#uses=1] 44 %tmp9 = bitcast { double, double }* %tmp to { i64, i64 }* ; <{ i64, i64 }*> [#uses=1] 45 %tmp10 = getelementptr { i64, i64 }, { i64, i64 }* %tmp9, i64 0, i32 1 ; <i64*> [#uses=1] 46 %tmp11 = load i64, i64* %tmp10 ; <i64> [#uses=1] 47 call void @cexp( { double, double }* sret %tmp2, i64 %tmp.upgrd.5, i64 %tmp11 ) 48 %tmp12 = getelementptr { double, double }, { double, double }* %z, i64 0, i32 0 ; <double*> [#uses=1] 49 %tmp13 = getelementptr { double, double }, { double, double }* %tmp2, i64 0, i32 0 ; <double*> [#uses=1] 50 %tmp14 = load double, double* %tmp13 ; <double> [#uses=1] 51 store double %tmp14, double* %tmp12 52 %tmp15 = getelementptr { double, double }, { double, double }* %z, i64 0, i32 1 ; <double*> [#uses=1] 53 %tmp16 = getelementptr { double, double }, { double, double }* %tmp2, i64 0, i32 1 ; <double*> [#uses=1] 54 %tmp17 = load double, double* %tmp16 ; <double> [#uses=1] 55 store double %tmp17, double* %tmp15 56 %tmp18 = getelementptr { double, double }, { double, double }* %z, i64 0, i32 1 ; <double*> [#uses=1] 57 %tmp19 = load double, double* %tmp18 ; <double> [#uses=1] 58 %tmp20 = getelementptr { double, double }, { double, double }* %z, i64 0, i32 0 ; <double*> [#uses=1] 59 %tmp21 = load double, double* %tmp20 ; <double> [#uses=1] 60 %tmp.upgrd.6 = getelementptr [9 x i8], [9 x i8]* @str, i32 0, i64 0 ; <i8*> [#uses=1] 61 %tmp.upgrd.7 = call i32 (i8*, ...) @printf( i8* %tmp.upgrd.6, double %tmp21, double %tmp19 ) ; <i32> [#uses=0] 62 br label %finish 63finish: 64 %retval.upgrd.8 = load i32, i32* %retval ; <i32> [#uses=1] 65 ret i32 %retval.upgrd.8 66} 67 68declare void @cexp({ double, double }* sret , i64, i64) 69 70declare i32 @printf(i8*, ...) 71 72