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