blob: 3c6c9760f9442f286d27280a5f0bff3894045f3d [file] [log] [blame]
Tom Stellard28d13a42015-05-12 17:13:02 +00001; 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.
Matt Arsenault77131622016-01-23 05:42:38 +00006
Tom Stellard28d13a42015-05-12 17:13:02 +00007; SI: s_or_b64 exec, exec, [[SAVED:s\[[0-9]+:[0-9]+\]|[a-z]+]]
8; SI-NOT: v_readlane_b32 [[SAVED]]
Matt Arsenault77131622016-01-23 05:42:38 +00009define void @main() #1 {
Tom Stellard28d13a42015-05-12 17:13:02 +000010main_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
80LOOP: ; 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
86ENDLOOP: ; preds = %ELSE2566, %LOOP
Matt Arsenault77131622016-01-23 05:42:38 +000087 %one.sub.a.i = fsub float 1.000000e+00, %0
88 %one.sub.ac.i = fmul float %one.sub.a.i, undef
89 %result.i = fadd float fmul (float undef, float undef), %one.sub.ac.i
90 call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 0, float undef, float %result.i, float undef, float 1.000000e+00)
Tom Stellard28d13a42015-05-12 17:13:02 +000091 ret void
92
93ENDIF: ; preds = %LOOP
Matt Arsenault77131622016-01-23 05:42:38 +000094 %68 = fsub float %2, undef
95 %69 = fsub float %3, undef
96 %70 = fsub float %4, undef
97 %71 = fmul float %68, 0.000000e+00
98 %72 = fmul float %69, undef
Tom Stellard28d13a42015-05-12 17:13:02 +000099 %73 = fmul float %70, undef
Matt Arsenault77131622016-01-23 05:42:38 +0000100 %74 = fsub float %6, undef
101 %75 = fsub float %7, undef
102 %76 = fmul float %74, undef
103 %77 = fmul float %75, 0.000000e+00
104 %78 = call float @llvm.minnum.f32(float %73, float %77)
105 %79 = call float @llvm.maxnum.f32(float %71, float 0.000000e+00)
106 %80 = call float @llvm.maxnum.f32(float %72, float %76)
107 %81 = call float @llvm.maxnum.f32(float undef, float %78)
108 %82 = call float @llvm.minnum.f32(float %79, float %80)
109 %83 = call float @llvm.minnum.f32(float %82, float undef)
110 %84 = fsub float %14, undef
111 %85 = fsub float %15, undef
112 %86 = fsub float %16, undef
113 %87 = fmul float %84, undef
Tom Stellard28d13a42015-05-12 17:13:02 +0000114 %88 = fmul float %85, undef
115 %89 = fmul float %86, undef
Matt Arsenault77131622016-01-23 05:42:38 +0000116 %90 = fsub float %17, undef
117 %91 = fsub float %18, undef
118 %92 = fsub float %19, undef
119 %93 = fmul float %90, 0.000000e+00
120 %94 = fmul float %91, undef
Tom Stellard28d13a42015-05-12 17:13:02 +0000121 %95 = fmul float %92, undef
Matt Arsenault77131622016-01-23 05:42:38 +0000122 %96 = call float @llvm.minnum.f32(float %88, float %94)
123 %97 = call float @llvm.maxnum.f32(float %87, float %93)
124 %98 = call float @llvm.maxnum.f32(float %89, float %95)
125 %99 = call float @llvm.maxnum.f32(float undef, float %96)
126 %100 = call float @llvm.maxnum.f32(float %99, float undef)
127 %101 = call float @llvm.minnum.f32(float %97, float undef)
128 %102 = call float @llvm.minnum.f32(float %101, float %98)
129 %103 = fsub float %30, undef
130 %104 = fsub float %31, undef
131 %105 = fmul float %103, 0.000000e+00
Tom Stellard28d13a42015-05-12 17:13:02 +0000132 %106 = fmul float %104, 0.000000e+00
Matt Arsenault77131622016-01-23 05:42:38 +0000133 %107 = call float @llvm.minnum.f32(float undef, float %105)
134 %108 = call float @llvm.maxnum.f32(float undef, float %106)
Tom Stellard28d13a42015-05-12 17:13:02 +0000135 %109 = call float @llvm.maxnum.f32(float undef, float %107)
Matt Arsenault77131622016-01-23 05:42:38 +0000136 %110 = call float @llvm.maxnum.f32(float %109, float undef)
137 %111 = call float @llvm.minnum.f32(float undef, float %108)
138 %112 = fsub float %32, undef
139 %113 = fsub float %33, undef
140 %114 = fsub float %34, undef
141 %115 = fmul float %112, 0.000000e+00
142 %116 = fmul float %113, undef
Tom Stellard28d13a42015-05-12 17:13:02 +0000143 %117 = fmul float %114, undef
Matt Arsenault77131622016-01-23 05:42:38 +0000144 %118 = fsub float %35, undef
145 %119 = fsub float %36, undef
146 %120 = fsub float %37, undef
147 %121 = fmul float %118, undef
Tom Stellard28d13a42015-05-12 17:13:02 +0000148 %122 = fmul float %119, undef
149 %123 = fmul float %120, undef
Matt Arsenault77131622016-01-23 05:42:38 +0000150 %124 = call float @llvm.minnum.f32(float %115, float %121)
Tom Stellard28d13a42015-05-12 17:13:02 +0000151 %125 = call float @llvm.minnum.f32(float %116, float %122)
152 %126 = call float @llvm.minnum.f32(float %117, float %123)
Matt Arsenault77131622016-01-23 05:42:38 +0000153 %127 = call float @llvm.maxnum.f32(float %124, float %125)
154 %128 = call float @llvm.maxnum.f32(float %127, float %126)
155 %129 = fsub float %38, undef
156 %130 = fsub float %39, undef
157 %131 = fsub float %40, undef
158 %132 = fmul float %129, 0.000000e+00
159 %133 = fmul float %130, undef
Tom Stellard28d13a42015-05-12 17:13:02 +0000160 %134 = fmul float %131, undef
Matt Arsenault77131622016-01-23 05:42:38 +0000161 %135 = fsub float %41, undef
162 %136 = fsub float %42, undef
163 %137 = fsub float %43, undef
164 %138 = fmul float %135, undef
Tom Stellard28d13a42015-05-12 17:13:02 +0000165 %139 = fmul float %136, undef
166 %140 = fmul float %137, undef
Matt Arsenault77131622016-01-23 05:42:38 +0000167 %141 = call float @llvm.minnum.f32(float %132, float %138)
Tom Stellard28d13a42015-05-12 17:13:02 +0000168 %142 = call float @llvm.minnum.f32(float %133, float %139)
169 %143 = call float @llvm.minnum.f32(float %134, float %140)
Matt Arsenault77131622016-01-23 05:42:38 +0000170 %144 = call float @llvm.maxnum.f32(float %141, float %142)
171 %145 = call float @llvm.maxnum.f32(float %144, float %143)
172 %146 = fsub float %44, undef
173 %147 = fsub float %45, undef
174 %148 = fsub float %46, undef
175 %149 = fmul float %146, 0.000000e+00
Tom Stellard28d13a42015-05-12 17:13:02 +0000176 %150 = fmul float %147, 0.000000e+00
Matt Arsenault77131622016-01-23 05:42:38 +0000177 %151 = fmul float %148, undef
178 %152 = fsub float %47, undef
179 %153 = fsub float %48, undef
180 %154 = fsub float %49, undef
181 %155 = fmul float %152, undef
182 %156 = fmul float %153, 0.000000e+00
183 %157 = fmul float %154, undef
184 %158 = call float @llvm.minnum.f32(float %149, float %155)
Tom Stellard28d13a42015-05-12 17:13:02 +0000185 %159 = call float @llvm.minnum.f32(float %150, float %156)
186 %160 = call float @llvm.minnum.f32(float %151, float %157)
Matt Arsenault77131622016-01-23 05:42:38 +0000187 %161 = call float @llvm.maxnum.f32(float %158, float %159)
188 %162 = call float @llvm.maxnum.f32(float %161, float %160)
189 %163 = fsub float %50, undef
190 %164 = fsub float %51, undef
191 %165 = fsub float %52, undef
192 %166 = fmul float %163, undef
193 %167 = fmul float %164, 0.000000e+00
Tom Stellard28d13a42015-05-12 17:13:02 +0000194 %168 = fmul float %165, 0.000000e+00
Matt Arsenault77131622016-01-23 05:42:38 +0000195 %169 = fsub float %53, undef
196 %170 = fsub float %54, undef
197 %171 = fsub float %55, undef
198 %172 = fdiv float 1.000000e+00, %temp18.0
199 %173 = fmul float %169, undef
Tom Stellard28d13a42015-05-12 17:13:02 +0000200 %174 = fmul float %170, undef
Matt Arsenault77131622016-01-23 05:42:38 +0000201 %175 = fmul float %171, %172
202 %176 = call float @llvm.minnum.f32(float %166, float %173)
Tom Stellard28d13a42015-05-12 17:13:02 +0000203 %177 = call float @llvm.minnum.f32(float %167, float %174)
204 %178 = call float @llvm.minnum.f32(float %168, float %175)
Matt Arsenault77131622016-01-23 05:42:38 +0000205 %179 = call float @llvm.maxnum.f32(float %176, float %177)
206 %180 = call float @llvm.maxnum.f32(float %179, float %178)
207 %181 = fsub float %62, undef
208 %182 = fsub float %63, undef
209 %183 = fsub float %64, undef
210 %184 = fmul float %181, 0.000000e+00
211 %185 = fmul float %182, undef
Tom Stellard28d13a42015-05-12 17:13:02 +0000212 %186 = fmul float %183, undef
Matt Arsenault77131622016-01-23 05:42:38 +0000213 %187 = fsub float %65, undef
214 %188 = fsub float %66, undef
215 %189 = fmul float %187, undef
Tom Stellard28d13a42015-05-12 17:13:02 +0000216 %190 = fmul float %188, undef
Matt Arsenault77131622016-01-23 05:42:38 +0000217 %191 = call float @llvm.maxnum.f32(float %184, float %189)
Tom Stellard28d13a42015-05-12 17:13:02 +0000218 %192 = call float @llvm.maxnum.f32(float %185, float %190)
Matt Arsenault77131622016-01-23 05:42:38 +0000219 %193 = call float @llvm.maxnum.f32(float %186, float undef)
220 %194 = call float @llvm.minnum.f32(float %191, float %192)
221 %195 = call float @llvm.minnum.f32(float %194, float %193)
222 %.temp292.7 = select i1 undef, float %162, float undef
223 %temp292.9 = select i1 false, float %180, float %.temp292.7
Tom Stellard28d13a42015-05-12 17:13:02 +0000224 %.temp292.9 = select i1 undef, float undef, float %temp292.9
Matt Arsenault77131622016-01-23 05:42:38 +0000225 %196 = fcmp ogt float undef, 0.000000e+00
226 %197 = fcmp olt float undef, %195
227 %198 = and i1 %196, %197
228 %199 = fcmp olt float undef, %.temp292.9
229 %200 = and i1 %198, %199
230 %temp292.11 = select i1 %200, float undef, float %.temp292.9
Tom Stellard28d13a42015-05-12 17:13:02 +0000231 br i1 undef, label %IF2565, label %ELSE2566
232
233IF2565: ; preds = %ENDIF
234 br i1 false, label %ENDIF2582, label %ELSE2584
235
236ELSE2566: ; preds = %ENDIF
Matt Arsenault77131622016-01-23 05:42:38 +0000237 %201 = fcmp oeq float %temp292.11, 1.000000e+04
238 br i1 %201, label %ENDLOOP, label %ELSE2593
Tom Stellard28d13a42015-05-12 17:13:02 +0000239
240ENDIF2564: ; preds = %ENDIF2594, %ENDIF2588
241 %temp894.1 = phi float [ undef, %ENDIF2588 ], [ %temp894.2, %ENDIF2594 ]
Matt Arsenault77131622016-01-23 05:42:38 +0000242 %temp18.1 = phi float [ %218, %ENDIF2588 ], [ undef, %ENDIF2594 ]
243 %202 = fsub float %5, undef
244 %203 = fmul float %202, undef
245 %204 = call float @llvm.maxnum.f32(float undef, float %203)
246 %205 = call float @llvm.minnum.f32(float %204, float undef)
Tom Stellard28d13a42015-05-12 17:13:02 +0000247 %206 = call float @llvm.minnum.f32(float %205, float undef)
Matt Arsenault77131622016-01-23 05:42:38 +0000248 %207 = fcmp ogt float undef, 0.000000e+00
249 %208 = fcmp olt float undef, 1.000000e+00
250 %209 = and i1 %207, %208
251 %210 = fcmp olt float undef, %206
252 %211 = and i1 %209, %210
253 br i1 %211, label %ENDIF2795, label %ELSE2797
Tom Stellard28d13a42015-05-12 17:13:02 +0000254
255ELSE2584: ; preds = %IF2565
256 br label %ENDIF2582
257
258ENDIF2582: ; preds = %ELSE2584, %IF2565
Matt Arsenault77131622016-01-23 05:42:38 +0000259 %212 = fadd float %1, undef
260 %213 = fadd float 0.000000e+00, %212
261 %floor = call float @llvm.floor.f32(float %213)
262 %214 = fsub float %213, %floor
Tom Stellard28d13a42015-05-12 17:13:02 +0000263 br i1 undef, label %IF2589, label %ELSE2590
264
265IF2589: ; preds = %ENDIF2582
266 br label %ENDIF2588
267
268ELSE2590: ; preds = %ENDIF2582
269 br label %ENDIF2588
270
271ENDIF2588: ; preds = %ELSE2590, %IF2589
Matt Arsenault77131622016-01-23 05:42:38 +0000272 %215 = fsub float 1.000000e+00, %214
273 %216 = call float @llvm.sqrt.f32(float %215)
274 %217 = fmul float %216, undef
275 %218 = fadd float %217, undef
Tom Stellard28d13a42015-05-12 17:13:02 +0000276 br label %ENDIF2564
277
278ELSE2593: ; preds = %ELSE2566
Matt Arsenault77131622016-01-23 05:42:38 +0000279 %219 = fcmp oeq float %temp292.11, %81
280 %220 = fcmp olt float %81, %83
281 %221 = and i1 %219, %220
282 br i1 %221, label %ENDIF2594, label %ELSE2596
Tom Stellard28d13a42015-05-12 17:13:02 +0000283
284ELSE2596: ; preds = %ELSE2593
Matt Arsenault77131622016-01-23 05:42:38 +0000285 %222 = fcmp oeq float %temp292.11, %100
286 %223 = fcmp olt float %100, %102
287 %224 = and i1 %222, %223
288 br i1 %224, label %ENDIF2594, label %ELSE2632
Tom Stellard28d13a42015-05-12 17:13:02 +0000289
290ENDIF2594: ; preds = %ELSE2788, %ELSE2785, %ELSE2782, %ELSE2779, %IF2775, %ELSE2761, %ELSE2758, %IF2757, %ELSE2704, %ELSE2686, %ELSE2671, %ELSE2668, %IF2667, %ELSE2632, %ELSE2596, %ELSE2593
291 %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 ]
Matt Arsenault77131622016-01-23 05:42:38 +0000292 %225 = fmul float %temp894.2, undef
Tom Stellard28d13a42015-05-12 17:13:02 +0000293 br label %ENDIF2564
294
295ELSE2632: ; preds = %ELSE2596
296 br i1 undef, label %ENDIF2594, label %ELSE2650
297
298ELSE2650: ; preds = %ELSE2632
Matt Arsenault77131622016-01-23 05:42:38 +0000299 %226 = fcmp oeq float %temp292.11, %110
300 %227 = fcmp olt float %110, %111
301 %228 = and i1 %226, %227
302 br i1 %228, label %IF2667, label %ELSE2668
Tom Stellard28d13a42015-05-12 17:13:02 +0000303
304IF2667: ; preds = %ELSE2650
305 br i1 undef, label %ENDIF2594, label %ELSE2671
306
307ELSE2668: ; preds = %ELSE2650
Matt Arsenault77131622016-01-23 05:42:38 +0000308 %229 = fcmp oeq float %temp292.11, %128
309 %230 = fcmp olt float %128, undef
310 %231 = and i1 %229, %230
311 br i1 %231, label %ENDIF2594, label %ELSE2686
Tom Stellard28d13a42015-05-12 17:13:02 +0000312
313ELSE2671: ; preds = %IF2667
314 br label %ENDIF2594
315
316ELSE2686: ; preds = %ELSE2668
Matt Arsenault77131622016-01-23 05:42:38 +0000317 %232 = fcmp oeq float %temp292.11, %145
318 %233 = fcmp olt float %145, undef
319 %234 = and i1 %232, %233
320 br i1 %234, label %ENDIF2594, label %ELSE2704
Tom Stellard28d13a42015-05-12 17:13:02 +0000321
322ELSE2704: ; preds = %ELSE2686
Matt Arsenault77131622016-01-23 05:42:38 +0000323 %235 = fcmp oeq float %temp292.11, %180
324 %236 = fcmp olt float %180, undef
325 %237 = and i1 %235, %236
326 br i1 %237, label %ENDIF2594, label %ELSE2740
Tom Stellard28d13a42015-05-12 17:13:02 +0000327
328ELSE2740: ; preds = %ELSE2704
329 br i1 undef, label %IF2757, label %ELSE2758
330
331IF2757: ; preds = %ELSE2740
332 br i1 undef, label %ENDIF2594, label %ELSE2761
333
334ELSE2758: ; preds = %ELSE2740
335 br i1 undef, label %IF2775, label %ENDIF2594
336
337ELSE2761: ; preds = %IF2757
338 br label %ENDIF2594
339
340IF2775: ; preds = %ELSE2758
Matt Arsenault77131622016-01-23 05:42:38 +0000341 %238 = fcmp olt float undef, undef
342 br i1 %238, label %ENDIF2594, label %ELSE2779
Tom Stellard28d13a42015-05-12 17:13:02 +0000343
344ELSE2779: ; preds = %IF2775
345 br i1 undef, label %ENDIF2594, label %ELSE2782
346
347ELSE2782: ; preds = %ELSE2779
348 br i1 undef, label %ENDIF2594, label %ELSE2785
349
350ELSE2785: ; preds = %ELSE2782
Matt Arsenault77131622016-01-23 05:42:38 +0000351 %239 = fcmp olt float undef, 0.000000e+00
352 br i1 %239, label %ENDIF2594, label %ELSE2788
Tom Stellard28d13a42015-05-12 17:13:02 +0000353
354ELSE2788: ; preds = %ELSE2785
Matt Arsenault77131622016-01-23 05:42:38 +0000355 %240 = fcmp olt float 0.000000e+00, undef
356 %.2848 = select i1 %240, float -1.000000e+00, float 1.000000e+00
Tom Stellard28d13a42015-05-12 17:13:02 +0000357 br label %ENDIF2594
358
359ELSE2797: ; preds = %ENDIF2564
Matt Arsenault77131622016-01-23 05:42:38 +0000360 %241 = fsub float %8, undef
361 %242 = fsub float %9, undef
362 %243 = fsub float %10, undef
363 %244 = fmul float %241, undef
Tom Stellard28d13a42015-05-12 17:13:02 +0000364 %245 = fmul float %242, undef
365 %246 = fmul float %243, undef
Matt Arsenault77131622016-01-23 05:42:38 +0000366 %247 = fsub float %11, undef
367 %248 = fsub float %12, undef
368 %249 = fsub float %13, undef
369 %250 = fmul float %247, undef
Tom Stellard28d13a42015-05-12 17:13:02 +0000370 %251 = fmul float %248, undef
371 %252 = fmul float %249, undef
Matt Arsenault77131622016-01-23 05:42:38 +0000372 %253 = call float @llvm.minnum.f32(float %244, float %250)
Tom Stellard28d13a42015-05-12 17:13:02 +0000373 %254 = call float @llvm.minnum.f32(float %245, float %251)
Matt Arsenault77131622016-01-23 05:42:38 +0000374 %255 = call float @llvm.maxnum.f32(float %246, float %252)
375 %256 = call float @llvm.maxnum.f32(float %253, float %254)
376 %257 = call float @llvm.maxnum.f32(float %256, float undef)
377 %258 = call float @llvm.minnum.f32(float undef, float %255)
378 %259 = fcmp ogt float %257, 0.000000e+00
379 %260 = fcmp olt float %257, 1.000000e+00
380 %261 = and i1 %259, %260
381 %262 = fcmp olt float %257, %258
382 %263 = and i1 %261, %262
383 br i1 %263, label %ENDIF2795, label %ELSE2800
Tom Stellard28d13a42015-05-12 17:13:02 +0000384
385ENDIF2795: ; preds = %ELSE2824, %ELSE2821, %ELSE2818, %ELSE2815, %ELSE2812, %ELSE2809, %ELSE2806, %ELSE2803, %ELSE2800, %ELSE2797, %ENDIF2564
386 br label %LOOP
387
388ELSE2800: ; preds = %ELSE2797
389 br i1 undef, label %ENDIF2795, label %ELSE2803
390
391ELSE2803: ; preds = %ELSE2800
Matt Arsenault77131622016-01-23 05:42:38 +0000392 %264 = fsub float %20, undef
393 %265 = fsub float %21, undef
394 %266 = fsub float %22, undef
395 %267 = fmul float %264, undef
Tom Stellard28d13a42015-05-12 17:13:02 +0000396 %268 = fmul float %265, undef
Matt Arsenault77131622016-01-23 05:42:38 +0000397 %269 = fmul float %266, 0.000000e+00
398 %270 = fsub float %23, undef
399 %271 = fsub float %24, undef
400 %272 = fsub float %25, undef
401 %273 = fmul float %270, undef
Tom Stellard28d13a42015-05-12 17:13:02 +0000402 %274 = fmul float %271, undef
403 %275 = fmul float %272, undef
Matt Arsenault77131622016-01-23 05:42:38 +0000404 %276 = call float @llvm.minnum.f32(float %267, float %273)
405 %277 = call float @llvm.maxnum.f32(float %268, float %274)
Tom Stellard28d13a42015-05-12 17:13:02 +0000406 %278 = call float @llvm.maxnum.f32(float %269, float %275)
Matt Arsenault77131622016-01-23 05:42:38 +0000407 %279 = call float @llvm.maxnum.f32(float %276, float undef)
408 %280 = call float @llvm.maxnum.f32(float %279, float undef)
409 %281 = call float @llvm.minnum.f32(float undef, float %277)
410 %282 = call float @llvm.minnum.f32(float %281, float %278)
411 %283 = fcmp ogt float %280, 0.000000e+00
412 %284 = fcmp olt float %280, 1.000000e+00
413 %285 = and i1 %283, %284
414 %286 = fcmp olt float %280, %282
415 %287 = and i1 %285, %286
416 br i1 %287, label %ENDIF2795, label %ELSE2806
Tom Stellard28d13a42015-05-12 17:13:02 +0000417
418ELSE2806: ; preds = %ELSE2803
Matt Arsenault77131622016-01-23 05:42:38 +0000419 %288 = fsub float %26, undef
420 %289 = fsub float %27, undef
421 %290 = fsub float %28, undef
422 %291 = fmul float %288, undef
423 %292 = fmul float %289, 0.000000e+00
424 %293 = fmul float %290, undef
425 %294 = fsub float %29, undef
426 %295 = fmul float %294, undef
427 %296 = call float @llvm.minnum.f32(float %291, float %295)
428 %297 = call float @llvm.minnum.f32(float %292, float undef)
429 %298 = call float @llvm.maxnum.f32(float %293, float undef)
430 %299 = call float @llvm.maxnum.f32(float %296, float %297)
431 %300 = call float @llvm.maxnum.f32(float %299, float undef)
432 %301 = call float @llvm.minnum.f32(float undef, float %298)
433 %302 = fcmp ogt float %300, 0.000000e+00
434 %303 = fcmp olt float %300, 1.000000e+00
435 %304 = and i1 %302, %303
436 %305 = fcmp olt float %300, %301
437 %306 = and i1 %304, %305
438 br i1 %306, label %ENDIF2795, label %ELSE2809
Tom Stellard28d13a42015-05-12 17:13:02 +0000439
440ELSE2809: ; preds = %ELSE2806
441 br i1 undef, label %ENDIF2795, label %ELSE2812
442
443ELSE2812: ; preds = %ELSE2809
444 br i1 undef, label %ENDIF2795, label %ELSE2815
445
446ELSE2815: ; preds = %ELSE2812
447 br i1 undef, label %ENDIF2795, label %ELSE2818
448
449ELSE2818: ; preds = %ELSE2815
450 br i1 undef, label %ENDIF2795, label %ELSE2821
451
452ELSE2821: ; preds = %ELSE2818
Matt Arsenault77131622016-01-23 05:42:38 +0000453 %307 = fsub float %56, undef
454 %308 = fsub float %57, undef
455 %309 = fsub float %58, undef
456 %310 = fmul float %307, undef
457 %311 = fmul float %308, 0.000000e+00
458 %312 = fmul float %309, undef
459 %313 = fsub float %59, undef
460 %314 = fsub float %60, undef
461 %315 = fsub float %61, undef
462 %316 = fmul float %313, undef
Tom Stellard28d13a42015-05-12 17:13:02 +0000463 %317 = fmul float %314, undef
464 %318 = fmul float %315, undef
Matt Arsenault77131622016-01-23 05:42:38 +0000465 %319 = call float @llvm.maxnum.f32(float %310, float %316)
Tom Stellard28d13a42015-05-12 17:13:02 +0000466 %320 = call float @llvm.maxnum.f32(float %311, float %317)
467 %321 = call float @llvm.maxnum.f32(float %312, float %318)
Matt Arsenault77131622016-01-23 05:42:38 +0000468 %322 = call float @llvm.minnum.f32(float %319, float %320)
469 %323 = call float @llvm.minnum.f32(float %322, float %321)
470 %324 = fcmp ogt float undef, 0.000000e+00
471 %325 = fcmp olt float undef, 1.000000e+00
472 %326 = and i1 %324, %325
473 %327 = fcmp olt float undef, %323
474 %328 = and i1 %326, %327
475 br i1 %328, label %ENDIF2795, label %ELSE2824
Tom Stellard28d13a42015-05-12 17:13:02 +0000476
477ELSE2824: ; preds = %ELSE2821
478 %.2849 = select i1 undef, float 0.000000e+00, float 1.000000e+00
479 br label %ENDIF2795
480}
481
482; Function Attrs: nounwind readnone
Matt Arsenault77131622016-01-23 05:42:38 +0000483declare float @llvm.SI.load.const(<16 x i8>, i32) #2
Tom Stellard28d13a42015-05-12 17:13:02 +0000484
Matt Arsenault15fbe492016-01-20 21:05:49 +0000485; Function Attrs: nounwind readnone
Matt Arsenault77131622016-01-23 05:42:38 +0000486declare float @llvm.floor.f32(float) #2
Tom Stellard28d13a42015-05-12 17:13:02 +0000487
488; Function Attrs: nounwind readnone
Matt Arsenault77131622016-01-23 05:42:38 +0000489declare float @llvm.sqrt.f32(float) #2
Tom Stellard28d13a42015-05-12 17:13:02 +0000490
491; Function Attrs: nounwind readnone
Matt Arsenault77131622016-01-23 05:42:38 +0000492declare float @llvm.minnum.f32(float, float) #2
Tom Stellard28d13a42015-05-12 17:13:02 +0000493
494; Function Attrs: nounwind readnone
Matt Arsenault77131622016-01-23 05:42:38 +0000495declare float @llvm.maxnum.f32(float, float) #2
Tom Stellard28d13a42015-05-12 17:13:02 +0000496
497declare void @llvm.SI.export(i32, i32, i32, i32, i32, float, float, float, float)
498
Matt Arsenault77131622016-01-23 05:42:38 +0000499attributes #0 = { alwaysinline nounwind readnone }
500attributes #1 = { "ShaderType"="0" "enable-no-nans-fp-math"="true" }
501attributes #2 = { nounwind readnone }