blob: c66d553c11137e2cf9b48cc23279c2c165ff5d98 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2
2
3%struct.foo = type opaque
4
5implementation
6
7fastcc int %test(%struct.foo* %v, %struct.foo* %vi) {
8 br bool false, label %ilog2.exit, label %cond_true.i
9
10cond_true.i: ; preds = %entry
11 ret int 0
12
13ilog2.exit: ; preds = %entry
14 %tmp24.i = load int* null ; <int> [#uses=1]
15 %tmp13.i12.i = tail call double %ldexp( double 0.000000e+00, int 0 ) ; <double> [#uses=1]
16 %tmp13.i13.i = cast double %tmp13.i12.i to float ; <float> [#uses=1]
17 %tmp11.s = load int* null ; <int> [#uses=1]
18 %tmp11.i = cast int %tmp11.s to uint ; <uint> [#uses=1]
19 %n.i = cast int %tmp24.i to uint ; <uint> [#uses=1]
20 %tmp13.i7 = mul uint %tmp11.i, %n.i ; <uint> [#uses=1]
21 %tmp.i8 = tail call sbyte* %calloc( uint %tmp13.i7, uint 4 ) ; <sbyte*> [#uses=0]
22 br bool false, label %bb224.preheader.i, label %bb.i
23
24bb.i: ; preds = %ilog2.exit
25 ret int 0
26
27bb224.preheader.i: ; preds = %ilog2.exit
28 %tmp165.i = cast float %tmp13.i13.i to double ; <double> [#uses=0]
29 ret int 0
30}
31
32declare sbyte* %calloc(uint, uint)
33
34declare double %ldexp(double, int)