source: icGREP/icgrep-devel/llvm-3.8.0.src/test/CodeGen/ARM/2008-04-10-ScavengerAssert.ll @ 5027

Last change on this file since 5027 was 5027, checked in by cameron, 3 years ago

Upgrade to llvm 3.8

File size: 13.6 KB
Line 
1; RUN: llc < %s -mtriple=arm-apple-darwin
2
3        %struct.CONTENTBOX = type { i32, i32, i32, i32, i32 }
4        %struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 }
5        %struct.LOCBOX = type { i32, i32, i32, i32 }
6        %struct.SIDEBOX = type { i32, i32 }
7        %struct.UNCOMBOX = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
8        %struct.__sFILEX = type opaque
9        %struct.__sbuf = type { i8*, i32 }
10        %struct.cellbox = type { i8*, i32, i32, i32, [9 x i32], i32, i32, i32, i32, i32, i32, i32, double, double, double, double, double, i32, i32, %struct.CONTENTBOX*, %struct.UNCOMBOX*, [8 x %struct.tilebox*], %struct.SIDEBOX* }
11        %struct.termbox = type { %struct.termbox*, i32, i32, i32, i32, i32 }
12        %struct.tilebox = type { %struct.tilebox*, double, double, double, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.termbox*, %struct.LOCBOX* }
13@.str127 = external constant [2 x i8]           ; <[2 x i8]*> [#uses=1]
14@.str584 = external constant [5 x i8]           ; <[5 x i8]*> [#uses=1]
15@.str8115 = external constant [9 x i8]          ; <[9 x i8]*> [#uses=1]
16
17declare %struct.FILE* @fopen(i8*, i8*)
18
19declare i32 @strcmp(i8*, i8*)
20
21declare i32 @fscanf(%struct.FILE*, i8*, ...)
22
23define void @main(i32 %argc, i8** %argv) noreturn  {
24entry:
25        br i1 false, label %cond_next48, label %cond_false674
26cond_next48:            ; preds = %entry
27        %tmp61 = call %struct.FILE* @fopen( i8* null, i8* getelementptr ([2 x i8], [2 x i8]* @.str127, i32 0, i32 0) )          ; <%struct.FILE*> [#uses=2]
28        br i1 false, label %bb220.i.i.i, label %bb62.preheader.i.i.i
29bb62.preheader.i.i.i:           ; preds = %cond_next48
30        ret void
31bb220.i.i.i:            ; preds = %cond_next48
32        br i1 false, label %bb248.i.i.i, label %cond_next232.i.i.i
33cond_next232.i.i.i:             ; preds = %bb220.i.i.i
34        ret void
35bb248.i.i.i:            ; preds = %bb220.i.i.i
36        br i1 false, label %bb300.i.i.i, label %cond_false256.i.i.i
37cond_false256.i.i.i:            ; preds = %bb248.i.i.i
38        ret void
39bb300.i.i.i:            ; preds = %bb248.i.i.i
40        br label %bb.i.i347.i
41bb.i.i347.i:            ; preds = %bb.i.i347.i, %bb300.i.i.i
42        br i1 false, label %bb894.loopexit.i.i, label %bb.i.i347.i
43bb.i350.i:              ; preds = %bb894.i.i
44        br i1 false, label %bb24.i.i, label %cond_false373.i.i
45bb24.i.i:               ; preds = %bb24.i.i, %bb.i350.i
46        br i1 false, label %bb40.i.i, label %bb24.i.i
47bb40.i.i:               ; preds = %bb24.i.i
48        br i1 false, label %bb177.i393.i, label %bb82.i.i
49bb82.i.i:               ; preds = %bb40.i.i
50        ret void
51bb177.i393.i:           ; preds = %bb40.i.i
52        br i1 false, label %bb894.i.i, label %bb192.i.i
53bb192.i.i:              ; preds = %bb177.i393.i
54        ret void
55cond_false373.i.i:              ; preds = %bb.i350.i
56        %tmp376.i.i = call i32 @strcmp( i8* null, i8* getelementptr ([9 x i8], [9 x i8]* @.str8115, i32 0, i32 0) )             ; <i32> [#uses=0]
57        br i1 false, label %cond_true380.i.i, label %cond_next602.i.i
58cond_true380.i.i:               ; preds = %cond_false373.i.i
59        %tmp394.i418.i = add i32 %cell.0.i.i, 1         ; <i32> [#uses=1]
60        %tmp397.i420.i = load %struct.cellbox*, %struct.cellbox** null, align 4         ; <%struct.cellbox*> [#uses=1]
61        br label %bb398.i.i
62bb398.i.i:              ; preds = %bb398.i.i, %cond_true380.i.i
63        br i1 false, label %bb414.i.i, label %bb398.i.i
64bb414.i.i:              ; preds = %bb398.i.i
65        br i1 false, label %bb581.i.i, label %bb455.i442.i
66bb455.i442.i:           ; preds = %bb414.i.i
67        ret void
68bb581.i.i:              ; preds = %bb581.i.i, %bb414.i.i
69        br i1 false, label %bb894.i.i, label %bb581.i.i
70cond_next602.i.i:               ; preds = %cond_false373.i.i
71        br i1 false, label %bb609.i.i, label %bb661.i.i
72bb609.i.i:              ; preds = %cond_next602.i.i
73        br label %bb620.i.i
74bb620.i.i:              ; preds = %bb620.i.i, %bb609.i.i
75        %indvar166.i465.i = phi i32 [ %indvar.next167.i.i, %bb620.i.i ], [ 0, %bb609.i.i ]              ; <i32> [#uses=1]
76        %tmp640.i.i = call i32 (%struct.FILE*, i8*, ...) @fscanf( %struct.FILE* %tmp61, i8* getelementptr ([5 x i8], [5 x i8]* @.str584, i32 0, i32 0), [1024 x i8]* null )             ; <i32> [#uses=0]
77        %tmp648.i.i = load i32, i32* null, align 4              ; <i32> [#uses=1]
78        %tmp650.i468.i = icmp sgt i32 0, %tmp648.i.i            ; <i1> [#uses=1]
79        %tmp624.i469.i = call i32 (%struct.FILE*, i8*, ...) @fscanf( %struct.FILE* %tmp61, i8* getelementptr ([5 x i8], [5 x i8]* @.str584, i32 0, i32 0), [1024 x i8]* null )          ; <i32> [#uses=0]
80        %indvar.next167.i.i = add i32 %indvar166.i465.i, 1              ; <i32> [#uses=1]
81        br i1 %tmp650.i468.i, label %bb653.i.i.loopexit, label %bb620.i.i
82bb653.i.i.loopexit:             ; preds = %bb620.i.i
83        %tmp642.i466.i = add i32 0, 1           ; <i32> [#uses=1]
84        br label %bb894.i.i
85bb661.i.i:              ; preds = %cond_next602.i.i
86        ret void
87bb894.loopexit.i.i:             ; preds = %bb.i.i347.i
88        br label %bb894.i.i
89bb894.i.i:              ; preds = %bb894.loopexit.i.i, %bb653.i.i.loopexit, %bb581.i.i, %bb177.i393.i
90        %pinctr.0.i.i = phi i32 [ 0, %bb894.loopexit.i.i ], [ %tmp642.i466.i, %bb653.i.i.loopexit ], [ %pinctr.0.i.i, %bb177.i393.i ], [ %pinctr.0.i.i, %bb581.i.i ]            ; <i32> [#uses=2]
91        %soft.0.i.i = phi i32 [ undef, %bb894.loopexit.i.i ], [ %soft.0.i.i, %bb653.i.i.loopexit ], [ 0, %bb177.i393.i ], [ 1, %bb581.i.i ]             ; <i32> [#uses=1]
92        %cell.0.i.i = phi i32 [ 0, %bb894.loopexit.i.i ], [ %cell.0.i.i, %bb653.i.i.loopexit ], [ 0, %bb177.i393.i ], [ %tmp394.i418.i, %bb581.i.i ]            ; <i32> [#uses=2]
93        %ptr.0.i.i = phi %struct.cellbox* [ undef, %bb894.loopexit.i.i ], [ %ptr.0.i.i, %bb653.i.i.loopexit ], [ null, %bb177.i393.i ], [ %tmp397.i420.i, %bb581.i.i ]          ; <%struct.cellbox*> [#uses=1]
94        br i1 false, label %bb.i350.i, label %bb902.i502.i
95bb902.i502.i:           ; preds = %bb894.i.i
96        ret void
97cond_false674:          ; preds = %entry
98        ret void
99}
100
101        %struct.III_psy_xmin = type { [22 x double], [13 x [3 x double]] }
102        %struct.III_scalefac_t = type { [22 x i32], [13 x [3 x i32]] }
103        %struct.gr_info = type { i32, i32, i32, i32, i32, i32, i32, i32, [3 x i32], [3 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32*, [4 x i32] }
104        %struct.lame_global_flags = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8*, i8*, i32, i32, float, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, i32, i32, i32, float, float, float, float, i32, i32, i32, i32, i32, i32, i32, i32 }
105@scalefac_band.1 = external global [14 x i32]           ; <[14 x i32]*> [#uses=2]
106
107declare fastcc i32 @init_outer_loop(%struct.lame_global_flags*, double*, %struct.gr_info*)
108
109define fastcc void @outer_loop(%struct.lame_global_flags* %gfp, double* %xr, i32 %targ_bits, double* %best_noise, %struct.III_psy_xmin* %l3_xmin, i32* %l3_enc, %struct.III_scalefac_t* %scalefac, %struct.gr_info* %cod_info, i32 %ch) {
110entry:
111        %cod_info.182 = getelementptr %struct.gr_info, %struct.gr_info* %cod_info, i32 0, i32 1         ; <i32*> [#uses=1]
112        br label %bb
113bb:             ; preds = %bb226, %entry
114        %save_cod_info.1.1 = phi i32 [ undef, %entry ], [ %save_cod_info.1.1, %bb226 ]          ; <i32> [#uses=2]
115        br i1 false, label %cond_next, label %cond_true
116cond_true:              ; preds = %bb
117        ret void
118cond_next:              ; preds = %bb
119        br i1 false, label %cond_next144, label %cond_false
120cond_false:             ; preds = %cond_next
121        ret void
122cond_next144:           ; preds = %cond_next
123        br i1 false, label %cond_next205, label %cond_true163
124cond_true163:           ; preds = %cond_next144
125        br i1 false, label %bb34.i, label %bb.i53
126bb.i53:         ; preds = %cond_true163
127        ret void
128bb34.i:         ; preds = %cond_true163
129        %tmp37.i55 = load i32, i32* null, align 4               ; <i32> [#uses=1]
130        br i1 false, label %bb65.preheader.i, label %bb78.i
131bb65.preheader.i:               ; preds = %bb34.i
132        br label %bb65.outer.us.i
133bb65.outer.us.i:                ; preds = %bb65.outer.us.i, %bb65.preheader.i
134        br i1 false, label %bb78.i, label %bb65.outer.us.i
135bb78.i:         ; preds = %bb65.outer.us.i, %bb34.i
136        br i1 false, label %bb151.i.preheader, label %bb90.i
137bb90.i:         ; preds = %bb78.i
138        ret void
139bb151.i.preheader:              ; preds = %bb78.i
140        br label %bb151.i
141bb151.i:                ; preds = %bb226.backedge.i, %bb151.i.preheader
142        %i.154.i = phi i32 [ %tmp15747.i, %bb226.backedge.i ], [ 0, %bb151.i.preheader ]                ; <i32> [#uses=2]
143        %tmp15747.i = add i32 %i.154.i, 1               ; <i32> [#uses=3]
144        br i1 false, label %bb155.i, label %bb226.backedge.i
145bb226.backedge.i:               ; preds = %cond_next215.i, %bb151.i
146        %tmp228.i71 = icmp slt i32 %tmp15747.i, 3               ; <i1> [#uses=1]
147        br i1 %tmp228.i71, label %bb151.i, label %amp_scalefac_bands.exit
148bb155.i:                ; preds = %cond_next215.i, %bb151.i
149        %indvar90.i = phi i32 [ %indvar.next91.i, %cond_next215.i ], [ 0, %bb151.i ]            ; <i32> [#uses=2]
150        %sfb.3.reg2mem.0.i = add i32 %indvar90.i, %tmp37.i55            ; <i32> [#uses=4]
151        %tmp161.i = getelementptr [4 x [21 x double]], [4 x [21 x double]]* null, i32 0, i32 %tmp15747.i, i32 %sfb.3.reg2mem.0.i                ; <double*> [#uses=1]
152        %tmp162.i74 = load double, double* %tmp161.i, align 4           ; <double> [#uses=0]
153        br i1 false, label %cond_true167.i, label %cond_next215.i
154cond_true167.i:         ; preds = %bb155.i
155        %tmp173.i = getelementptr %struct.III_scalefac_t, %struct.III_scalefac_t* null, i32 0, i32 1, i32 %sfb.3.reg2mem.0.i, i32 %i.154.i              ; <i32*> [#uses=1]
156        store i32 0, i32* %tmp173.i, align 4
157        %tmp182.1.i = getelementptr [14 x i32], [14 x i32]* @scalefac_band.1, i32 0, i32 %sfb.3.reg2mem.0.i             ; <i32*> [#uses=0]
158        %tmp185.i78 = add i32 %sfb.3.reg2mem.0.i, 1             ; <i32> [#uses=1]
159        %tmp187.1.i = getelementptr [14 x i32], [14 x i32]* @scalefac_band.1, i32 0, i32 %tmp185.i78            ; <i32*> [#uses=1]
160        %tmp188.i = load i32, i32* %tmp187.1.i, align 4         ; <i32> [#uses=1]
161        %tmp21153.i = icmp slt i32 0, %tmp188.i         ; <i1> [#uses=1]
162        br i1 %tmp21153.i, label %bb190.preheader.i, label %cond_next215.i
163bb190.preheader.i:              ; preds = %cond_true167.i
164        ret void
165cond_next215.i:         ; preds = %cond_true167.i, %bb155.i
166        %indvar.next91.i = add i32 %indvar90.i, 1               ; <i32> [#uses=2]
167        %exitcond99.i87 = icmp eq i32 %indvar.next91.i, 0               ; <i1> [#uses=1]
168        br i1 %exitcond99.i87, label %bb226.backedge.i, label %bb155.i
169amp_scalefac_bands.exit:                ; preds = %bb226.backedge.i
170        br i1 false, label %bb19.i, label %bb.i16
171bb.i16:         ; preds = %amp_scalefac_bands.exit
172        ret void
173bb19.i:         ; preds = %amp_scalefac_bands.exit
174        br i1 false, label %bb40.outer.i, label %cond_next205
175bb40.outer.i:           ; preds = %bb19.i
176        ret void
177cond_next205:           ; preds = %bb19.i, %cond_next144
178        br i1 false, label %bb226, label %cond_true210
179cond_true210:           ; preds = %cond_next205
180        br i1 false, label %bb226, label %cond_true217
181cond_true217:           ; preds = %cond_true210
182        %tmp221 = call fastcc i32 @init_outer_loop( %struct.lame_global_flags* %gfp, double* %xr, %struct.gr_info* %cod_info )          ; <i32> [#uses=0]
183        ret void
184bb226:          ; preds = %cond_true210, %cond_next205
185        br i1 false, label %bb231, label %bb
186bb231:          ; preds = %bb226
187        store i32 %save_cod_info.1.1, i32* %cod_info.182
188        ret void
189}
190
191define fastcc void @outer_loop2(%struct.lame_global_flags* %gfp, double* %xr, i32 %targ_bits, double* %best_noise, %struct.III_psy_xmin* %l3_xmin, i32* %l3_enc, %struct.III_scalefac_t* %scalefac, %struct.gr_info* %cod_info, i32 %ch) {
192entry:
193        %cod_info.20128.1 = getelementptr %struct.gr_info, %struct.gr_info* %cod_info, i32 0, i32 20, i32 1             ; <i32*> [#uses=1]
194        %cod_info.20128.2 = getelementptr %struct.gr_info, %struct.gr_info* %cod_info, i32 0, i32 20, i32 2             ; <i32*> [#uses=1]
195        %cod_info.20128.3 = getelementptr %struct.gr_info, %struct.gr_info* %cod_info, i32 0, i32 20, i32 3             ; <i32*> [#uses=1]
196        br label %bb
197bb:             ; preds = %bb226, %entry
198        %save_cod_info.19.1 = phi i32* [ undef, %entry ], [ %save_cod_info.19.0, %bb226 ]               ; <i32*> [#uses=1]
199        %save_cod_info.0.1 = phi i32 [ undef, %entry ], [ %save_cod_info.0.0, %bb226 ]          ; <i32> [#uses=1]
200        br i1 false, label %cond_next144, label %cond_false
201cond_false:             ; preds = %bb
202        br i1 false, label %cond_true56, label %cond_false78
203cond_true56:            ; preds = %cond_false
204        br i1 false, label %inner_loop.exit, label %cond_next85
205inner_loop.exit:                ; preds = %cond_true56
206        br i1 false, label %cond_next104, label %cond_false96
207cond_false78:           ; preds = %cond_false
208        ret void
209cond_next85:            ; preds = %cond_true56
210        ret void
211cond_false96:           ; preds = %inner_loop.exit
212        ret void
213cond_next104:           ; preds = %inner_loop.exit
214        br i1 false, label %cond_next144, label %cond_false110
215cond_false110:          ; preds = %cond_next104
216        ret void
217cond_next144:           ; preds = %cond_next104, %bb
218        %save_cod_info.19.0 = phi i32* [ %save_cod_info.19.1, %bb ], [ null, %cond_next104 ]            ; <i32*> [#uses=1]
219        %save_cod_info.4.0 = phi i32 [ 0, %bb ], [ 0, %cond_next104 ]           ; <i32> [#uses=1]
220        %save_cod_info.3.0 = phi i32 [ 0, %bb ], [ 0, %cond_next104 ]           ; <i32> [#uses=1]
221        %save_cod_info.2.0 = phi i32 [ 0, %bb ], [ 0, %cond_next104 ]           ; <i32> [#uses=1]
222        %save_cod_info.1.0 = phi i32 [ 0, %bb ], [ 0, %cond_next104 ]           ; <i32> [#uses=1]
223        %save_cod_info.0.0 = phi i32 [ %save_cod_info.0.1, %bb ], [ 0, %cond_next104 ]          ; <i32> [#uses=1]
224        %over.1 = phi i32 [ 0, %bb ], [ 0, %cond_next104 ]              ; <i32> [#uses=1]
225        %best_over.0 = phi i32 [ 0, %bb ], [ 0, %cond_next104 ]         ; <i32> [#uses=1]
226        %notdone.0 = phi i32 [ 0, %bb ], [ 0, %cond_next104 ]           ; <i32> [#uses=1]
227        %tmp147 = load i32, i32* null, align 4          ; <i32> [#uses=1]
228        %tmp148 = icmp eq i32 %tmp147, 0                ; <i1> [#uses=1]
229        %tmp153 = icmp eq i32 %over.1, 0                ; <i1> [#uses=1]
230        %bothcond = and i1 %tmp148, %tmp153             ; <i1> [#uses=1]
231        %notdone.2 = select i1 %bothcond, i32 0, i32 %notdone.0         ; <i32> [#uses=1]
232        br i1 false, label %cond_next205, label %cond_true163
233cond_true163:           ; preds = %cond_next144
234        ret void
235cond_next205:           ; preds = %cond_next144
236        br i1 false, label %bb226, label %cond_true210
237cond_true210:           ; preds = %cond_next205
238        ret void
239bb226:          ; preds = %cond_next205
240        %tmp228 = icmp eq i32 %notdone.2, 0             ; <i1> [#uses=1]
241        br i1 %tmp228, label %bb231, label %bb
242bb231:          ; preds = %bb226
243        store i32 %save_cod_info.1.0, i32* null
244        store i32 %save_cod_info.2.0, i32* null
245        store i32 %save_cod_info.3.0, i32* null
246        store i32 %save_cod_info.4.0, i32* null
247        store i32 0, i32* %cod_info.20128.1
248        store i32 0, i32* %cod_info.20128.2
249        store i32 0, i32* %cod_info.20128.3
250        %tmp244245 = sitofp i32 %best_over.0 to double          ; <double> [#uses=1]
251        store double %tmp244245, double* %best_noise, align 4
252        ret void
253}
Note: See TracBrowser for help on using the repository browser.