1 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -relocation-model=pic -disable-fp-elim 2 3 %struct.DecRefPicMarking_t = type { i32, i32, i32, i32, i32, %struct.DecRefPicMarking_t* } 4 %struct.FrameStore = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.StorablePicture*, %struct.StorablePicture*, %struct.StorablePicture* } 5 %struct.StorablePicture = type { i32, i32, i32, i32, i32, [50 x [6 x [33 x i64]]], [50 x [6 x [33 x i64]]], [50 x [6 x [33 x i64]]], [50 x [6 x [33 x i64]]], i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i16**, i16***, i8*, i16**, i8***, i64***, i64***, i16****, i8**, i8**, %struct.StorablePicture*, %struct.StorablePicture*, %struct.StorablePicture*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [2 x i32], i32, %struct.DecRefPicMarking_t*, i32 } 6 7 define fastcc void @insert_picture_in_dpb(%struct.FrameStore* nocapture %fs, %struct.StorablePicture* %p) nounwind ssp { 8 entry: 9 %0 = getelementptr inbounds %struct.FrameStore, %struct.FrameStore* %fs, i64 0, i32 12 ; <%struct.StorablePicture**> [#uses=1] 10 %1 = icmp eq i32 undef, 0 ; <i1> [#uses=1] 11 br i1 %1, label %bb.i, label %bb36.i 12 13 bb.i: ; preds = %entry 14 br i1 undef, label %bb3.i, label %bb14.preheader.i 15 16 bb3.i: ; preds = %bb.i 17 unreachable 18 19 bb14.preheader.i: ; preds = %bb.i 20 br i1 undef, label %bb9.i, label %bb20.preheader.i 21 22 bb9.i: ; preds = %bb9.i, %bb14.preheader.i 23 br i1 undef, label %bb9.i, label %bb20.preheader.i 24 25 bb20.preheader.i: ; preds = %bb9.i, %bb14.preheader.i 26 br i1 undef, label %bb18.i, label %bb29.preheader.i 27 28 bb18.i: ; preds = %bb20.preheader.i 29 unreachable 30 31 bb29.preheader.i: ; preds = %bb20.preheader.i 32 br i1 undef, label %bb24.i, label %bb30.i 33 34 bb24.i: ; preds = %bb29.preheader.i 35 unreachable 36 37 bb30.i: ; preds = %bb29.preheader.i 38 store i32 undef, i32* undef, align 8 39 br label %bb67.preheader.i 40 41 bb36.i: ; preds = %entry 42 br label %bb67.preheader.i 43 44 bb67.preheader.i: ; preds = %bb36.i, %bb30.i 45 %2 = phi %struct.StorablePicture* [ null, %bb36.i ], [ undef, %bb30.i ] ; <%struct.StorablePicture*> [#uses=2] 46 %3 = phi %struct.StorablePicture* [ null, %bb36.i ], [ undef, %bb30.i ] ; <%struct.StorablePicture*> [#uses=2] 47 %4 = phi %struct.StorablePicture* [ null, %bb36.i ], [ undef, %bb30.i ] ; <%struct.StorablePicture*> [#uses=2] 48 %5 = phi %struct.StorablePicture* [ null, %bb36.i ], [ undef, %bb30.i ] ; <%struct.StorablePicture*> [#uses=1] 49 %6 = phi %struct.StorablePicture* [ null, %bb36.i ], [ undef, %bb30.i ] ; <%struct.StorablePicture*> [#uses=1] 50 %7 = phi %struct.StorablePicture* [ null, %bb36.i ], [ undef, %bb30.i ] ; <%struct.StorablePicture*> [#uses=1] 51 %8 = phi %struct.StorablePicture* [ null, %bb36.i ], [ undef, %bb30.i ] ; <%struct.StorablePicture*> [#uses=1] 52 %9 = phi %struct.StorablePicture* [ null, %bb36.i ], [ undef, %bb30.i ] ; <%struct.StorablePicture*> [#uses=1] 53 %10 = phi %struct.StorablePicture* [ null, %bb36.i ], [ undef, %bb30.i ] ; <%struct.StorablePicture*> [#uses=1] 54 %11 = phi %struct.StorablePicture* [ null, %bb36.i ], [ undef, %bb30.i ] ; <%struct.StorablePicture*> [#uses=1] 55 %12 = phi %struct.StorablePicture* [ null, %bb36.i ], [ undef, %bb30.i ] ; <%struct.StorablePicture*> [#uses=1] 56 br i1 undef, label %bb38.i, label %bb68.i 57 58 bb38.i: ; preds = %bb66.i, %bb67.preheader.i 59 %13 = phi %struct.StorablePicture* [ %37, %bb66.i ], [ %2, %bb67.preheader.i ] ; <%struct.StorablePicture*> [#uses=1] 60 %14 = phi %struct.StorablePicture* [ %38, %bb66.i ], [ %3, %bb67.preheader.i ] ; <%struct.StorablePicture*> [#uses=1] 61 %15 = phi %struct.StorablePicture* [ %39, %bb66.i ], [ %4, %bb67.preheader.i ] ; <%struct.StorablePicture*> [#uses=1] 62 %16 = phi %struct.StorablePicture* [ %40, %bb66.i ], [ %5, %bb67.preheader.i ] ; <%struct.StorablePicture*> [#uses=1] 63 %17 = phi %struct.StorablePicture* [ %40, %bb66.i ], [ %6, %bb67.preheader.i ] ; <%struct.StorablePicture*> [#uses=1] 64 %18 = phi %struct.StorablePicture* [ %40, %bb66.i ], [ %7, %bb67.preheader.i ] ; <%struct.StorablePicture*> [#uses=1] 65 %19 = phi %struct.StorablePicture* [ %40, %bb66.i ], [ %8, %bb67.preheader.i ] ; <%struct.StorablePicture*> [#uses=1] 66 %20 = phi %struct.StorablePicture* [ %40, %bb66.i ], [ %9, %bb67.preheader.i ] ; <%struct.StorablePicture*> [#uses=1] 67 %21 = phi %struct.StorablePicture* [ %40, %bb66.i ], [ %10, %bb67.preheader.i ] ; <%struct.StorablePicture*> [#uses=1] 68 %22 = phi %struct.StorablePicture* [ %40, %bb66.i ], [ %11, %bb67.preheader.i ] ; <%struct.StorablePicture*> [#uses=1] 69 %23 = phi %struct.StorablePicture* [ %40, %bb66.i ], [ %12, %bb67.preheader.i ] ; <%struct.StorablePicture*> [#uses=1] 70 %indvar248.i = phi i64 [ %indvar.next249.i, %bb66.i ], [ 0, %bb67.preheader.i ] ; <i64> [#uses=3] 71 %storemerge52.i = trunc i64 %indvar248.i to i32 ; <i32> [#uses=1] 72 %24 = getelementptr inbounds %struct.StorablePicture, %struct.StorablePicture* %23, i64 0, i32 19 ; <i32*> [#uses=0] 73 br i1 undef, label %bb.nph51.i, label %bb66.i 74 75 bb.nph51.i: ; preds = %bb38.i 76 %25 = sdiv i32 %storemerge52.i, 8 ; <i32> [#uses=0] 77 br label %bb39.i 78 79 bb39.i: ; preds = %bb64.i, %bb.nph51.i 80 %26 = phi %struct.StorablePicture* [ %17, %bb.nph51.i ], [ null, %bb64.i ] ; <%struct.StorablePicture*> [#uses=1] 81 %27 = phi %struct.StorablePicture* [ %18, %bb.nph51.i ], [ null, %bb64.i ] ; <%struct.StorablePicture*> [#uses=0] 82 %28 = phi %struct.StorablePicture* [ %19, %bb.nph51.i ], [ null, %bb64.i ] ; <%struct.StorablePicture*> [#uses=0] 83 %29 = phi %struct.StorablePicture* [ %20, %bb.nph51.i ], [ null, %bb64.i ] ; <%struct.StorablePicture*> [#uses=0] 84 %30 = phi %struct.StorablePicture* [ %21, %bb.nph51.i ], [ null, %bb64.i ] ; <%struct.StorablePicture*> [#uses=0] 85 %31 = phi %struct.StorablePicture* [ %22, %bb.nph51.i ], [ null, %bb64.i ] ; <%struct.StorablePicture*> [#uses=0] 86 br i1 undef, label %bb57.i, label %bb40.i 87 88 bb40.i: ; preds = %bb39.i 89 br i1 undef, label %bb57.i, label %bb41.i 90 91 bb41.i: ; preds = %bb40.i 92 %storemerge10.i = select i1 undef, i32 2, i32 4 ; <i32> [#uses=1] 93 %32 = zext i32 %storemerge10.i to i64 ; <i64> [#uses=1] 94 br i1 undef, label %bb45.i, label %bb47.i 95 96 bb45.i: ; preds = %bb41.i 97 %33 = getelementptr inbounds %struct.StorablePicture, %struct.StorablePicture* %26, i64 0, i32 5, i64 undef, i64 %32, i64 undef ; <i64*> [#uses=1] 98 %34 = load i64, i64* %33, align 8 ; <i64> [#uses=1] 99 br label %bb47.i 100 101 bb47.i: ; preds = %bb45.i, %bb41.i 102 %storemerge11.i = phi i64 [ %34, %bb45.i ], [ 0, %bb41.i ] ; <i64> [#uses=0] 103 %scevgep246.i = getelementptr i64, i64* undef, i64 undef ; <i64*> [#uses=0] 104 br label %bb64.i 105 106 bb57.i: ; preds = %bb40.i, %bb39.i 107 br i1 undef, label %bb58.i, label %bb60.i 108 109 bb58.i: ; preds = %bb57.i 110 br label %bb60.i 111 112 bb60.i: ; preds = %bb58.i, %bb57.i 113 %35 = load i64**, i64*** undef, align 8 ; <i64**> [#uses=1] 114 %scevgep256.i = getelementptr i64*, i64** %35, i64 %indvar248.i ; <i64**> [#uses=1] 115 %36 = load i64*, i64** %scevgep256.i, align 8 ; <i64*> [#uses=1] 116 %scevgep243.i = getelementptr i64, i64* %36, i64 undef ; <i64*> [#uses=1] 117 store i64 -1, i64* %scevgep243.i, align 8 118 br label %bb64.i 119 120 bb64.i: ; preds = %bb60.i, %bb47.i 121 br i1 undef, label %bb39.i, label %bb66.i 122 123 bb66.i: ; preds = %bb64.i, %bb38.i 124 %37 = phi %struct.StorablePicture* [ %13, %bb38.i ], [ null, %bb64.i ] ; <%struct.StorablePicture*> [#uses=2] 125 %38 = phi %struct.StorablePicture* [ %14, %bb38.i ], [ null, %bb64.i ] ; <%struct.StorablePicture*> [#uses=2] 126 %39 = phi %struct.StorablePicture* [ %15, %bb38.i ], [ null, %bb64.i ] ; <%struct.StorablePicture*> [#uses=2] 127 %40 = phi %struct.StorablePicture* [ %16, %bb38.i ], [ null, %bb64.i ] ; <%struct.StorablePicture*> [#uses=8] 128 %indvar.next249.i = add i64 %indvar248.i, 1 ; <i64> [#uses=1] 129 br i1 undef, label %bb38.i, label %bb68.i 130 131 bb68.i: ; preds = %bb66.i, %bb67.preheader.i 132 %41 = phi %struct.StorablePicture* [ %2, %bb67.preheader.i ], [ %37, %bb66.i ] ; <%struct.StorablePicture*> [#uses=0] 133 %42 = phi %struct.StorablePicture* [ %3, %bb67.preheader.i ], [ %38, %bb66.i ] ; <%struct.StorablePicture*> [#uses=1] 134 %43 = phi %struct.StorablePicture* [ %4, %bb67.preheader.i ], [ %39, %bb66.i ] ; <%struct.StorablePicture*> [#uses=1] 135 br i1 undef, label %bb.nph48.i, label %bb108.i 136 137 bb.nph48.i: ; preds = %bb68.i 138 br label %bb80.i 139 140 bb80.i: ; preds = %bb104.i, %bb.nph48.i 141 %44 = phi %struct.StorablePicture* [ %42, %bb.nph48.i ], [ null, %bb104.i ] ; <%struct.StorablePicture*> [#uses=1] 142 %45 = phi %struct.StorablePicture* [ %43, %bb.nph48.i ], [ null, %bb104.i ] ; <%struct.StorablePicture*> [#uses=1] 143 br i1 undef, label %bb.nph39.i, label %bb104.i 144 145 bb.nph39.i: ; preds = %bb80.i 146 br label %bb81.i 147 148 bb81.i: ; preds = %bb102.i, %bb.nph39.i 149 %46 = phi %struct.StorablePicture* [ %44, %bb.nph39.i ], [ %48, %bb102.i ] ; <%struct.StorablePicture*> [#uses=0] 150 %47 = phi %struct.StorablePicture* [ %45, %bb.nph39.i ], [ %48, %bb102.i ] ; <%struct.StorablePicture*> [#uses=0] 151 br i1 undef, label %bb83.i, label %bb82.i 152 153 bb82.i: ; preds = %bb81.i 154 br i1 undef, label %bb83.i, label %bb101.i 155 156 bb83.i: ; preds = %bb82.i, %bb81.i 157 br label %bb102.i 158 159 bb101.i: ; preds = %bb82.i 160 br label %bb102.i 161 162 bb102.i: ; preds = %bb101.i, %bb83.i 163 %48 = load %struct.StorablePicture*, %struct.StorablePicture** %0, align 8 ; <%struct.StorablePicture*> [#uses=2] 164 br i1 undef, label %bb81.i, label %bb104.i 165 166 bb104.i: ; preds = %bb102.i, %bb80.i 167 br label %bb80.i 168 169 bb108.i: ; preds = %bb68.i 170 unreachable 171 } 172