blob: 194cd6681bfaa72f8a60800d4e00aff04517079b [file] [log] [blame]
Tanya Lattner632e88a2008-02-21 07:42:26 +00001; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2
2 %struct.foo = type opaque
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003
Tanya Lattner632e88a2008-02-21 07:42:26 +00004define fastcc i32 @test(%struct.foo* %v, %struct.foo* %vi) {
5 br i1 false, label %ilog2.exit, label %cond_true.i
Dan Gohmanf17a25c2007-07-18 16:29:46 +00006
Tanya Lattner632e88a2008-02-21 07:42:26 +00007cond_true.i: ; preds = %0
8 ret i32 0
Dan Gohmanf17a25c2007-07-18 16:29:46 +00009
Tanya Lattner632e88a2008-02-21 07:42:26 +000010ilog2.exit: ; preds = %0
11 %tmp24.i = load i32* null ; <i32> [#uses=1]
12 %tmp13.i12.i = tail call double @ldexp( double 0.000000e+00, i32 0 ) ; <double> [#uses=1]
13 %tmp13.i13.i = fptrunc double %tmp13.i12.i to float ; <float> [#uses=1]
14 %tmp11.s = load i32* null ; <i32> [#uses=1]
15 %tmp11.i = bitcast i32 %tmp11.s to i32 ; <i32> [#uses=1]
16 %n.i = bitcast i32 %tmp24.i to i32 ; <i32> [#uses=1]
17 %tmp13.i7 = mul i32 %tmp11.i, %n.i ; <i32> [#uses=1]
18 %tmp.i8 = tail call i8* @calloc( i32 %tmp13.i7, i32 4 ) ; <i8*> [#uses=0]
19 br i1 false, label %bb224.preheader.i, label %bb.i
Dan Gohmanf17a25c2007-07-18 16:29:46 +000020
21bb.i: ; preds = %ilog2.exit
Tanya Lattner632e88a2008-02-21 07:42:26 +000022 ret i32 0
Dan Gohmanf17a25c2007-07-18 16:29:46 +000023
24bb224.preheader.i: ; preds = %ilog2.exit
Tanya Lattner632e88a2008-02-21 07:42:26 +000025 %tmp165.i = fpext float %tmp13.i13.i to double ; <double> [#uses=0]
26 ret i32 0
Dan Gohmanf17a25c2007-07-18 16:29:46 +000027}
28
Tanya Lattner632e88a2008-02-21 07:42:26 +000029declare i8* @calloc(i32, i32)
Dan Gohmanf17a25c2007-07-18 16:29:46 +000030
Tanya Lattner632e88a2008-02-21 07:42:26 +000031declare double @ldexp(double, i32)