llvm.org GIT mirror llvm / 9dd7a51
Fix PR1575 and test/Transforms/CondProp/2007-08-01-InvalidRead.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40720 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 12 years ago
2 changed file(s) with 824 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
141141 if (ConstantInt *CB = dyn_cast(PN->getIncomingValue(i-1))) {
142142 // If we have a constant, forward the edge from its current to its
143143 // ultimate destination.
144 bool PHIGone = PN->getNumIncomingValues() == 2;
145144 RevectorBlockTo(PN->getIncomingBlock(i-1),
146145 BI->getSuccessor(CB->isZero()));
147146 ++NumBrThread;
148147
149 // If there were two predecessors before this simplification, the PHI node
150 // will be deleted. Don't iterate through it the last time.
151 if (PHIGone) return;
148 // If there were two predecessors before this simplification, or if the
149 // PHI node contained all the same value except for the one we just
150 // substituted, the PHI node may be deleted. Don't iterate through it the
151 // last time.
152 if (BI->getCondition() != PN) return;
152153 }
153154 }
154155
176177 if (ConstantInt *CI = dyn_cast(PN->getIncomingValue(i-1))) {
177178 // If we have a constant, forward the edge from its current to its
178179 // ultimate destination.
179 bool PHIGone = PN->getNumIncomingValues() == 2;
180180 unsigned DestCase = SI->findCaseValue(CI);
181181 RevectorBlockTo(PN->getIncomingBlock(i-1),
182182 SI->getSuccessor(DestCase));
183183 ++NumSwThread;
184184 RemovedPreds = true;
185185
186 // If there were two predecessors before this simplification, the PHI node
187 // will be deleted. Don't iterate through it the last time.
188 if (PHIGone) return;
186 // If there were two predecessors before this simplification, or if the
187 // PHI node contained all the same value except for the one we just
188 // substituted, the PHI node may be deleted. Don't iterate through it the
189 // last time.
190 if (SI->getCondition() != PN) return;
189191 }
190192 }
191193
0 ; RUN: llvm-as < %s | opt -inline -tailduplicate -condprop -simplifycfg -disable-output
1 ; PR1575
2 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64"
3 target triple = "i686-pc-linux-gnu"
4 %struct.DCTtab = type { i8, i8, i8 }
5 %struct.FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct.FILE*, i32, i32, i32, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i8*, i8*, i32, i32, [40 x i8] }
6 %struct.VLCtab = type { i8, i8 }
7 %struct._IO_FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct.FILE*, i32, i32, i32, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i8*, i8*, i32, i32, [40 x i8] }
8 %struct._IO_marker = type { %struct._IO_marker*, %struct.FILE*, i32 }
9 %struct.layer_data = type { i32, [2048 x i8], i8*, [16 x i8], i32, i8*, i32, i32, [64 x i32], [64 x i32], [64 x i32], [64 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [12 x [64 x i16]] }
10 @ld = external global %struct.layer_data* ; <%struct.layer_data**> [#uses=1]
11 @System_Stream_Flag = external global i32 ; [#uses=0]
12 @Fault_Flag = external global i32 ; [#uses=2]
13 @picture_coding_type = external global i32 ; [#uses=1]
14 @DCTtabnext = external global [12 x %struct.DCTtab] ; <[12 x %struct.DCTtab]*> [#uses=0]
15 @DCTtab0 = external global [60 x %struct.DCTtab] ; <[60 x %struct.DCTtab]*> [#uses=0]
16 @DCTtab1 = external global [8 x %struct.DCTtab] ; <[8 x %struct.DCTtab]*> [#uses=0]
17 @DCTtab2 = external global [16 x %struct.DCTtab] ; <[16 x %struct.DCTtab]*> [#uses=0]
18 @DCTtab3 = external global [16 x %struct.DCTtab] ; <[16 x %struct.DCTtab]*> [#uses=0]
19 @DCTtab4 = external global [16 x %struct.DCTtab] ; <[16 x %struct.DCTtab]*> [#uses=0]
20 @DCTtab5 = external global [16 x %struct.DCTtab] ; <[16 x %struct.DCTtab]*> [#uses=0]
21 @DCTtab6 = external global [16 x %struct.DCTtab] ; <[16 x %struct.DCTtab]*> [#uses=0]
22 @Quiet_Flag = external global i32 ; [#uses=0]
23 @.str = external constant [51 x i8] ; <[51 x i8]*> [#uses=0]
24 @stderr = external global %struct.FILE* ; <%struct.FILE**> [#uses=0]
25 @.str1 = external constant [43 x i8] ; <[43 x i8]*> [#uses=0]
26 @scan = external global [2 x [64 x i8]] ; <[2 x [64 x i8]]*> [#uses=0]
27 @DCTtabfirst = external global [12 x %struct.DCTtab] ; <[12 x %struct.DCTtab]*> [#uses=0]
28 @.str2 = external constant [55 x i8] ; <[55 x i8]*> [#uses=0]
29 @.str3 = external constant [43 x i8] ; <[43 x i8]*> [#uses=0]
30 @base = external global %struct.layer_data ; <%struct.layer_data*> [#uses=1]
31 @enhan = external global %struct.layer_data ; <%struct.layer_data*> [#uses=0]
32 @chroma_format = external global i32 ; [#uses=2]
33 @intra_dc_precision = external global i32 ; [#uses=0]
34 @intra_vlc_format = external global i32 ; [#uses=0]
35 @DCTtab0a = external global [252 x %struct.DCTtab] ; <[252 x %struct.DCTtab]*> [#uses=0]
36 @DCTtab1a = external global [8 x %struct.DCTtab] ; <[8 x %struct.DCTtab]*> [#uses=0]
37 @.str4 = external constant [51 x i8] ; <[51 x i8]*> [#uses=0]
38 @.str5 = external constant [45 x i8] ; <[45 x i8]*> [#uses=0]
39 @.str6 = external constant [44 x i8] ; <[44 x i8]*> [#uses=0]
40 @.str7 = external constant [55 x i8] ; <[55 x i8]*> [#uses=0]
41 @.str8 = external constant [44 x i8] ; <[44 x i8]*> [#uses=0]
42 @Temporal_Reference_Base = external global i32 ; [#uses=0]
43 @True_Framenum_max = external global i32 ; [#uses=0]
44 @Temporal_Reference_GOP_Reset.b = external global i1 ; [#uses=0]
45 @frame_rate_Table = external constant [16 x double] ; <[16 x double]*> [#uses=0]
46 @.str9 = external constant [43 x i8] ; <[43 x i8]*> [#uses=0]
47 @horizontal_size = external global i32 ; [#uses=0]
48 @vertical_size = external global i32 ; [#uses=0]
49 @aspect_ratio_information = external global i32 ; [#uses=0]
50 @frame_rate_code = external global i32 ; [#uses=0]
51 @bit_rate_value = external global i32 ; [#uses=0]
52 @.str110 = external constant [18 x i8] ; <[18 x i8]*> [#uses=0]
53 @vbv_buffer_size = external global i32 ; [#uses=0]
54 @constrained_parameters_flag = external global i32 ; [#uses=0]
55 @default_intra_quantizer_matrix = external global [64 x i8] ; <[64 x i8]*> [#uses=0]
56 @drop_flag = external global i32 ; [#uses=0]
57 @hour = external global i32 ; [#uses=0]
58 @minute = external global i32 ; [#uses=0]
59 @.str211 = external constant [27 x i8] ; <[27 x i8]*> [#uses=0]
60 @sec = external global i32 ; [#uses=0]
61 @frame = external global i32 ; [#uses=0]
62 @closed_gop = external global i32 ; [#uses=0]
63 @broken_link = external global i32 ; [#uses=0]
64 @temporal_reference = external global i32 ; [#uses=0]
65 @vbv_delay = external global i32 ; [#uses=0]
66 @full_pel_forward_vector = external global i32 ; [#uses=0]
67 @forward_f_code = external global i32 ; [#uses=0]
68 @full_pel_backward_vector = external global i32 ; [#uses=0]
69 @backward_f_code = external global i32 ; [#uses=1]
70 @Non_Linear_quantizer_scale = external global [32 x i8] ; <[32 x i8]*> [#uses=0]
71 @.str312 = external constant [37 x i8] ; <[37 x i8]*> [#uses=0]
72 @layer_id = external global i32 ; [#uses=0]
73 @profile_and_level_indication = external global i32 ; [#uses=0]
74 @progressive_sequence = external global i32 ; [#uses=0]
75 @.str413 = external constant [19 x i8] ; <[19 x i8]*> [#uses=0]
76 @low_delay = external global i32 ; [#uses=0]
77 @frame_rate_extension_n = external global i32 ; [#uses=0]
78 @frame_rate_extension_d = external global i32 ; [#uses=0]
79 @frame_rate = external global double ; [#uses=0]
80 @profile = external global i32 ; [#uses=0]
81 @level = external global i32 ; [#uses=0]
82 @bit_rate = external global double ; [#uses=0]
83 @video_format = external global i32 ; [#uses=0]
84 @color_description = external global i32 ; [#uses=0]
85 @color_primaries = external global i32 ; [#uses=0]
86 @transfer_characteristics = external global i32 ; [#uses=0]
87 @matrix_coefficients = external global i32 ; [#uses=0]
88 @display_horizontal_size = external global i32 ; [#uses=0]
89 @.str514 = external constant [27 x i8] ; <[27 x i8]*> [#uses=0]
90 @display_vertical_size = external global i32 ; [#uses=0]
91 @lower_layer_prediction_horizontal_size = external global i32 ; [#uses=0]
92 @.str615 = external constant [30 x i8] ; <[30 x i8]*> [#uses=0]
93 @lower_layer_prediction_vertical_size = external global i32 ; [#uses=0]
94 @horizontal_subsampling_factor_m = external global i32 ; [#uses=0]
95 @horizontal_subsampling_factor_n = external global i32 ; [#uses=0]
96 @vertical_subsampling_factor_m = external global i32 ; [#uses=0]
97 @vertical_subsampling_factor_n = external global i32 ; [#uses=0]
98 @.str716 = external constant [38 x i8] ; <[38 x i8]*> [#uses=0]
99 @repeat_first_field = external global i32 ; [#uses=0]
100 @top_field_first = external global i32 ; [#uses=0]
101 @picture_structure = external global i32 ; [#uses=0]
102 @frame_center_horizontal_offset = external global [3 x i32] ; <[3 x i32]*> [#uses=0]
103 @.str817 = external constant [44 x i8] ; <[44 x i8]*> [#uses=0]
104 @frame_center_vertical_offset = external global [3 x i32] ; <[3 x i32]*> [#uses=0]
105 @.str918 = external constant [45 x i8] ; <[45 x i8]*> [#uses=0]
106 @f_code = external global [2 x [2 x i32]] ; <[2 x [2 x i32]]*> [#uses=0]
107 @frame_pred_frame_dct = external global i32 ; [#uses=0]
108 @concealment_motion_vectors = external global i32 ; [#uses=1]
109 @chroma_420_type = external global i32 ; [#uses=0]
110 @progressive_frame = external global i32 ; [#uses=0]
111 @composite_display_flag = external global i32 ; [#uses=0]
112 @v_axis = external global i32 ; [#uses=0]
113 @field_sequence = external global i32 ; [#uses=0]
114 @sub_carrier = external global i32 ; [#uses=0]
115 @burst_amplitude = external global i32 ; [#uses=0]
116 @sub_carrier_phase = external global i32 ; [#uses=0]
117 @lower_layer_temporal_reference = external global i32 ; [#uses=0]
118 @.str10 = external constant [55 x i8] ; <[55 x i8]*> [#uses=0]
119 @lower_layer_horizontal_offset = external global i32 ; [#uses=0]
120 @.str11 = external constant [56 x i8] ; <[56 x i8]*> [#uses=0]
121 @lower_layer_vertical_offset = external global i32 ; [#uses=0]
122 @spatial_temporal_weight_code_table_index = external global i32 ; [#uses=0]
123 @lower_layer_progressive_frame = external global i32 ; [#uses=0]
124 @lower_layer_deinterlaced_field_select = external global i32 ; [#uses=0]
125 @.str12 = external constant [36 x i8] ; <[36 x i8]*> [#uses=0]
126 @copyright_flag = external global i32 ; [#uses=0]
127 @copyright_identifier = external global i32 ; [#uses=0]
128 @original_or_copy = external global i32 ; [#uses=0]
129 @.str13 = external constant [40 x i8] ; <[40 x i8]*> [#uses=0]
130 @copyright_number_1 = external global i32 ; [#uses=0]
131 @.str14 = external constant [41 x i8] ; <[41 x i8]*> [#uses=0]
132 @copyright_number_2 = external global i32 ; [#uses=0]
133 @.str15 = external constant [40 x i8] ; <[40 x i8]*> [#uses=0]
134 @copyright_number_3 = external global i32 ; [#uses=0]
135 @Verbose_Flag = external global i32 ; [#uses=0]
136 @.str16 = external constant [31 x i8] ; <[31 x i8]*> [#uses=0]
137 @.str17 = external constant [22 x i8] ; <[22 x i8]*> [#uses=0]
138 @.str18 = external constant [27 x i8] ; <[27 x i8]*> [#uses=0]
139 @.str19 = external constant [46 x i8] ; <[46 x i8]*> [#uses=0]
140 @.str20 = external constant [25 x i8] ; <[25 x i8]*> [#uses=0]
141 @.str21 = external constant [25 x i8] ; <[25 x i8]*> [#uses=0]
142 @.str22 = external constant [25 x i8] ; <[25 x i8]*> [#uses=0]
143 @temporal_reference_old.2592 = external global i32 ; [#uses=0]
144 @temporal_reference_wrap.2591.b = external global i1 ; [#uses=0]
145 @True_Framenum = external global i32 ; [#uses=0]
146 @Second_Field = external global i32 ; [#uses=0]
147 @.str23 = external constant [29 x i8] ; <[29 x i8]*> [#uses=0]
148 @Ersatz_Flag = external global i32 ; [#uses=0]
149 @mb_width = external global i32 ; [#uses=0]
150 @mb_height = external global i32 ; [#uses=0]
151 @Two_Streams = external global i32 ; [#uses=0]
152 @.str124 = external constant [32 x i8] ; <[32 x i8]*> [#uses=0]
153 @stwc_table.2193 = external constant [3 x [4 x i8]] ; <[3 x [4 x i8]]*> [#uses=0]
154 @stwclass_table.2194 = external constant [9 x i8] ; <[9 x i8]*> [#uses=0]
155 @current_frame = external global [3 x i8*] ; <[3 x i8*]*> [#uses=0]
156 @Coded_Picture_Width = external global i32 ; [#uses=0]
157 @Chroma_Width = external global i32 ; [#uses=0]
158 @Clip = external global i8* ; [#uses=0]
159 @.str225 = external constant [30 x i8] ; <[30 x i8]*> [#uses=0]
160 @.str326 = external constant [27 x i8] ; <[27 x i8]*> [#uses=0]
161 @block_count = external global i32 ; [#uses=1]
162 @auxframe = external global [3 x i8*] ; <[3 x i8*]*> [#uses=0]
163 @forward_reference_frame = external global [3 x i8*] ; <[3 x i8*]*> [#uses=0]
164 @backward_reference_frame = external global [3 x i8*] ; <[3 x i8*]*> [#uses=0]
165 @.str427 = external constant [34 x i8] ; <[34 x i8]*> [#uses=0]
166 @Newref_progressive_frame.2631 = external global i32 ; [#uses=0]
167 @Oldref_progressive_frame.2630 = external global i32 ; [#uses=0]
168 @Reference_IDCT_Flag = external global i32 ; [#uses=0]
169 @.str528 = external constant [43 x i8] ; <[43 x i8]*> [#uses=0]
170 @.str629 = external constant [29 x i8] ; <[29 x i8]*> [#uses=0]
171 @.str730 = external constant [38 x i8] ; <[38 x i8]*> [#uses=0]
172 @.str831 = external constant [32 x i8] ; <[32 x i8]*> [#uses=0]
173 @PMBtab0 = external constant [8 x %struct.VLCtab] ; <[8 x %struct.VLCtab]*> [#uses=0]
174 @PMBtab1 = external constant [8 x %struct.VLCtab] ; <[8 x %struct.VLCtab]*> [#uses=0]
175 @BMBtab0 = external constant [16 x %struct.VLCtab] ; <[16 x %struct.VLCtab]*> [#uses=0]
176 @BMBtab1 = external constant [8 x %struct.VLCtab] ; <[8 x %struct.VLCtab]*> [#uses=0]
177 @spIMBtab = external constant [16 x %struct.VLCtab] ; <[16 x %struct.VLCtab]*> [#uses=0]
178 @spPMBtab0 = external constant [16 x %struct.VLCtab] ; <[16 x %struct.VLCtab]*> [#uses=0]
179 @spPMBtab1 = external constant [16 x %struct.VLCtab] ; <[16 x %struct.VLCtab]*> [#uses=0]
180 @spBMBtab0 = external constant [14 x %struct.VLCtab] ; <[14 x %struct.VLCtab]*> [#uses=0]
181 @spBMBtab1 = external constant [12 x %struct.VLCtab] ; <[12 x %struct.VLCtab]*> [#uses=0]
182 @spBMBtab2 = external constant [8 x %struct.VLCtab] ; <[8 x %struct.VLCtab]*> [#uses=0]
183 @SNRMBtab = external constant [8 x %struct.VLCtab] ; <[8 x %struct.VLCtab]*> [#uses=0]
184 @MVtab0 = external constant [8 x %struct.VLCtab] ; <[8 x %struct.VLCtab]*> [#uses=0]
185 @MVtab1 = external constant [8 x %struct.VLCtab] ; <[8 x %struct.VLCtab]*> [#uses=0]
186 @MVtab2 = external constant [12 x %struct.VLCtab] ; <[12 x %struct.VLCtab]*> [#uses=0]
187 @CBPtab0 = external constant [32 x %struct.VLCtab] ; <[32 x %struct.VLCtab]*> [#uses=0]
188 @CBPtab1 = external constant [64 x %struct.VLCtab] ; <[64 x %struct.VLCtab]*> [#uses=0]
189 @CBPtab2 = external constant [8 x %struct.VLCtab] ; <[8 x %struct.VLCtab]*> [#uses=0]
190 @MBAtab1 = external constant [16 x %struct.VLCtab] ; <[16 x %struct.VLCtab]*> [#uses=0]
191 @MBAtab2 = external constant [104 x %struct.VLCtab] ; <[104 x %struct.VLCtab]*> [#uses=0]
192 @DClumtab0 = external constant [32 x %struct.VLCtab] ; <[32 x %struct.VLCtab]*> [#uses=0]
193 @DClumtab1 = external constant [16 x %struct.VLCtab] ; <[16 x %struct.VLCtab]*> [#uses=0]
194 @DCchromtab0 = external constant [32 x %struct.VLCtab] ; <[32 x %struct.VLCtab]*> [#uses=0]
195 @DCchromtab1 = external constant [32 x %struct.VLCtab] ; <[32 x %struct.VLCtab]*> [#uses=0]
196 @.str32 = external constant [56 x i8] ; <[56 x i8]*> [#uses=0]
197 @.str133 = external constant [29 x i8] ; <[29 x i8]*> [#uses=0]
198 @global_pic = external global i32 ; [#uses=0]
199 @global_MBA = external global i32 ; [#uses=0]
200 @.str1648 = external constant [45 x i8] ; <[45 x i8]*> [#uses=0]
201 @.str1749 = external constant [33 x i8] ; <[33 x i8]*> [#uses=0]
202 @.str1850 = external constant [42 x i8] ; <[42 x i8]*> [#uses=0]
203 @iclp = external global i16* ; [#uses=0]
204 @iclip = external global [1024 x i16] ; <[1024 x i16]*> [#uses=0]
205 @c = external global [8 x [8 x double]] ; <[8 x [8 x double]]*> [#uses=0]
206 @Version = external global [28 x i8] ; <[28 x i8]*> [#uses=0]
207 @Author = external global [41 x i8] ; <[41 x i8]*> [#uses=0]
208 @Inverse_Table_6_9 = external global [8 x [4 x i32]] ; <[8 x [4 x i32]]*> [#uses=0]
209 @Main_Bitstream_Filename = external global i8* ; [#uses=0]
210 @.str51 = external constant [36 x i8] ; <[36 x i8]*> [#uses=0]
211 @Error_Text = external global [256 x i8] ; <[256 x i8]*> [#uses=0]
212 @.str152 = external constant [52 x i8] ; <[52 x i8]*> [#uses=0]
213 @.str253 = external constant [33 x i8] ; <[33 x i8]*> [#uses=0]
214 @Enhancement_Layer_Bitstream_Filename = external global i8* ; [#uses=0]
215 @.str354 = external constant [46 x i8] ; <[46 x i8]*> [#uses=0]
216 @.str455 = external constant [22 x i8] ; <[22 x i8]*> [#uses=0]
217 @.str556 = external constant [30 x i8] ; <[30 x i8]*> [#uses=0]
218 @Coded_Picture_Height = external global i32 ; [#uses=0]
219 @Chroma_Height = external global i32 ; [#uses=0]
220 @Table_6_20.3737 = external constant [3 x i32] ; <[3 x i32]*> [#uses=0]
221 @.str657 = external constant [42 x i8] ; <[42 x i8]*> [#uses=0]
222 @.str758 = external constant [41 x i8] ; <[41 x i8]*> [#uses=0]
223 @.str859 = external constant [26 x i8] ; <[26 x i8]*> [#uses=0]
224 @substitute_frame = external global [3 x i8*] ; <[3 x i8*]*> [#uses=0]
225 @.str960 = external constant [34 x i8] ; <[34 x i8]*> [#uses=0]
226 @llframe0 = external global [3 x i8*] ; <[3 x i8*]*> [#uses=0]
227 @.str1061 = external constant [24 x i8] ; <[24 x i8]*> [#uses=0]
228 @llframe1 = external global [3 x i8*] ; <[3 x i8*]*> [#uses=0]
229 @.str1162 = external constant [24 x i8] ; <[24 x i8]*> [#uses=0]
230 @lltmp = external global i16* ; [#uses=0]
231 @.str1263 = external constant [21 x i8] ; <[21 x i8]*> [#uses=0]
232 @.str1364 = external constant [3 x i8] ; <[3 x i8]*> [#uses=0]
233 @.str1465 = external constant [9 x i8] ; <[9 x i8]*> [#uses=0]
234 @.str1566 = external constant [1195 x i8] ; <[1195 x i8]*> [#uses=0]
235 @Output_Type = external global i32 ; [#uses=0]
236 @Main_Bitstream_Flag = external global i32 ; [#uses=0]
237 @.str1667 = external constant [55 x i8] ; <[55 x i8]*> [#uses=0]
238 @.str1768 = external constant [49 x i8] ; <[49 x i8]*> [#uses=0]
239 @.str1869 = external constant [39 x i8] ; <[39 x i8]*> [#uses=0]
240 @Frame_Store_Flag = external global i32 ; [#uses=0]
241 @Big_Picture_Flag = external global i32 ; [#uses=0]
242 @.str1970 = external constant [49 x i8] ; <[49 x i8]*> [#uses=0]
243 @Spatial_Flag = external global i32 ; [#uses=0]
244 @.str2071 = external constant [39 x i8] ; <[39 x i8]*> [#uses=0]
245 @Lower_Layer_Picture_Filename = external global i8* ; [#uses=0]
246 @Output_Picture_Filename = external global i8* ; [#uses=0]
247 @.str2172 = external constant [1 x i8] ; <[1 x i8]*> [#uses=0]
248 @.str2273 = external constant [39 x i8] ; <[39 x i8]*> [#uses=0]
249 @.str2374 = external constant [49 x i8] ; <[49 x i8]*> [#uses=0]
250 @User_Data_Flag = external global i32 ; [#uses=0]
251 @.str24 = external constant [40 x i8] ; <[40 x i8]*> [#uses=0]
252 @.str25 = external constant [39 x i8] ; <[39 x i8]*> [#uses=0]
253 @Substitute_Picture_Filename = external global i8* ; [#uses=0]
254 @.str26 = external constant [47 x i8] ; <[47 x i8]*> [#uses=0]
255 @.str27 = external constant [55 x i8] ; <[55 x i8]*> [#uses=0]
256 @Display_Progressive_Flag = external global i32 ; [#uses=0]
257 @.str28 = external constant [21 x i8] ; <[21 x i8]*> [#uses=0]
258 @.str29 = external constant [2 x i8] ; <[2 x i8]*> [#uses=0]
259 @hiQdither = external global i32 ; [#uses=0]
260 @Trace_Flag = external global i32 ; [#uses=0]
261 @Verify_Flag = external global i32 ; [#uses=0]
262 @Stats_Flag = external global i32 ; [#uses=0]
263 @Decode_Layer = external global i32 ; [#uses=0]
264 @.str75 = external constant [20 x i8] ; <[20 x i8]*> [#uses=0]
265 @C.53.2124 = external constant [3 x [3 x i8]] ; <[3 x [3 x i8]]*> [#uses=0]
266 @.str76 = external constant [3 x i8] ; <[3 x i8]*> [#uses=0]
267 @C.60.2169 = external constant [3 x [3 x i8]] ; <[3 x [3 x i8]]*> [#uses=0]
268 @.str77 = external constant [5 x i8] ; <[5 x i8]*> [#uses=0]
269 @.str178 = external constant [5 x i8] ; <[5 x i8]*> [#uses=0]
270 @.str279 = external constant [5 x i8] ; <[5 x i8]*> [#uses=0]
271 @.str380 = external constant [11 x i8] ; <[11 x i8]*> [#uses=0]
272 @outfile = external global i32 ; [#uses=0]
273 @.str481 = external constant [20 x i8] ; <[20 x i8]*> [#uses=0]
274 @optr = external global i8* ; [#uses=0]
275 @obfr = external global [4096 x i8] ; <[4096 x i8]*> [#uses=0]
276 @.str582 = external constant [35 x i8] ; <[35 x i8]*> [#uses=0]
277 @u422.3075 = external global i8* ; [#uses=0]
278 @v422.3076 = external global i8* ; [#uses=0]
279 @.str683 = external constant [14 x i8] ; <[14 x i8]*> [#uses=0]
280 @.str784 = external constant [5 x i8] ; <[5 x i8]*> [#uses=0]
281 @u444.3185 = external global i8* ; [#uses=0]
282 @v444.3186 = external global i8* ; [#uses=0]
283 @u422.3183 = external global i8* ; [#uses=0]
284 @v422.3184 = external global i8* ; [#uses=0]
285 @.str885 = external constant [5 x i8] ; <[5 x i8]*> [#uses=0]
286 @.str986 = external constant [5 x i8] ; <[5 x i8]*> [#uses=0]
287 @tga24.3181 = external constant [14 x i8] ; <[14 x i8]*> [#uses=0]
288 @.str1087 = external constant [14 x i8] ; <[14 x i8]*> [#uses=0]
289 @bgate.2952.b = external global i1 ; [#uses=0]
290 @previous_temporal_reference.2947 = external global i32 ; [#uses=0]
291 @previous_picture_coding_type.2951 = external global i32 ; [#uses=0]
292 @previous_anchor_temporal_reference.2949 = external global i32 ; [#uses=0]
293 @.str88 = external constant [40 x i8] ; <[40 x i8]*> [#uses=0]
294 @.str189 = external constant [31 x i8] ; <[31 x i8]*> [#uses=0]
295 @.str290 = external constant [5 x i8] ; <[5 x i8]*> [#uses=0]
296 @.str391 = external constant [5 x i8] ; <[5 x i8]*> [#uses=0]
297 @.str492 = external constant [5 x i8] ; <[5 x i8]*> [#uses=0]
298 @.str593 = external constant [49 x i8] ; <[49 x i8]*> [#uses=0]
299 @.str694 = external constant [3 x i8] ; <[3 x i8]*> [#uses=0]
300 @.str795 = external constant [18 x i8] ; <[18 x i8]*> [#uses=0]
301 @.str896 = external constant [42 x i8] ; <[42 x i8]*> [#uses=0]
302 @.str97 = external constant [18 x i8] ; <[18 x i8]*> [#uses=0]
303 @.str198 = external constant [24 x i8] ; <[24 x i8]*> [#uses=0]
304 @.str299 = external constant [43 x i8] ; <[43 x i8]*> [#uses=0]
305
306 declare void @Initialize_Buffer()
307
308 declare void @Fill_Buffer()
309
310 declare i32 @read(...)
311
312 declare i32 @Get_Byte()
313
314 declare i32 @Get_Word()
315
316 declare i32 @Show_Bits(i32)
317
318 declare i32 @Get_Bits1()
319
320 declare void @Flush_Buffer(i32)
321
322 declare void @Next_Packet()
323
324 declare i32 @Get_Bits(i32)
325
326 declare void @Decode_MPEG1_Intra_Block(i32, i32*)
327
328 declare i32 @Get_Luma_DC_dct_diff()
329
330 declare i32 @Get_Chroma_DC_dct_diff()
331
332 declare i32 @puts(i8*)
333
334 declare i32 @fwrite(i8*, i32, i32, i8*)
335
336 declare void @Decode_MPEG1_Non_Intra_Block(i32)
337
338 declare void @Decode_MPEG2_Intra_Block(i32, i32*)
339
340 declare void @Decode_MPEG2_Non_Intra_Block(i32)
341
342 declare i32 @Get_Hdr()
343
344 declare i32 @Get_Bits32()
345
346 declare i32 @fprintf(%struct.FILE*, i8*, ...)
347
348 declare void @next_start_code()
349
350 declare fastcc void @sequence_header()
351
352 define internal fastcc void @group_of_pictures_header() {
353 entry:
354 ret void
355 }
356
357 define internal fastcc void @picture_header() {
358 entry:
359 unreachable
360 }
361
362 declare i32 @slice_header()
363
364 declare fastcc void @extension_and_user_data()
365
366 declare void @Flush_Buffer32()
367
368 declare fastcc void @sequence_extension()
369
370 declare fastcc void @sequence_display_extension()
371
372 declare fastcc void @quant_matrix_extension()
373
374 declare fastcc void @sequence_scalable_extension()
375
376 declare void @Error(i8*)
377
378 declare fastcc void @picture_display_extension()
379
380 declare fastcc void @picture_coding_extension()
381
382 declare fastcc void @picture_spatial_scalable_extension()
383
384 declare fastcc void @picture_temporal_scalable_extension()
385
386 declare fastcc void @extra_bit_information()
387
388 declare void @marker_bit(i8*)
389
390 declare fastcc void @user_data()
391
392 declare fastcc void @copyright_extension()
393
394 declare i32 @printf(i8*, ...)
395
396 declare fastcc void @Update_Temporal_Reference_Tacking_Data()
397
398 define void @Decode_Picture(i32 %bitstream_framenum, i32 %sequence_framenum) {
399 entry:
400 %tmp16 = icmp eq i32 0, 0 ; [#uses=1]
401 br i1 %tmp16, label %bb43, label %bb22
402
403 bb22: ; preds = %entry
404 ret void
405
406 bb43: ; preds = %entry
407 call fastcc void @picture_data( )
408 ret void
409 }
410
411 declare void @Substitute_Frame_Buffer(i32, i32)
412
413 define void @Spatial_Prediction() {
414 entry:
415 ret void
416 }
417
418 define internal fastcc void @picture_data() {
419 entry:
420 %tmp4 = icmp eq i32 0, 3 ; [#uses=1]
421 br i1 %tmp4, label %bb8, label %bb
422
423 bb: ; preds = %entry
424 ret void
425
426 bb8: ; preds = %entry
427 %tmp11 = call fastcc i32 @slice( i32 0 ) ; [#uses=0]
428 ret void
429 }
430
431 define internal fastcc i32 @slice(i32 %MBAmax) {
432 entry:
433 %tmp6 = icmp eq i32 0, 1 ; [#uses=1]
434 br i1 %tmp6, label %bb9, label %bb231
435
436 bb9: ; preds = %entry
437 %tmp11 = icmp eq i32 0, 0 ; [#uses=1]
438 br i1 %tmp11, label %bb27, label %bb17
439
440 bb17: ; preds = %bb9
441 ret i32 0
442
443 bb27: ; preds = %bb9
444 %tmp31 = icmp slt i32 0, %MBAmax ; [#uses=1]
445 br i1 %tmp31, label %bb110, label %bb231
446
447 resync: ; preds = %bb139
448 ret i32 0
449
450 bb110: ; preds = %bb27
451 %tmp113 = icmp slt i32 0, %MBAmax ; [#uses=1]
452 br i1 %tmp113, label %bb131, label %bb119
453
454 bb119: ; preds = %bb110
455 ret i32 0
456
457 bb131: ; preds = %bb110
458 %tmp133 = icmp eq i32 0, 1 ; [#uses=1]
459 br i1 %tmp133, label %bb139, label %bb166
460
461 bb139: ; preds = %bb131
462 %tmp144 = call fastcc i32 @decode_macroblock( i32* null, i32* null, i32* null, i32* null, i32* null, [2 x [2 x i32]]* null, i32* null, [2 x i32]* null, i32* null ) ; [#uses=1]
463 switch i32 %tmp144, label %bb166 [
464 i32 -1, label %bb231
465 i32 0, label %resync
466 ]
467
468 bb166: ; preds = %bb139, %bb131
469 ret i32 0
470
471 bb231: ; preds = %bb139, %bb27, %entry
472 ret i32 0
473 }
474
475 declare i32 @Get_macroblock_address_increment()
476
477 declare fastcc void @macroblock_modes(i32*, i32*, i32*, i32*, i32*, i32*, i32*, i32*, i32*)
478
479 declare i32 @Get_macroblock_type()
480
481 declare fastcc void @Add_Block(i32, i32, i32, i32, i32)
482
483 declare fastcc void @Decode_SNR_Macroblock(i32*, i32*, i32, i32, i32*)
484
485 declare i32 @Get_coded_block_pattern()
486
487 declare fastcc void @Clear_Block(i32)
488
489 declare fastcc void @Sum_Block(i32)
490
491 declare fastcc void @Saturate(i16*)
492
493 declare fastcc void @Update_Picture_Buffers()
494
495 declare void @Output_Last_Frame_of_Sequence(i32)
496
497 declare void @Write_Frame(i8**, i32)
498
499 declare fastcc void @frame_reorder(i32, i32)
500
501 declare fastcc void @motion_compensation(i32, i32, i32, [2 x [2 x i32]]*, [2 x i32]*, i32*, i32, i32)
502
503 declare void @form_predictions(i32, i32, i32, i32, [2 x [2 x i32]]*, [2 x i32]*, i32*, i32)
504
505 declare void @Reference_IDCT(i16*)
506
507 declare void @Fast_IDCT(i16*)
508
509 declare fastcc void @skipped_macroblock(i32*, [2 x [2 x i32]]*, i32*, [2 x i32]*, i32*, i32*)
510
511 declare fastcc i32 @start_of_slice(i32*, i32*, i32*, [2 x [2 x i32]]*)
512
513 define internal fastcc i32 @decode_macroblock(i32* %macroblock_type, i32* %stwtype, i32* %stwclass, i32* %motion_type, i32* %dct_type, [2 x [2 x i32]]* %PMV, i32* %dc_dct_pred, [2 x i32]* %motion_vertical_field_select, i32* %dmvector) {
514 entry:
515 %tmp3 = icmp eq i32 0, 1 ; [#uses=1]
516 br i1 %tmp3, label %bb, label %bb15
517
518 bb: ; preds = %entry
519 %tmp7 = icmp slt i32 0, 3 ; [#uses=1]
520 br i1 %tmp7, label %bb13, label %bb14
521
522 bb13: ; preds = %bb
523 br label %bb15
524
525 bb14: ; preds = %bb
526 ret i32 0
527
528 bb15: ; preds = %bb13, %entry
529 %tmp21 = load i32* @Fault_Flag, align 4 ; [#uses=1]
530 %tmp22 = icmp eq i32 %tmp21, 0 ; [#uses=1]
531 br i1 %tmp22, label %bb29, label %bb630
532
533 bb29: ; preds = %bb15
534 %tmp33 = icmp eq i32 0, 0 ; [#uses=1]
535 br i1 %tmp33, label %bb91, label %bb39
536
537 bb39: ; preds = %bb29
538 ret i32 0
539
540 bb91: ; preds = %bb29
541 %tmp94 = and i32 0, 8 ; [#uses=0]
542 %tmp121 = load %struct.layer_data** @ld, align 4 ; <%struct.layer_data*> [#uses=0]
543 %tmp123 = load i32* null ; [#uses=1]
544 %tmp124 = icmp eq i32 %tmp123, 0 ; [#uses=1]
545 br i1 %tmp124, label %bb146, label %bb130
546
547 bb130: ; preds = %bb91
548 call void @motion_vectors( [2 x [2 x i32]]* %PMV, i32* %dmvector, [2 x i32]* %motion_vertical_field_select, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 )
549 br label %bb157
550
551 bb146: ; preds = %bb91
552 br label %bb157
553
554 bb157: ; preds = %bb146, %bb130
555 %tmp159 = icmp eq i32 0, 0 ; [#uses=1]
556 br i1 %tmp159, label %bb166, label %bb630
557
558 bb166: ; preds = %bb157
559 %tmp180 = icmp eq i32 0, 0 ; [#uses=1]
560 br i1 %tmp180, label %bb201, label %bb186
561
562 bb186: ; preds = %bb166
563 br label %bb212
564
565 bb201: ; preds = %bb166
566 %tmp205 = load i32* @backward_f_code, align 4 ; [#uses=0]
567 br label %bb212
568
569 bb212: ; preds = %bb201, %bb186
570 %tmp214 = icmp eq i32 0, 0 ; [#uses=1]
571 br i1 %tmp214, label %bb221, label %bb630
572
573 bb221: ; preds = %bb212
574 %tmp22422511 = and i32 0, 1 ; [#uses=1]
575 %toBool226 = icmp eq i32 %tmp22422511, 0 ; [#uses=1]
576 br i1 %toBool226, label %bb239, label %bb230
577
578 bb230: ; preds = %bb221
579 ret i32 0
580
581 bb239: ; preds = %bb221
582 %tmp241 = load i32* getelementptr (%struct.layer_data* @base, i32 0, i32 17), align 4 ; [#uses=0]
583 %tmp262 = icmp eq i32 0, 0 ; [#uses=1]
584 br i1 %tmp262, label %bb296, label %bb268
585
586 bb268: ; preds = %bb239
587 %tmp270 = load i32* @chroma_format, align 4 ; [#uses=1]
588 %tmp271 = icmp eq i32 %tmp270, 2 ; [#uses=1]
589 br i1 %tmp271, label %bb277, label %bb282
590
591 bb277: ; preds = %bb268
592 br label %bb312
593
594 bb282: ; preds = %bb268
595 %tmp283 = load i32* @chroma_format, align 4 ; [#uses=0]
596 br label %bb312
597
598 bb296: ; preds = %bb239
599 %tmp298 = load i32* %macroblock_type ; [#uses=1]
600 %tmp2993009 = and i32 %tmp298, 1 ; [#uses=1]
601 %toBool301 = icmp eq i32 %tmp2993009, 0 ; [#uses=1]
602 br i1 %toBool301, label %bb312, label %bb305
603
604 bb305: ; preds = %bb296
605 %tmp306 = load i32* @block_count, align 4 ; [#uses=0]
606 %tmp308 = add i32 0, -1 ; [#uses=0]
607 br label %bb312
608
609 bb312: ; preds = %bb305, %bb296, %bb282, %bb277
610 %tmp313 = load i32* @Fault_Flag, align 4 ; [#uses=1]
611 %tmp314 = icmp eq i32 %tmp313, 0 ; [#uses=1]
612 br i1 %tmp314, label %bb398, label %bb630
613
614 bb346: ; preds = %cond_true404
615 %toBool351 = icmp eq i32 0, 0 ; [#uses=1]
616 %tmp359 = icmp ne i32 0, 0 ; [#uses=2]
617 br i1 %toBool351, label %bb372, label %bb355
618
619 bb355: ; preds = %bb346
620 br i1 %tmp359, label %bb365, label %bb368
621
622 bb365: ; preds = %bb355
623 br label %bb386
624
625 bb368: ; preds = %bb355
626 call void @Decode_MPEG1_Intra_Block( i32 0, i32* %dc_dct_pred )
627 br label %bb386
628
629 bb372: ; preds = %bb346
630 br i1 %tmp359, label %bb382, label %bb384
631
632 bb382: ; preds = %bb372
633 br label %bb386
634
635 bb384: ; preds = %bb372
636 call void @Decode_MPEG1_Non_Intra_Block( i32 0 )
637 br label %bb386
638
639 bb386: ; preds = %bb384, %bb382, %bb368, %bb365
640 %tmp388 = icmp eq i32 0, 0 ; [#uses=1]
641 br i1 %tmp388, label %bb395, label %bb630
642
643 bb395: ; preds = %cond_true404, %bb386
644 %tmp397 = add i32 0, 1 ; [#uses=0]
645 ret i32 0
646
647 bb398: ; preds = %bb312
648 %tmp401 = icmp slt i32 0, 0 ; [#uses=1]
649 br i1 %tmp401, label %cond_true404, label %bb407
650
651 cond_true404: ; preds = %bb398
652 %tmp340341514 = and i32 0, 0 ; [#uses=1]
653 %toBool342 = icmp eq i32 %tmp340341514, 0 ; [#uses=1]
654 br i1 %toBool342, label %bb395, label %bb346
655
656 bb407: ; preds = %bb398
657 %tmp408 = load i32* @picture_coding_type, align 4 ; [#uses=0]
658 %tmp419 = load i32* %macroblock_type ; [#uses=1]
659 %tmp420 = and i32 %tmp419, 1 ; [#uses=1]
660 %tmp421 = icmp eq i32 %tmp420, 0 ; [#uses=0]
661 %tmp442 = load i32* %macroblock_type ; [#uses=1]
662 %tmp4434447 = and i32 %tmp442, 1 ; [#uses=0]
663 %tmp450 = load i32* @concealment_motion_vectors, align 4 ; [#uses=0]
664 %tmp572 = icmp eq i32 0, 4 ; [#uses=1]
665 br i1 %tmp572, label %bb578, label %bb630
666
667 bb578: ; preds = %bb407
668 %tmp613 = getelementptr [2 x [2 x i32]]* %PMV, i32 1, i32 1, i32 1 ; [#uses=0]
669 %tmp618 = getelementptr [2 x [2 x i32]]* %PMV, i32 1, i32 1, i32 0 ; [#uses=0]
670 %tmp623 = getelementptr [2 x [2 x i32]]* %PMV, i32 0, i32 1, i32 1 ; [#uses=0]
671 %tmp628 = getelementptr [2 x [2 x i32]]* %PMV, i32 0, i32 1, i32 0 ; [#uses=0]
672 ret i32 1
673
674 bb630: ; preds = %bb407, %bb386, %bb312, %bb212, %bb157, %bb15
675 %tmp.0 = phi i32 [ 0, %bb15 ], [ 0, %bb157 ], [ 0, %bb212 ], [ 0, %bb312 ], [ 0, %bb386 ], [ 1, %bb407 ] ; [#uses=1]
676 ret i32 %tmp.0
677 }
678
679 declare void @motion_vectors([2 x [2 x i32]]*, i32*, [2 x i32]*, i32, i32, i32, i32, i32, i32, i32)
680
681 declare void @motion_vector(i32*, i32*, i32, i32, i32, i32, i32)
682
683 declare fastcc i32 @Get_I_macroblock_type()
684
685 declare fastcc i32 @Get_P_macroblock_type()
686
687 declare fastcc i32 @Get_B_macroblock_type()
688
689 declare fastcc void @Get_D_macroblock_type()
690
691 declare fastcc i32 @Get_I_Spatial_macroblock_type()
692
693 declare fastcc i32 @Get_P_Spatial_macroblock_type()
694
695 declare fastcc i32 @Get_B_Spatial_macroblock_type()
696
697 declare fastcc i32 @Get_SNR_macroblock_type()
698
699 declare i32 @Get_motion_code()
700
701 declare i32 @Get_dmvector()
702
703 declare fastcc void @idctrow(i16*)
704
705 declare fastcc void @idctcol(i16*)
706
707 declare void @Initialize_Fast_IDCT()
708
709 declare void @Initialize_Reference_IDCT()
710
711 declare double @cos(double)
712
713 declare double @floor(double)
714
715 declare fastcc void @decode_motion_vector(i32*, i32, i32, i32, i32)
716
717 declare void @Dual_Prime_Arithmetic([2 x i32]*, i32*, i32, i32)
718
719 declare i32 @main(i32, i8**)
720
721 declare i32 @open(i8*, i32, ...)
722
723 declare void @exit(i32)
724
725 declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
726
727 declare i32 @lseek(i32, i32, i32)
728
729 declare i32 @sprintf(i8*, i8*, ...)
730
731 declare i32 @close(i32)
732
733 declare fastcc void @Initialize_Decoder()
734
735 declare fastcc void @Initialize_Sequence()
736
737 declare void @Print_Bits(i32, i32, i32)
738
739 declare fastcc void @Process_Options(i32, i8**)
740
741 declare i32 @toupper(i32)
742
743 declare i32 @atoi(i8*)
744
745 declare fastcc i32 @Headers()
746
747 declare fastcc void @Decode_Bitstream()
748
749 declare fastcc void @Deinitialize_Sequence()
750
751 declare fastcc i32 @video_sequence(i32*)
752
753 declare void @Clear_Options()
754
755 declare fastcc void @form_prediction(i8**, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32)
756
757 declare fastcc void @form_component_prediction(i8*, i8*, i32, i32, i32, i32, i32, i32, i32, i32, i32)
758
759 declare fastcc void @Read_Lower_Layer_Component_Framewise(i32, i32, i32)
760
761 declare i8* @strcat(i8*, i8*)
762
763 declare %struct.FILE* @fopen(i8*, i8*)
764
765 declare i32 @_IO_getc(%struct.FILE*)
766
767 declare i32 @fclose(%struct.FILE*)
768
769 declare fastcc void @Read_Lower_Layer_Component_Fieldwise(i32, i32, i32)
770
771 declare fastcc void @Make_Spatial_Prediction_Frame(i32, i32, i8*, i8*, i16*, i8*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32)
772
773 declare fastcc void @Deinterlace(i8*, i8*, i32, i32, i32, i32)
774
775 declare fastcc void @Subsample_Vertical(i8*, i16*, i32, i32, i32, i32, i32, i32, i32)
776
777 declare fastcc void @Subsample_Horizontal(i16*, i8*, i32, i32, i32, i32, i32, i32, i32)
778
779 declare fastcc void @store_one(i8*, i8**, i32, i32, i32)
780
781 declare fastcc void @store_yuv(i8*, i8**, i32, i32, i32)
782
783 declare fastcc void @store_yuv1(i8*, i8*, i32, i32, i32, i32)
784
785 declare i32 @write(...)
786
787 declare fastcc void @store_sif(i8*, i8**, i32, i32, i32)
788
789 declare fastcc void @store_ppm_tga(i8*, i8**, i32, i32, i32, i32)
790
791 declare fastcc void @putbyte(i32)
792
793 declare fastcc void @putword(i32)
794
795 declare fastcc void @conv422to444(i8*, i8*)
796
797 declare fastcc void @conv420to422(i8*, i8*)
798
799 declare fastcc void @Read_Frame(i8*, i8**, i32)
800
801 declare fastcc i32 @Read_Components(i8*, i32)
802
803 declare fastcc void @Read_Component(i8*, i8*, i32, i32)
804
805 declare fastcc i32 @Extract_Components(i8*, i32)
806
807 declare i32 @fseek(%struct.FILE*, i32, i32)
808
809 declare i32 @fread(i8*, i32, i32, %struct.FILE*)
810
811 declare fastcc void @Copy_Frame(i8*, i8*, i32, i32, i32, i32)
812
813 declare i32 @Get_Long()