1 ; RUN: llc < %s -mtriple=x86_64-apple-darwin10 -disable-fp-elim
4 %union.RtreeCoord = type { float }
5 %struct.RtreeCell = type { i64, [10 x %union.RtreeCoord] }
6 %struct.Rtree = type { i32, i32*, i32, i32, i32, i32, i8*, i8* }
7 %struct.RtreeNode = type { i32*, i64, i32, i32, i8*, i32* }
9 define fastcc void @nodeOverwriteCell(%struct.Rtree* nocapture %pRtree, %struct.RtreeNode* nocapture %pNode, %struct.RtreeCell* nocapture %pCell, i32 %iCell) nounwind ssp {
11 %0 = load i8** undef, align 8 ; <i8*> [#uses=2]
12 %1 = load i32* undef, align 8 ; <i32> [#uses=1]
13 %2 = mul i32 %1, %iCell ; <i32> [#uses=1]
14 %3 = add nsw i32 %2, 4 ; <i32> [#uses=1]
15 %4 = sext i32 %3 to i64 ; <i64> [#uses=2]
16 %5 = load i64* null, align 8 ; <i64> [#uses=2]
17 %6 = lshr i64 %5, 48 ; <i64> [#uses=1]
18 %7 = trunc i64 %6 to i8 ; <i8> [#uses=1]
19 store i8 %7, i8* undef, align 1
20 %8 = lshr i64 %5, 8 ; <i64> [#uses=1]
21 %9 = trunc i64 %8 to i8 ; <i8> [#uses=1]
22 %.sum4 = add i64 %4, 6 ; <i64> [#uses=1]
23 %10 = getelementptr inbounds i8* %0, i64 %.sum4 ; <i8*> [#uses=1]
24 store i8 %9, i8* %10, align 1
25 %11 = getelementptr inbounds %struct.Rtree* %pRtree, i64 0, i32 3 ; <i32*> [#uses=1]
26 br i1 undef, label %bb.nph, label %bb2
28 bb.nph: ; preds = %entry
29 %tmp25 = add i64 %4, 11 ; <i64> [#uses=1]
32 bb: ; preds = %bb, %bb.nph
33 %indvar = phi i64 [ 0, %bb.nph ], [ %indvar.next, %bb ] ; <i64> [#uses=3]
34 %scevgep = getelementptr %struct.RtreeCell* %pCell, i64 0, i32 1, i64 %indvar ; <%union.RtreeCoord*> [#uses=1]
35 %scevgep12 = bitcast %union.RtreeCoord* %scevgep to i32* ; <i32*> [#uses=1]
36 %tmp = shl i64 %indvar, 2 ; <i64> [#uses=1]
37 %tmp26 = add i64 %tmp, %tmp25 ; <i64> [#uses=1]
38 %scevgep27 = getelementptr i8* %0, i64 %tmp26 ; <i8*> [#uses=1]
39 %12 = load i32* %scevgep12, align 4 ; <i32> [#uses=1]
40 %13 = lshr i32 %12, 24 ; <i32> [#uses=1]
41 %14 = trunc i32 %13 to i8 ; <i8> [#uses=1]
42 store i8 %14, i8* undef, align 1
43 store i8 undef, i8* %scevgep27, align 1
44 %15 = load i32* %11, align 4 ; <i32> [#uses=1]
45 %16 = shl i32 %15, 1 ; <i32> [#uses=1]
46 %17 = icmp sgt i32 %16, undef ; <i1> [#uses=1]
47 %indvar.next = add i64 %indvar, 1 ; <i64> [#uses=1]
48 br i1 %17, label %bb, label %bb2
50 bb2: ; preds = %bb, %entry
51 %18 = getelementptr inbounds %struct.RtreeNode* %pNode, i64 0, i32 3 ; <i32*> [#uses=1]
52 store i32 1, i32* %18, align 4