1 ; RUN: opt < %s -indvars -disable-output 2 ; PR1487 3 4 %struct.AVClass = type { i8*, i8* (i8*)*, %struct.AVOption* } 5 %struct.AVCodec = type { i8*, i32, i32, i32, i32 (%struct.AVCodecContext*)*, i32 (%struct.AVCodecContext*, i8*, i32, i8*)*, i32 (%struct.AVCodecContext*)*, i32 (%struct.AVCodecContext*, i8*, i32*, i8*, i32)*, i32, %struct.AVCodec*, void (%struct.AVCodecContext*)*, %struct.AVCodecTag*, i32* } 6 %struct.AVCodecContext = type { %struct.AVClass*, i32, i32, i32, i32, i32, i8*, i32, %struct.AVCodecTag, i32, i32, i32, i32, i32, void (%struct.AVCodecContext*, %struct.AVFrame*, i32*, i32, i32, i32)*, i32, i32, i32, i32, i32, i32, i32, float, float, i32, i32, i32, i32, float, i32, i32, i32, %struct.AVCodec*, i8*, i32, i32, void (%struct.AVCodecContext*, i8*, i32, i32)*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8*, [32 x i8], i32, i32, i32, i32, i32, i32, i32, float, i32, i32 (%struct.AVCodecContext*, %struct.AVFrame*)*, void (%struct.AVCodecContext*, %struct.AVFrame*)*, i32, i32, i32, i32, i8*, i8*, float, float, i32, %struct.RcOverride*, i32, i8*, i32, i32, i32, float, float, float, float, i32, float, float, float, float, float, i32, i32, i32, i32*, i32, i32, i32, i32, %struct.AVCodecTag, %struct.AVFrame*, i32, i32, [4 x i64], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 (%struct.AVCodecContext*, i32*)*, i32, i32, i32, i32, i32, i32, i8*, i32, i32, i32, i32, i32, i32, i16*, i16*, i32, i32, i32, i32, %struct.AVPaletteControl*, i32, i32 (%struct.AVCodecContext*, %struct.AVFrame*)*, i32, i32, i32, i32, i32, i32, i32, i32 (%struct.AVCodecContext*, i32 (%struct.AVCodecContext*, i8*)*, i8**, i32*, i32)*, i8*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, i32, i32, i32, i32, i32, i32, i32, i32, float, i32, i32, i32, i32, i32, i32, float, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64 } 7 %struct.AVCodecTag = type { i32, i32 } 8 %struct.AVFrame = type { [4 x i8*], [4 x i32], [4 x i8*], i32, i32, i64, i32, i32, i32, i32, i32, i8*, i32, i8*, [2 x [2 x i16]*], i32*, i8, i8*, [4 x i64], i32, i32, i32, i32, i32, %struct.AVPanScan*, i32, i32, i16*, [2 x i8*] } 9 %struct.AVOption = type { i8*, i8*, i32, i32, double, double, double, i32, i8* } 10 %struct.AVPaletteControl = type { i32, [256 x i32] } 11 %struct.AVPanScan = type { i32, i32, i32, [3 x [2 x i16]] } 12 %struct.RcOverride = type { i32, i32, i32, float } 13 14 define i32 @smc_decode_frame(%struct.AVCodecContext* %avctx, i8* %data, i32* %data_size, i8* %buf, i32 %buf_size) { 15 entry: 16 br i1 false, label %cond_next, label %cond_true 17 18 cond_true: ; preds = %entry 19 ret i32 -1 20 21 cond_next: ; preds = %entry 22 br i1 false, label %bb.outer5.split.split.split.us, label %cond_true194.split 23 24 bb.outer5.split.split.split.us: ; preds = %cond_next 25 br i1 false, label %cond_next188.us503.us, label %bb.us481 26 27 bb275.us493.us: ; preds = %cond_next188.us503.us, %cond_next188.us503.us 28 ret i32 0 29 30 cond_next188.us503.us: ; preds = %bb.outer5.split.split.split.us 31 switch i32 0, label %bb1401 [ 32 i32 0, label %cond_next202.bb215_crit_edge.split 33 i32 16, label %bb215 34 i32 32, label %bb275.us493.us 35 i32 48, label %bb275.us493.us 36 i32 64, label %cond_next202.bb417_crit_edge.split 37 i32 80, label %bb417 38 i32 96, label %cond_next202.bb615_crit_edge.split 39 i32 112, label %bb615 40 i32 128, label %cond_next202.bb716_crit_edge.split 41 i32 144, label %bb716 42 i32 160, label %cond_next202.bb882_crit_edge.split 43 i32 176, label %bb882 44 i32 192, label %cond_next202.bb1062_crit_edge.split 45 i32 208, label %bb1062 46 i32 224, label %bb1326.us.outer.outer 47 ] 48 49 bb.us481: ; preds = %bb.outer5.split.split.split.us 50 ret i32 0 51 52 cond_true194.split: ; preds = %cond_next 53 ret i32 %buf_size 54 55 cond_next202.bb1062_crit_edge.split: ; preds = %cond_next188.us503.us 56 ret i32 0 57 58 cond_next202.bb882_crit_edge.split: ; preds = %cond_next188.us503.us 59 ret i32 0 60 61 cond_next202.bb716_crit_edge.split: ; preds = %cond_next188.us503.us 62 ret i32 0 63 64 cond_next202.bb615_crit_edge.split: ; preds = %cond_next188.us503.us 65 ret i32 0 66 67 cond_next202.bb417_crit_edge.split: ; preds = %cond_next188.us503.us 68 ret i32 0 69 70 cond_next202.bb215_crit_edge.split: ; preds = %cond_next188.us503.us 71 ret i32 0 72 73 bb215: ; preds = %cond_next188.us503.us 74 ret i32 0 75 76 bb417: ; preds = %cond_next188.us503.us 77 ret i32 0 78 79 bb615: ; preds = %cond_next188.us503.us 80 ret i32 0 81 82 bb716: ; preds = %cond_next188.us503.us 83 ret i32 0 84 85 bb882: ; preds = %cond_next188.us503.us 86 ret i32 0 87 88 bb1062: ; preds = %cond_next188.us503.us 89 ret i32 0 90 91 bb1326.us: ; preds = %bb1326.us.outer.outer, %bb1347.loopexit.us, %bb1326.us 92 %pixel_y.162036.us.ph = phi i32 [ %tmp1352.us, %bb1347.loopexit.us ], [ 0, %bb1326.us.outer.outer ], [ %pixel_y.162036.us.ph, %bb1326.us ] ; <i32> [#uses=2] 93 %stream_ptr.142038.us.ph = phi i32 [ %tmp1339.us, %bb1347.loopexit.us ], [ %stream_ptr.142038.us.ph.ph, %bb1326.us.outer.outer ], [ %stream_ptr.142038.us.ph, %bb1326.us ] ; <i32> [#uses=2] 94 %pixel_x.232031.us = phi i32 [ %tmp1341.us, %bb1326.us ], [ 0, %bb1326.us.outer.outer ], [ 0, %bb1347.loopexit.us ] ; <i32> [#uses=3] 95 %block_ptr.222030.us = add i32 0, %pixel_x.232031.us ; <i32> [#uses=1] 96 %stream_ptr.132032.us = add i32 %pixel_x.232031.us, %stream_ptr.142038.us.ph ; <i32> [#uses=1] 97 %tmp1341.us = add i32 %pixel_x.232031.us, 1 ; <i32> [#uses=2] 98 %tmp1344.us = icmp slt i32 %tmp1341.us, 4 ; <i1> [#uses=1] 99 br i1 %tmp1344.us, label %bb1326.us, label %bb1347.loopexit.us 100 101 bb1347.loopexit.us: ; preds = %bb1326.us 102 %tmp1339.us = add i32 %stream_ptr.132032.us, 1 ; <i32> [#uses=2] 103 %tmp1337.us = add i32 %block_ptr.222030.us, 1 ; <i32> [#uses=0] 104 %tmp1352.us = add i32 %pixel_y.162036.us.ph, 1 ; <i32> [#uses=2] 105 %tmp1355.us = icmp slt i32 %tmp1352.us, 4 ; <i1> [#uses=1] 106 br i1 %tmp1355.us, label %bb1326.us, label %bb1358 107 108 bb1358: ; preds = %bb1347.loopexit.us 109 br label %bb1326.us.outer.outer 110 111 bb1326.us.outer.outer: ; preds = %bb1358, %cond_next188.us503.us 112 %stream_ptr.142038.us.ph.ph = phi i32 [ %tmp1339.us, %bb1358 ], [ 0, %cond_next188.us503.us ] ; <i32> [#uses=1] 113 br label %bb1326.us 114 115 bb1401: ; preds = %cond_next188.us503.us 116 ret i32 0 117 } 118