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