AMDGPU: Add pass to detect used kernel features
[oota-llvm.git] / test / CodeGen / AMDGPU / si-spill-cf.ll
1 ; RUN: llc -march=amdgcn -mcpu=SI < %s -verify-machineinstrs | FileCheck -check-prefix=SI %s
2 ; RUN: llc -march=amdgcn -mcpu=tonga < %s -verify-machineinstrs | FileCheck -check-prefix=SI %s
3
4 ; If this occurs it is likely due to reordering and the restore was
5 ; originally supposed to happen before SI_END_CF.
6 ; SI: s_or_b64 exec, exec, [[SAVED:s\[[0-9]+:[0-9]+\]|[a-z]+]]
7 ; SI-NOT: v_readlane_b32 [[SAVED]]
8
9 define void @main() #0 {
10 main_body:
11   %0 = call float @llvm.SI.load.const(<16 x i8> undef, i32 16)
12   %1 = call float @llvm.SI.load.const(<16 x i8> undef, i32 32)
13   %2 = call float @llvm.SI.load.const(<16 x i8> undef, i32 80)
14   %3 = call float @llvm.SI.load.const(<16 x i8> undef, i32 84)
15   %4 = call float @llvm.SI.load.const(<16 x i8> undef, i32 88)
16   %5 = call float @llvm.SI.load.const(<16 x i8> undef, i32 96)
17   %6 = call float @llvm.SI.load.const(<16 x i8> undef, i32 100)
18   %7 = call float @llvm.SI.load.const(<16 x i8> undef, i32 104)
19   %8 = call float @llvm.SI.load.const(<16 x i8> undef, i32 112)
20   %9 = call float @llvm.SI.load.const(<16 x i8> undef, i32 116)
21   %10 = call float @llvm.SI.load.const(<16 x i8> undef, i32 120)
22   %11 = call float @llvm.SI.load.const(<16 x i8> undef, i32 128)
23   %12 = call float @llvm.SI.load.const(<16 x i8> undef, i32 132)
24   %13 = call float @llvm.SI.load.const(<16 x i8> undef, i32 136)
25   %14 = call float @llvm.SI.load.const(<16 x i8> undef, i32 144)
26   %15 = call float @llvm.SI.load.const(<16 x i8> undef, i32 148)
27   %16 = call float @llvm.SI.load.const(<16 x i8> undef, i32 152)
28   %17 = call float @llvm.SI.load.const(<16 x i8> undef, i32 160)
29   %18 = call float @llvm.SI.load.const(<16 x i8> undef, i32 164)
30   %19 = call float @llvm.SI.load.const(<16 x i8> undef, i32 168)
31   %20 = call float @llvm.SI.load.const(<16 x i8> undef, i32 176)
32   %21 = call float @llvm.SI.load.const(<16 x i8> undef, i32 180)
33   %22 = call float @llvm.SI.load.const(<16 x i8> undef, i32 184)
34   %23 = call float @llvm.SI.load.const(<16 x i8> undef, i32 192)
35   %24 = call float @llvm.SI.load.const(<16 x i8> undef, i32 196)
36   %25 = call float @llvm.SI.load.const(<16 x i8> undef, i32 200)
37   %26 = call float @llvm.SI.load.const(<16 x i8> undef, i32 208)
38   %27 = call float @llvm.SI.load.const(<16 x i8> undef, i32 212)
39   %28 = call float @llvm.SI.load.const(<16 x i8> undef, i32 216)
40   %29 = call float @llvm.SI.load.const(<16 x i8> undef, i32 224)
41   %30 = call float @llvm.SI.load.const(<16 x i8> undef, i32 228)
42   %31 = call float @llvm.SI.load.const(<16 x i8> undef, i32 232)
43   %32 = call float @llvm.SI.load.const(<16 x i8> undef, i32 240)
44   %33 = call float @llvm.SI.load.const(<16 x i8> undef, i32 244)
45   %34 = call float @llvm.SI.load.const(<16 x i8> undef, i32 248)
46   %35 = call float @llvm.SI.load.const(<16 x i8> undef, i32 256)
47   %36 = call float @llvm.SI.load.const(<16 x i8> undef, i32 260)
48   %37 = call float @llvm.SI.load.const(<16 x i8> undef, i32 264)
49   %38 = call float @llvm.SI.load.const(<16 x i8> undef, i32 272)
50   %39 = call float @llvm.SI.load.const(<16 x i8> undef, i32 276)
51   %40 = call float @llvm.SI.load.const(<16 x i8> undef, i32 280)
52   %41 = call float @llvm.SI.load.const(<16 x i8> undef, i32 288)
53   %42 = call float @llvm.SI.load.const(<16 x i8> undef, i32 292)
54   %43 = call float @llvm.SI.load.const(<16 x i8> undef, i32 296)
55   %44 = call float @llvm.SI.load.const(<16 x i8> undef, i32 304)
56   %45 = call float @llvm.SI.load.const(<16 x i8> undef, i32 308)
57   %46 = call float @llvm.SI.load.const(<16 x i8> undef, i32 312)
58   %47 = call float @llvm.SI.load.const(<16 x i8> undef, i32 320)
59   %48 = call float @llvm.SI.load.const(<16 x i8> undef, i32 324)
60   %49 = call float @llvm.SI.load.const(<16 x i8> undef, i32 328)
61   %50 = call float @llvm.SI.load.const(<16 x i8> undef, i32 336)
62   %51 = call float @llvm.SI.load.const(<16 x i8> undef, i32 340)
63   %52 = call float @llvm.SI.load.const(<16 x i8> undef, i32 344)
64   %53 = call float @llvm.SI.load.const(<16 x i8> undef, i32 352)
65   %54 = call float @llvm.SI.load.const(<16 x i8> undef, i32 356)
66   %55 = call float @llvm.SI.load.const(<16 x i8> undef, i32 360)
67   %56 = call float @llvm.SI.load.const(<16 x i8> undef, i32 368)
68   %57 = call float @llvm.SI.load.const(<16 x i8> undef, i32 372)
69   %58 = call float @llvm.SI.load.const(<16 x i8> undef, i32 376)
70   %59 = call float @llvm.SI.load.const(<16 x i8> undef, i32 384)
71   %60 = call float @llvm.SI.load.const(<16 x i8> undef, i32 388)
72   %61 = call float @llvm.SI.load.const(<16 x i8> undef, i32 392)
73   %62 = call float @llvm.SI.load.const(<16 x i8> undef, i32 400)
74   %63 = call float @llvm.SI.load.const(<16 x i8> undef, i32 404)
75   %64 = call float @llvm.SI.load.const(<16 x i8> undef, i32 408)
76   %65 = call float @llvm.SI.load.const(<16 x i8> undef, i32 416)
77   %66 = call float @llvm.SI.load.const(<16 x i8> undef, i32 420)
78   br label %LOOP
79
80 LOOP:                                             ; preds = %ENDIF2795, %main_body
81   %temp894.0 = phi float [ 0.000000e+00, %main_body ], [ %temp894.1, %ENDIF2795 ]
82   %temp18.0 = phi float [ undef, %main_body ], [ %temp18.1, %ENDIF2795 ]
83   %67 = icmp sgt i32 undef, 4
84   br i1 %67, label %ENDLOOP, label %ENDIF
85
86 ENDLOOP:                                          ; preds = %ELSE2566, %LOOP
87   %68 = call float @llvm.AMDGPU.lrp(float %0, float undef, float undef)
88   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 0, float undef, float %68, float undef, float 1.000000e+00)
89   ret void
90
91 ENDIF:                                            ; preds = %LOOP
92   %69 = fsub float %2, undef
93   %70 = fsub float %3, undef
94   %71 = fsub float %4, undef
95   %72 = fmul float %69, 0.000000e+00
96   %73 = fmul float %70, undef
97   %74 = fmul float %71, undef
98   %75 = fsub float %6, undef
99   %76 = fsub float %7, undef
100   %77 = fmul float %75, undef
101   %78 = fmul float %76, 0.000000e+00
102   %79 = call float @llvm.minnum.f32(float %74, float %78)
103   %80 = call float @llvm.maxnum.f32(float %72, float 0.000000e+00)
104   %81 = call float @llvm.maxnum.f32(float %73, float %77)
105   %82 = call float @llvm.maxnum.f32(float undef, float %79)
106   %83 = call float @llvm.minnum.f32(float %80, float %81)
107   %84 = call float @llvm.minnum.f32(float %83, float undef)
108   %85 = fsub float %14, undef
109   %86 = fsub float %15, undef
110   %87 = fsub float %16, undef
111   %88 = fmul float %85, undef
112   %89 = fmul float %86, undef
113   %90 = fmul float %87, undef
114   %91 = fsub float %17, undef
115   %92 = fsub float %18, undef
116   %93 = fsub float %19, undef
117   %94 = fmul float %91, 0.000000e+00
118   %95 = fmul float %92, undef
119   %96 = fmul float %93, undef
120   %97 = call float @llvm.minnum.f32(float %89, float %95)
121   %98 = call float @llvm.maxnum.f32(float %88, float %94)
122   %99 = call float @llvm.maxnum.f32(float %90, float %96)
123   %100 = call float @llvm.maxnum.f32(float undef, float %97)
124   %101 = call float @llvm.maxnum.f32(float %100, float undef)
125   %102 = call float @llvm.minnum.f32(float %98, float undef)
126   %103 = call float @llvm.minnum.f32(float %102, float %99)
127   %104 = fsub float %30, undef
128   %105 = fsub float %31, undef
129   %106 = fmul float %104, 0.000000e+00
130   %107 = fmul float %105, 0.000000e+00
131   %108 = call float @llvm.minnum.f32(float undef, float %106)
132   %109 = call float @llvm.maxnum.f32(float undef, float %107)
133   %110 = call float @llvm.maxnum.f32(float undef, float %108)
134   %111 = call float @llvm.maxnum.f32(float %110, float undef)
135   %112 = call float @llvm.minnum.f32(float undef, float %109)
136   %113 = fsub float %32, undef
137   %114 = fsub float %33, undef
138   %115 = fsub float %34, undef
139   %116 = fmul float %113, 0.000000e+00
140   %117 = fmul float %114, undef
141   %118 = fmul float %115, undef
142   %119 = fsub float %35, undef
143   %120 = fsub float %36, undef
144   %121 = fsub float %37, undef
145   %122 = fmul float %119, undef
146   %123 = fmul float %120, undef
147   %124 = fmul float %121, undef
148   %125 = call float @llvm.minnum.f32(float %116, float %122)
149   %126 = call float @llvm.minnum.f32(float %117, float %123)
150   %127 = call float @llvm.minnum.f32(float %118, float %124)
151   %128 = call float @llvm.maxnum.f32(float %125, float %126)
152   %129 = call float @llvm.maxnum.f32(float %128, float %127)
153   %130 = fsub float %38, undef
154   %131 = fsub float %39, undef
155   %132 = fsub float %40, undef
156   %133 = fmul float %130, 0.000000e+00
157   %134 = fmul float %131, undef
158   %135 = fmul float %132, undef
159   %136 = fsub float %41, undef
160   %137 = fsub float %42, undef
161   %138 = fsub float %43, undef
162   %139 = fmul float %136, undef
163   %140 = fmul float %137, undef
164   %141 = fmul float %138, undef
165   %142 = call float @llvm.minnum.f32(float %133, float %139)
166   %143 = call float @llvm.minnum.f32(float %134, float %140)
167   %144 = call float @llvm.minnum.f32(float %135, float %141)
168   %145 = call float @llvm.maxnum.f32(float %142, float %143)
169   %146 = call float @llvm.maxnum.f32(float %145, float %144)
170   %147 = fsub float %44, undef
171   %148 = fsub float %45, undef
172   %149 = fsub float %46, undef
173   %150 = fmul float %147, 0.000000e+00
174   %151 = fmul float %148, 0.000000e+00
175   %152 = fmul float %149, undef
176   %153 = fsub float %47, undef
177   %154 = fsub float %48, undef
178   %155 = fsub float %49, undef
179   %156 = fmul float %153, undef
180   %157 = fmul float %154, 0.000000e+00
181   %158 = fmul float %155, undef
182   %159 = call float @llvm.minnum.f32(float %150, float %156)
183   %160 = call float @llvm.minnum.f32(float %151, float %157)
184   %161 = call float @llvm.minnum.f32(float %152, float %158)
185   %162 = call float @llvm.maxnum.f32(float %159, float %160)
186   %163 = call float @llvm.maxnum.f32(float %162, float %161)
187   %164 = fsub float %50, undef
188   %165 = fsub float %51, undef
189   %166 = fsub float %52, undef
190   %167 = fmul float %164, undef
191   %168 = fmul float %165, 0.000000e+00
192   %169 = fmul float %166, 0.000000e+00
193   %170 = fsub float %53, undef
194   %171 = fsub float %54, undef
195   %172 = fsub float %55, undef
196   %173 = fdiv float 1.000000e+00, %temp18.0
197   %174 = fmul float %170, undef
198   %175 = fmul float %171, undef
199   %176 = fmul float %172, %173
200   %177 = call float @llvm.minnum.f32(float %167, float %174)
201   %178 = call float @llvm.minnum.f32(float %168, float %175)
202   %179 = call float @llvm.minnum.f32(float %169, float %176)
203   %180 = call float @llvm.maxnum.f32(float %177, float %178)
204   %181 = call float @llvm.maxnum.f32(float %180, float %179)
205   %182 = fsub float %62, undef
206   %183 = fsub float %63, undef
207   %184 = fsub float %64, undef
208   %185 = fmul float %182, 0.000000e+00
209   %186 = fmul float %183, undef
210   %187 = fmul float %184, undef
211   %188 = fsub float %65, undef
212   %189 = fsub float %66, undef
213   %190 = fmul float %188, undef
214   %191 = fmul float %189, undef
215   %192 = call float @llvm.maxnum.f32(float %185, float %190)
216   %193 = call float @llvm.maxnum.f32(float %186, float %191)
217   %194 = call float @llvm.maxnum.f32(float %187, float undef)
218   %195 = call float @llvm.minnum.f32(float %192, float %193)
219   %196 = call float @llvm.minnum.f32(float %195, float %194)
220   %.temp292.7 = select i1 undef, float %163, float undef
221   %temp292.9 = select i1 false, float %181, float %.temp292.7
222   %.temp292.9 = select i1 undef, float undef, float %temp292.9
223   %197 = fcmp ogt float undef, 0.000000e+00
224   %198 = fcmp olt float undef, %196
225   %199 = and i1 %197, %198
226   %200 = fcmp olt float undef, %.temp292.9
227   %201 = and i1 %199, %200
228   %temp292.11 = select i1 %201, float undef, float %.temp292.9
229   br i1 undef, label %IF2565, label %ELSE2566
230
231 IF2565:                                           ; preds = %ENDIF
232   br i1 false, label %ENDIF2582, label %ELSE2584
233
234 ELSE2566:                                         ; preds = %ENDIF
235   %202 = fcmp oeq float %temp292.11, 1.000000e+04
236   br i1 %202, label %ENDLOOP, label %ELSE2593
237
238 ENDIF2564:                                        ; preds = %ENDIF2594, %ENDIF2588
239   %temp894.1 = phi float [ undef, %ENDIF2588 ], [ %temp894.2, %ENDIF2594 ]
240   %temp18.1 = phi float [ %219, %ENDIF2588 ], [ undef, %ENDIF2594 ]
241   %203 = fsub float %5, undef
242   %204 = fmul float %203, undef
243   %205 = call float @llvm.maxnum.f32(float undef, float %204)
244   %206 = call float @llvm.minnum.f32(float %205, float undef)
245   %207 = call float @llvm.minnum.f32(float %206, float undef)
246   %208 = fcmp ogt float undef, 0.000000e+00
247   %209 = fcmp olt float undef, 1.000000e+00
248   %210 = and i1 %208, %209
249   %211 = fcmp olt float undef, %207
250   %212 = and i1 %210, %211
251   br i1 %212, label %ENDIF2795, label %ELSE2797
252
253 ELSE2584:                                         ; preds = %IF2565
254   br label %ENDIF2582
255
256 ENDIF2582:                                        ; preds = %ELSE2584, %IF2565
257   %213 = fadd float %1, undef
258   %214 = fadd float 0.000000e+00, %213
259   %215 = call float @llvm.AMDIL.fraction.(float %214)
260   br i1 undef, label %IF2589, label %ELSE2590
261
262 IF2589:                                           ; preds = %ENDIF2582
263   br label %ENDIF2588
264
265 ELSE2590:                                         ; preds = %ENDIF2582
266   br label %ENDIF2588
267
268 ENDIF2588:                                        ; preds = %ELSE2590, %IF2589
269   %216 = fsub float 1.000000e+00, %215
270   %217 = call float @llvm.sqrt.f32(float %216)
271   %218 = fmul float %217, undef
272   %219 = fadd float %218, undef
273   br label %ENDIF2564
274
275 ELSE2593:                                         ; preds = %ELSE2566
276   %220 = fcmp oeq float %temp292.11, %82
277   %221 = fcmp olt float %82, %84
278   %222 = and i1 %220, %221
279   br i1 %222, label %ENDIF2594, label %ELSE2596
280
281 ELSE2596:                                         ; preds = %ELSE2593
282   %223 = fcmp oeq float %temp292.11, %101
283   %224 = fcmp olt float %101, %103
284   %225 = and i1 %223, %224
285   br i1 %225, label %ENDIF2594, label %ELSE2632
286
287 ENDIF2594:                                        ; preds = %ELSE2788, %ELSE2785, %ELSE2782, %ELSE2779, %IF2775, %ELSE2761, %ELSE2758, %IF2757, %ELSE2704, %ELSE2686, %ELSE2671, %ELSE2668, %IF2667, %ELSE2632, %ELSE2596, %ELSE2593
288   %temp894.2 = phi float [ 0.000000e+00, %IF2667 ], [ 0.000000e+00, %ELSE2671 ], [ 0.000000e+00, %IF2757 ], [ 0.000000e+00, %ELSE2761 ], [ %temp894.0, %ELSE2758 ], [ 0.000000e+00, %IF2775 ], [ 0.000000e+00, %ELSE2779 ], [ 0.000000e+00, %ELSE2782 ], [ %.2848, %ELSE2788 ], [ 0.000000e+00, %ELSE2785 ], [ 0.000000e+00, %ELSE2593 ], [ 0.000000e+00, %ELSE2632 ], [ 0.000000e+00, %ELSE2704 ], [ 0.000000e+00, %ELSE2686 ], [ 0.000000e+00, %ELSE2668 ], [ 0.000000e+00, %ELSE2596 ]
289   %226 = fmul float %temp894.2, undef
290   br label %ENDIF2564
291
292 ELSE2632:                                         ; preds = %ELSE2596
293   br i1 undef, label %ENDIF2594, label %ELSE2650
294
295 ELSE2650:                                         ; preds = %ELSE2632
296   %227 = fcmp oeq float %temp292.11, %111
297   %228 = fcmp olt float %111, %112
298   %229 = and i1 %227, %228
299   br i1 %229, label %IF2667, label %ELSE2668
300
301 IF2667:                                           ; preds = %ELSE2650
302   br i1 undef, label %ENDIF2594, label %ELSE2671
303
304 ELSE2668:                                         ; preds = %ELSE2650
305   %230 = fcmp oeq float %temp292.11, %129
306   %231 = fcmp olt float %129, undef
307   %232 = and i1 %230, %231
308   br i1 %232, label %ENDIF2594, label %ELSE2686
309
310 ELSE2671:                                         ; preds = %IF2667
311   br label %ENDIF2594
312
313 ELSE2686:                                         ; preds = %ELSE2668
314   %233 = fcmp oeq float %temp292.11, %146
315   %234 = fcmp olt float %146, undef
316   %235 = and i1 %233, %234
317   br i1 %235, label %ENDIF2594, label %ELSE2704
318
319 ELSE2704:                                         ; preds = %ELSE2686
320   %236 = fcmp oeq float %temp292.11, %181
321   %237 = fcmp olt float %181, undef
322   %238 = and i1 %236, %237
323   br i1 %238, label %ENDIF2594, label %ELSE2740
324
325 ELSE2740:                                         ; preds = %ELSE2704
326   br i1 undef, label %IF2757, label %ELSE2758
327
328 IF2757:                                           ; preds = %ELSE2740
329   br i1 undef, label %ENDIF2594, label %ELSE2761
330
331 ELSE2758:                                         ; preds = %ELSE2740
332   br i1 undef, label %IF2775, label %ENDIF2594
333
334 ELSE2761:                                         ; preds = %IF2757
335   br label %ENDIF2594
336
337 IF2775:                                           ; preds = %ELSE2758
338   %239 = fcmp olt float undef, undef
339   br i1 %239, label %ENDIF2594, label %ELSE2779
340
341 ELSE2779:                                         ; preds = %IF2775
342   br i1 undef, label %ENDIF2594, label %ELSE2782
343
344 ELSE2782:                                         ; preds = %ELSE2779
345   br i1 undef, label %ENDIF2594, label %ELSE2785
346
347 ELSE2785:                                         ; preds = %ELSE2782
348   %240 = fcmp olt float undef, 0.000000e+00
349   br i1 %240, label %ENDIF2594, label %ELSE2788
350
351 ELSE2788:                                         ; preds = %ELSE2785
352   %241 = fcmp olt float 0.000000e+00, undef
353   %.2848 = select i1 %241, float -1.000000e+00, float 1.000000e+00
354   br label %ENDIF2594
355
356 ELSE2797:                                         ; preds = %ENDIF2564
357   %242 = fsub float %8, undef
358   %243 = fsub float %9, undef
359   %244 = fsub float %10, undef
360   %245 = fmul float %242, undef
361   %246 = fmul float %243, undef
362   %247 = fmul float %244, undef
363   %248 = fsub float %11, undef
364   %249 = fsub float %12, undef
365   %250 = fsub float %13, undef
366   %251 = fmul float %248, undef
367   %252 = fmul float %249, undef
368   %253 = fmul float %250, undef
369   %254 = call float @llvm.minnum.f32(float %245, float %251)
370   %255 = call float @llvm.minnum.f32(float %246, float %252)
371   %256 = call float @llvm.maxnum.f32(float %247, float %253)
372   %257 = call float @llvm.maxnum.f32(float %254, float %255)
373   %258 = call float @llvm.maxnum.f32(float %257, float undef)
374   %259 = call float @llvm.minnum.f32(float undef, float %256)
375   %260 = fcmp ogt float %258, 0.000000e+00
376   %261 = fcmp olt float %258, 1.000000e+00
377   %262 = and i1 %260, %261
378   %263 = fcmp olt float %258, %259
379   %264 = and i1 %262, %263
380   br i1 %264, label %ENDIF2795, label %ELSE2800
381
382 ENDIF2795:                                        ; preds = %ELSE2824, %ELSE2821, %ELSE2818, %ELSE2815, %ELSE2812, %ELSE2809, %ELSE2806, %ELSE2803, %ELSE2800, %ELSE2797, %ENDIF2564
383   br label %LOOP
384
385 ELSE2800:                                         ; preds = %ELSE2797
386   br i1 undef, label %ENDIF2795, label %ELSE2803
387
388 ELSE2803:                                         ; preds = %ELSE2800
389   %265 = fsub float %20, undef
390   %266 = fsub float %21, undef
391   %267 = fsub float %22, undef
392   %268 = fmul float %265, undef
393   %269 = fmul float %266, undef
394   %270 = fmul float %267, 0.000000e+00
395   %271 = fsub float %23, undef
396   %272 = fsub float %24, undef
397   %273 = fsub float %25, undef
398   %274 = fmul float %271, undef
399   %275 = fmul float %272, undef
400   %276 = fmul float %273, undef
401   %277 = call float @llvm.minnum.f32(float %268, float %274)
402   %278 = call float @llvm.maxnum.f32(float %269, float %275)
403   %279 = call float @llvm.maxnum.f32(float %270, float %276)
404   %280 = call float @llvm.maxnum.f32(float %277, float undef)
405   %281 = call float @llvm.maxnum.f32(float %280, float undef)
406   %282 = call float @llvm.minnum.f32(float undef, float %278)
407   %283 = call float @llvm.minnum.f32(float %282, float %279)
408   %284 = fcmp ogt float %281, 0.000000e+00
409   %285 = fcmp olt float %281, 1.000000e+00
410   %286 = and i1 %284, %285
411   %287 = fcmp olt float %281, %283
412   %288 = and i1 %286, %287
413   br i1 %288, label %ENDIF2795, label %ELSE2806
414
415 ELSE2806:                                         ; preds = %ELSE2803
416   %289 = fsub float %26, undef
417   %290 = fsub float %27, undef
418   %291 = fsub float %28, undef
419   %292 = fmul float %289, undef
420   %293 = fmul float %290, 0.000000e+00
421   %294 = fmul float %291, undef
422   %295 = fsub float %29, undef
423   %296 = fmul float %295, undef
424   %297 = call float @llvm.minnum.f32(float %292, float %296)
425   %298 = call float @llvm.minnum.f32(float %293, float undef)
426   %299 = call float @llvm.maxnum.f32(float %294, float undef)
427   %300 = call float @llvm.maxnum.f32(float %297, float %298)
428   %301 = call float @llvm.maxnum.f32(float %300, float undef)
429   %302 = call float @llvm.minnum.f32(float undef, float %299)
430   %303 = fcmp ogt float %301, 0.000000e+00
431   %304 = fcmp olt float %301, 1.000000e+00
432   %305 = and i1 %303, %304
433   %306 = fcmp olt float %301, %302
434   %307 = and i1 %305, %306
435   br i1 %307, label %ENDIF2795, label %ELSE2809
436
437 ELSE2809:                                         ; preds = %ELSE2806
438   br i1 undef, label %ENDIF2795, label %ELSE2812
439
440 ELSE2812:                                         ; preds = %ELSE2809
441   br i1 undef, label %ENDIF2795, label %ELSE2815
442
443 ELSE2815:                                         ; preds = %ELSE2812
444   br i1 undef, label %ENDIF2795, label %ELSE2818
445
446 ELSE2818:                                         ; preds = %ELSE2815
447   br i1 undef, label %ENDIF2795, label %ELSE2821
448
449 ELSE2821:                                         ; preds = %ELSE2818
450   %308 = fsub float %56, undef
451   %309 = fsub float %57, undef
452   %310 = fsub float %58, undef
453   %311 = fmul float %308, undef
454   %312 = fmul float %309, 0.000000e+00
455   %313 = fmul float %310, undef
456   %314 = fsub float %59, undef
457   %315 = fsub float %60, undef
458   %316 = fsub float %61, undef
459   %317 = fmul float %314, undef
460   %318 = fmul float %315, undef
461   %319 = fmul float %316, undef
462   %320 = call float @llvm.maxnum.f32(float %311, float %317)
463   %321 = call float @llvm.maxnum.f32(float %312, float %318)
464   %322 = call float @llvm.maxnum.f32(float %313, float %319)
465   %323 = call float @llvm.minnum.f32(float %320, float %321)
466   %324 = call float @llvm.minnum.f32(float %323, float %322)
467   %325 = fcmp ogt float undef, 0.000000e+00
468   %326 = fcmp olt float undef, 1.000000e+00
469   %327 = and i1 %325, %326
470   %328 = fcmp olt float undef, %324
471   %329 = and i1 %327, %328
472   br i1 %329, label %ENDIF2795, label %ELSE2824
473
474 ELSE2824:                                         ; preds = %ELSE2821
475   %.2849 = select i1 undef, float 0.000000e+00, float 1.000000e+00
476   br label %ENDIF2795
477 }
478
479 ; Function Attrs: nounwind readnone
480 declare float @llvm.SI.load.const(<16 x i8>, i32) #1
481
482 ; Function Attrs: readnone
483 declare float @llvm.AMDIL.fraction.(float) #2
484
485 ; Function Attrs: nounwind readnone
486 declare float @llvm.sqrt.f32(float) #1
487
488 ; Function Attrs: nounwind readnone
489 declare float @llvm.minnum.f32(float, float) #1
490
491 ; Function Attrs: nounwind readnone
492 declare float @llvm.maxnum.f32(float, float) #1
493
494 ; Function Attrs: readnone
495 declare float @llvm.AMDGPU.lrp(float, float, float) #2
496
497 declare void @llvm.SI.export(i32, i32, i32, i32, i32, float, float, float, float)
498
499 attributes #0 = { "ShaderType"="0" "enable-no-nans-fp-math"="true" }
500 attributes #1 = { nounwind readnone }
501 attributes #2 = { readnone }