blob: 8284ba9164dcd3f4a6e051439b01ca5b2729923a [file] [log] [blame]
Tom Stellard49f8bfd2015-01-06 18:00:21 +00001; RUN: llc -march=amdgcn -mcpu=SI < %s | FileCheck %s
Marek Olsak75170772015-01-27 17:27:15 +00002; RUN: llc -march=amdgcn -mcpu=tonga < %s | FileCheck %s
Tom Stellard859199d2013-11-27 21:23:29 +00003
Tom Stellard859199d2013-11-27 21:23:29 +00004; These tests check that the compiler won't crash when it needs to spill
5; SGPRs.
6
Matt Arsenault325cca32016-01-23 05:42:43 +00007
Matt Arsenault77131622016-01-23 05:42:38 +00008@ddxy_lds = external addrspace(3) global [64 x i32]
9
Tom Stellard79243d92014-10-01 17:15:17 +000010; CHECK-LABEL: {{^}}main:
Michel Danzera7860772015-02-06 02:51:29 +000011; CHECK: s_wqm
Matt Arsenault0e3d3892015-11-30 21:15:53 +000012
13; Make sure not emitting unused scratch resource descriptor setup
14; CHECK-NOT: s_mov_b32
15; CHECK-NOT: s_mov_b32
16; CHECK-NOT: s_mov_b32
17; CHECK-NOT: s_mov_b32
18
19; CHECK: s_mov_b32 m0
20
21
Tom Stellard859199d2013-11-27 21:23:29 +000022; Writing to M0 from an SMRD instruction will hang the GPU.
Tom Stellard326d6ec2014-11-05 14:50:53 +000023; CHECK-NOT: s_buffer_load_dword m0
24; CHECK: s_endpgm
Nicolai Haehnledf3a20c2016-04-06 19:40:20 +000025define amdgpu_ps void @main([17 x <16 x i8>] addrspace(2)* byval %arg, [32 x <16 x i8>] addrspace(2)* byval %arg1, [16 x <8 x i32>] addrspace(2)* byval %arg2, float inreg %arg3, i32 inreg %arg4, <2 x i32> %arg5, <2 x i32> %arg6, <2 x i32> %arg7, <3 x i32> %arg8, <2 x i32> %arg9, <2 x i32> %arg10, <2 x i32> %arg11, float %arg12, float %arg13, float %arg14, float %arg15, float %arg16, float %arg17, float %arg18, float %arg19, float %arg20) {
Tom Stellard859199d2013-11-27 21:23:29 +000026main_body:
Matt Arsenault325cca32016-01-23 05:42:43 +000027 %tmp = getelementptr [17 x <16 x i8>], [17 x <16 x i8>] addrspace(2)* %arg, i64 0, i32 0
28 %tmp21 = load <16 x i8>, <16 x i8> addrspace(2)* %tmp, !tbaa !0
29 %tmp22 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 96)
30 %tmp23 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 100)
31 %tmp24 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 104)
32 %tmp25 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 112)
33 %tmp26 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 116)
34 %tmp27 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 120)
35 %tmp28 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 128)
36 %tmp29 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 132)
37 %tmp30 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 140)
38 %tmp31 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 144)
39 %tmp32 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 160)
40 %tmp33 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 176)
41 %tmp34 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 180)
42 %tmp35 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 184)
43 %tmp36 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 192)
44 %tmp37 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 196)
45 %tmp38 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 200)
46 %tmp39 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 208)
47 %tmp40 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 212)
48 %tmp41 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 216)
49 %tmp42 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 224)
50 %tmp43 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 240)
51 %tmp44 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 244)
52 %tmp45 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 248)
53 %tmp46 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 256)
54 %tmp47 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 272)
55 %tmp48 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 276)
56 %tmp49 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 280)
57 %tmp50 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 288)
58 %tmp51 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 292)
59 %tmp52 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 296)
60 %tmp53 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 304)
61 %tmp54 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 308)
62 %tmp55 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 312)
63 %tmp56 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 368)
64 %tmp57 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 372)
65 %tmp58 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 376)
66 %tmp59 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 384)
Matt Arsenault018179f2016-01-26 04:38:08 +000067 %tmp60 = getelementptr [16 x <8 x i32>], [16 x <8 x i32>] addrspace(2)* %arg2, i64 0, i32 0
68 %tmp61 = load <8 x i32>, <8 x i32> addrspace(2)* %tmp60, !tbaa !0
Matt Arsenault325cca32016-01-23 05:42:43 +000069 %tmp62 = getelementptr [32 x <16 x i8>], [32 x <16 x i8>] addrspace(2)* %arg1, i64 0, i32 0
70 %tmp63 = load <16 x i8>, <16 x i8> addrspace(2)* %tmp62, !tbaa !0
Matt Arsenault018179f2016-01-26 04:38:08 +000071 %tmp63.bc = bitcast <16 x i8> %tmp63 to <4 x i32>
72 %tmp64 = getelementptr [16 x <8 x i32>], [16 x <8 x i32>] addrspace(2)* %arg2, i64 0, i32 1
73 %tmp65 = load <8 x i32>, <8 x i32> addrspace(2)* %tmp64, !tbaa !0
Matt Arsenault325cca32016-01-23 05:42:43 +000074 %tmp66 = getelementptr [32 x <16 x i8>], [32 x <16 x i8>] addrspace(2)* %arg1, i64 0, i32 1
75 %tmp67 = load <16 x i8>, <16 x i8> addrspace(2)* %tmp66, !tbaa !0
Matt Arsenault018179f2016-01-26 04:38:08 +000076 %tmp68 = getelementptr [16 x <8 x i32>], [16 x <8 x i32>] addrspace(2)* %arg2, i64 0, i32 2
77 %tmp69 = load <8 x i32>, <8 x i32> addrspace(2)* %tmp68, !tbaa !0
Matt Arsenault325cca32016-01-23 05:42:43 +000078 %tmp70 = getelementptr [32 x <16 x i8>], [32 x <16 x i8>] addrspace(2)* %arg1, i64 0, i32 2
79 %tmp71 = load <16 x i8>, <16 x i8> addrspace(2)* %tmp70, !tbaa !0
Matt Arsenault018179f2016-01-26 04:38:08 +000080 %tmp72 = getelementptr [16 x <8 x i32>], [16 x <8 x i32>] addrspace(2)* %arg2, i64 0, i32 3
81 %tmp73 = load <8 x i32>, <8 x i32> addrspace(2)* %tmp72, !tbaa !0
Matt Arsenault325cca32016-01-23 05:42:43 +000082 %tmp74 = getelementptr [32 x <16 x i8>], [32 x <16 x i8>] addrspace(2)* %arg1, i64 0, i32 3
83 %tmp75 = load <16 x i8>, <16 x i8> addrspace(2)* %tmp74, !tbaa !0
Matt Arsenault018179f2016-01-26 04:38:08 +000084 %tmp76 = getelementptr [16 x <8 x i32>], [16 x <8 x i32>] addrspace(2)* %arg2, i64 0, i32 4
85 %tmp77 = load <8 x i32>, <8 x i32> addrspace(2)* %tmp76, !tbaa !0
Matt Arsenault325cca32016-01-23 05:42:43 +000086 %tmp78 = getelementptr [32 x <16 x i8>], [32 x <16 x i8>] addrspace(2)* %arg1, i64 0, i32 4
87 %tmp79 = load <16 x i8>, <16 x i8> addrspace(2)* %tmp78, !tbaa !0
Matt Arsenault018179f2016-01-26 04:38:08 +000088 %tmp80 = getelementptr [16 x <8 x i32>], [16 x <8 x i32>] addrspace(2)* %arg2, i64 0, i32 5
89 %tmp81 = load <8 x i32>, <8 x i32> addrspace(2)* %tmp80, !tbaa !0
Matt Arsenault325cca32016-01-23 05:42:43 +000090 %tmp82 = getelementptr [32 x <16 x i8>], [32 x <16 x i8>] addrspace(2)* %arg1, i64 0, i32 5
91 %tmp83 = load <16 x i8>, <16 x i8> addrspace(2)* %tmp82, !tbaa !0
Matt Arsenault018179f2016-01-26 04:38:08 +000092 %tmp84 = getelementptr [16 x <8 x i32>], [16 x <8 x i32>] addrspace(2)* %arg2, i64 0, i32 6
93 %tmp85 = load <8 x i32>, <8 x i32> addrspace(2)* %tmp84, !tbaa !0
Matt Arsenault325cca32016-01-23 05:42:43 +000094 %tmp86 = getelementptr [32 x <16 x i8>], [32 x <16 x i8>] addrspace(2)* %arg1, i64 0, i32 6
95 %tmp87 = load <16 x i8>, <16 x i8> addrspace(2)* %tmp86, !tbaa !0
Matt Arsenault018179f2016-01-26 04:38:08 +000096 %tmp88 = getelementptr [16 x <8 x i32>], [16 x <8 x i32>] addrspace(2)* %arg2, i64 0, i32 7
97 %tmp89 = load <8 x i32>, <8 x i32> addrspace(2)* %tmp88, !tbaa !0
Matt Arsenault325cca32016-01-23 05:42:43 +000098 %tmp90 = getelementptr [32 x <16 x i8>], [32 x <16 x i8>] addrspace(2)* %arg1, i64 0, i32 7
99 %tmp91 = load <16 x i8>, <16 x i8> addrspace(2)* %tmp90, !tbaa !0
100 %tmp92 = call float @llvm.SI.fs.interp(i32 0, i32 0, i32 %arg4, <2 x i32> %arg6)
101 %tmp93 = call float @llvm.SI.fs.interp(i32 1, i32 0, i32 %arg4, <2 x i32> %arg6)
102 %tmp94 = call float @llvm.SI.fs.interp(i32 0, i32 1, i32 %arg4, <2 x i32> %arg6)
103 %tmp95 = call float @llvm.SI.fs.interp(i32 1, i32 1, i32 %arg4, <2 x i32> %arg6)
104 %tmp96 = call float @llvm.SI.fs.interp(i32 2, i32 1, i32 %arg4, <2 x i32> %arg6)
105 %tmp97 = call float @llvm.SI.fs.interp(i32 0, i32 2, i32 %arg4, <2 x i32> %arg6)
106 %tmp98 = call float @llvm.SI.fs.interp(i32 1, i32 2, i32 %arg4, <2 x i32> %arg6)
107 %tmp99 = call float @llvm.SI.fs.interp(i32 2, i32 2, i32 %arg4, <2 x i32> %arg6)
108 %tmp100 = call float @llvm.SI.fs.interp(i32 0, i32 3, i32 %arg4, <2 x i32> %arg6)
109 %tmp101 = call float @llvm.SI.fs.interp(i32 1, i32 3, i32 %arg4, <2 x i32> %arg6)
110 %tmp102 = call float @llvm.SI.fs.interp(i32 2, i32 3, i32 %arg4, <2 x i32> %arg6)
111 %tmp103 = call float @llvm.SI.fs.interp(i32 0, i32 4, i32 %arg4, <2 x i32> %arg6)
112 %tmp104 = call float @llvm.SI.fs.interp(i32 1, i32 4, i32 %arg4, <2 x i32> %arg6)
113 %tmp105 = call float @llvm.SI.fs.interp(i32 2, i32 4, i32 %arg4, <2 x i32> %arg6)
114 %tmp106 = call float @llvm.SI.fs.interp(i32 0, i32 5, i32 %arg4, <2 x i32> %arg6)
115 %tmp107 = call float @llvm.SI.fs.interp(i32 1, i32 5, i32 %arg4, <2 x i32> %arg6)
116 %tmp108 = call float @llvm.SI.fs.interp(i32 2, i32 5, i32 %arg4, <2 x i32> %arg6)
117 %tmp109 = call i32 @llvm.SI.tid()
118 %tmp110 = getelementptr [64 x i32], [64 x i32] addrspace(3)* @ddxy_lds, i32 0, i32 %tmp109
119 %tmp111 = bitcast float %tmp92 to i32
120 store i32 %tmp111, i32 addrspace(3)* %tmp110
121 %tmp112 = bitcast float %tmp93 to i32
122 store i32 %tmp112, i32 addrspace(3)* %tmp110
123 %tmp113 = call i32 @llvm.SI.tid()
124 %tmp114 = getelementptr [64 x i32], [64 x i32] addrspace(3)* @ddxy_lds, i32 0, i32 %tmp113
125 %tmp115 = and i32 %tmp113, -4
126 %tmp116 = getelementptr [64 x i32], [64 x i32] addrspace(3)* @ddxy_lds, i32 0, i32 %tmp115
127 %tmp117 = add i32 %tmp115, 1
128 %tmp118 = getelementptr [64 x i32], [64 x i32] addrspace(3)* @ddxy_lds, i32 0, i32 %tmp117
129 %tmp119 = bitcast float %tmp92 to i32
130 store i32 %tmp119, i32 addrspace(3)* %tmp114
131 %tmp120 = load i32, i32 addrspace(3)* %tmp116
132 %tmp121 = bitcast i32 %tmp120 to float
133 %tmp122 = load i32, i32 addrspace(3)* %tmp118
134 %tmp123 = bitcast i32 %tmp122 to float
135 %tmp124 = fsub float %tmp123, %tmp121
136 %tmp125 = bitcast float %tmp93 to i32
137 store i32 %tmp125, i32 addrspace(3)* %tmp114
138 %tmp126 = load i32, i32 addrspace(3)* %tmp116
139 %tmp127 = bitcast i32 %tmp126 to float
140 %tmp128 = load i32, i32 addrspace(3)* %tmp118
141 %tmp129 = bitcast i32 %tmp128 to float
142 %tmp130 = fsub float %tmp129, %tmp127
143 %tmp131 = insertelement <4 x float> undef, float %tmp124, i32 0
144 %tmp132 = insertelement <4 x float> %tmp131, float %tmp130, i32 1
145 %tmp133 = insertelement <4 x float> %tmp132, float %tmp130, i32 2
146 %tmp134 = insertelement <4 x float> %tmp133, float %tmp130, i32 3
147 %tmp135 = extractelement <4 x float> %tmp134, i32 0
148 %tmp136 = extractelement <4 x float> %tmp134, i32 1
149 %tmp137 = fmul float %tmp59, %tmp92
150 %tmp138 = fmul float %tmp59, %tmp93
151 %tmp139 = fmul float %tmp59, %tmp93
152 %tmp140 = fmul float %tmp59, %tmp93
153 %tmp141 = call i32 @llvm.SI.tid()
154 %tmp142 = getelementptr [64 x i32], [64 x i32] addrspace(3)* @ddxy_lds, i32 0, i32 %tmp141
155 %tmp143 = bitcast float %tmp137 to i32
156 store i32 %tmp143, i32 addrspace(3)* %tmp142
157 %tmp144 = bitcast float %tmp138 to i32
158 store i32 %tmp144, i32 addrspace(3)* %tmp142
159 %tmp145 = bitcast float %tmp139 to i32
160 store i32 %tmp145, i32 addrspace(3)* %tmp142
161 %tmp146 = bitcast float %tmp140 to i32
162 store i32 %tmp146, i32 addrspace(3)* %tmp142
163 %tmp147 = call i32 @llvm.SI.tid()
164 %tmp148 = getelementptr [64 x i32], [64 x i32] addrspace(3)* @ddxy_lds, i32 0, i32 %tmp147
165 %tmp149 = and i32 %tmp147, -4
166 %tmp150 = getelementptr [64 x i32], [64 x i32] addrspace(3)* @ddxy_lds, i32 0, i32 %tmp149
167 %tmp151 = add i32 %tmp149, 2
168 %tmp152 = getelementptr [64 x i32], [64 x i32] addrspace(3)* @ddxy_lds, i32 0, i32 %tmp151
169 %tmp153 = bitcast float %tmp137 to i32
170 store i32 %tmp153, i32 addrspace(3)* %tmp148
171 %tmp154 = load i32, i32 addrspace(3)* %tmp150
172 %tmp155 = bitcast i32 %tmp154 to float
173 %tmp156 = load i32, i32 addrspace(3)* %tmp152
174 %tmp157 = bitcast i32 %tmp156 to float
175 %tmp158 = fsub float %tmp157, %tmp155
176 %tmp159 = bitcast float %tmp138 to i32
177 store i32 %tmp159, i32 addrspace(3)* %tmp148
178 %tmp160 = load i32, i32 addrspace(3)* %tmp150
179 %tmp161 = bitcast i32 %tmp160 to float
180 %tmp162 = load i32, i32 addrspace(3)* %tmp152
181 %tmp163 = bitcast i32 %tmp162 to float
182 %tmp164 = fsub float %tmp163, %tmp161
183 %tmp165 = bitcast float %tmp139 to i32
184 store i32 %tmp165, i32 addrspace(3)* %tmp148
185 %tmp166 = load i32, i32 addrspace(3)* %tmp150
186 %tmp167 = bitcast i32 %tmp166 to float
187 %tmp168 = load i32, i32 addrspace(3)* %tmp152
188 %tmp169 = bitcast i32 %tmp168 to float
189 %tmp170 = fsub float %tmp169, %tmp167
190 %tmp171 = bitcast float %tmp140 to i32
191 store i32 %tmp171, i32 addrspace(3)* %tmp148
192 %tmp172 = load i32, i32 addrspace(3)* %tmp150
193 %tmp173 = bitcast i32 %tmp172 to float
194 %tmp174 = load i32, i32 addrspace(3)* %tmp152
195 %tmp175 = bitcast i32 %tmp174 to float
196 %tmp176 = fsub float %tmp175, %tmp173
197 %tmp177 = insertelement <4 x float> undef, float %tmp158, i32 0
198 %tmp178 = insertelement <4 x float> %tmp177, float %tmp164, i32 1
199 %tmp179 = insertelement <4 x float> %tmp178, float %tmp170, i32 2
200 %tmp180 = insertelement <4 x float> %tmp179, float %tmp176, i32 3
201 %tmp181 = extractelement <4 x float> %tmp180, i32 0
202 %tmp182 = extractelement <4 x float> %tmp180, i32 1
203 %tmp183 = fdiv float 1.000000e+00, %tmp96
204 %tmp184 = fmul float %tmp32, %tmp183
205 %tmp185 = fcmp uge float 1.000000e+00, %tmp184
206 %tmp186 = select i1 %tmp185, float %tmp184, float 1.000000e+00
207 %tmp187 = fmul float %tmp186, %tmp29
208 %tmp188 = call float @ceil(float %tmp187)
209 %tmp189 = fcmp uge float 3.000000e+00, %tmp188
210 %tmp190 = select i1 %tmp189, float 3.000000e+00, float %tmp188
211 %tmp191 = fdiv float 1.000000e+00, %tmp190
212 %tmp192 = fdiv float 1.000000e+00, %tmp29
213 %tmp193 = fmul float %tmp190, %tmp192
214 %tmp194 = fmul float %tmp30, %tmp193
215 %tmp195 = fmul float %tmp94, %tmp94
216 %tmp196 = fmul float %tmp95, %tmp95
217 %tmp197 = fadd float %tmp196, %tmp195
218 %tmp198 = fmul float %tmp96, %tmp96
219 %tmp199 = fadd float %tmp197, %tmp198
220 %tmp200 = call float @llvm.amdgcn.rsq.f32(float %tmp199)
221 %tmp201 = fmul float %tmp94, %tmp200
222 %tmp202 = fmul float %tmp95, %tmp200
223 %tmp203 = fmul float %tmp201, %tmp28
224 %tmp204 = fmul float %tmp202, %tmp28
225 %tmp205 = fmul float %tmp203, -1.000000e+00
226 %tmp206 = fmul float %tmp204, 1.000000e+00
227 %tmp207 = fmul float %tmp205, %tmp31
228 %tmp208 = fmul float %tmp206, %tmp31
229 %tmp209 = fsub float -0.000000e+00, %tmp207
230 %tmp210 = fadd float %tmp92, %tmp209
231 %tmp211 = fsub float -0.000000e+00, %tmp208
232 %tmp212 = fadd float %tmp93, %tmp211
233 %tmp213 = fmul float %tmp205, %tmp191
234 %tmp214 = fmul float %tmp206, %tmp191
235 %tmp215 = fmul float -1.000000e+00, %tmp191
236 %tmp216 = bitcast float %tmp135 to i32
237 %tmp217 = bitcast float %tmp181 to i32
238 %tmp218 = bitcast float %tmp136 to i32
239 %tmp219 = bitcast float %tmp182 to i32
240 %tmp220 = insertelement <8 x i32> undef, i32 %tmp216, i32 0
241 %tmp221 = insertelement <8 x i32> %tmp220, i32 %tmp217, i32 1
242 %tmp222 = insertelement <8 x i32> %tmp221, i32 %tmp218, i32 2
243 %tmp223 = insertelement <8 x i32> %tmp222, i32 %tmp219, i32 3
Tom Stellard859199d2013-11-27 21:23:29 +0000244 br label %LOOP
245
246LOOP: ; preds = %ENDIF, %main_body
Matt Arsenault325cca32016-01-23 05:42:43 +0000247 %temp24.0 = phi float [ 1.000000e+00, %main_body ], [ %tmp257, %ENDIF ]
248 %temp28.0 = phi float [ %tmp210, %main_body ], [ %tmp252, %ENDIF ]
249 %temp29.0 = phi float [ %tmp212, %main_body ], [ %tmp254, %ENDIF ]
250 %temp30.0 = phi float [ 1.000000e+00, %main_body ], [ %tmp256, %ENDIF ]
251 %tmp224 = fcmp oge float %temp24.0, %tmp190
252 %tmp225 = sext i1 %tmp224 to i32
253 %tmp226 = bitcast i32 %tmp225 to float
254 %tmp227 = bitcast float %tmp226 to i32
255 %tmp228 = icmp ne i32 %tmp227, 0
256 br i1 %tmp228, label %IF, label %ENDIF
Tom Stellard859199d2013-11-27 21:23:29 +0000257
258IF: ; preds = %LOOP
Matt Arsenault325cca32016-01-23 05:42:43 +0000259 %tmp229 = bitcast float %tmp135 to i32
260 %tmp230 = bitcast float %tmp181 to i32
261 %tmp231 = bitcast float %tmp136 to i32
262 %tmp232 = bitcast float %tmp182 to i32
263 %tmp233 = insertelement <8 x i32> undef, i32 %tmp229, i32 0
264 %tmp234 = insertelement <8 x i32> %tmp233, i32 %tmp230, i32 1
265 %tmp235 = insertelement <8 x i32> %tmp234, i32 %tmp231, i32 2
266 %tmp236 = insertelement <8 x i32> %tmp235, i32 %tmp232, i32 3
Tom Stellard859199d2013-11-27 21:23:29 +0000267 br label %LOOP65
268
269ENDIF: ; preds = %LOOP
Matt Arsenault325cca32016-01-23 05:42:43 +0000270 %tmp237 = bitcast float %temp28.0 to i32
271 %tmp238 = bitcast float %temp29.0 to i32
272 %tmp239 = insertelement <8 x i32> %tmp223, i32 %tmp237, i32 4
273 %tmp240 = insertelement <8 x i32> %tmp239, i32 %tmp238, i32 5
274 %tmp241 = insertelement <8 x i32> %tmp240, i32 undef, i32 6
275 %tmp242 = insertelement <8 x i32> %tmp241, i32 undef, i32 7
Matt Arsenault018179f2016-01-26 04:38:08 +0000276 %tmp243 = call <4 x float> @llvm.SI.image.sample.d.v8i32(<8 x i32> %tmp242, <8 x i32> %tmp61, <4 x i32> %tmp63.bc, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
Matt Arsenault325cca32016-01-23 05:42:43 +0000277 %tmp244 = extractelement <4 x float> %tmp243, i32 3
278 %tmp245 = fcmp oge float %temp30.0, %tmp244
279 %tmp246 = sext i1 %tmp245 to i32
280 %tmp247 = bitcast i32 %tmp246 to float
281 %tmp248 = bitcast float %tmp247 to i32
282 %tmp249 = and i32 %tmp248, 1065353216
283 %tmp250 = bitcast i32 %tmp249 to float
284 %tmp251 = fmul float %tmp213, %tmp250
285 %tmp252 = fadd float %tmp251, %temp28.0
286 %tmp253 = fmul float %tmp214, %tmp250
287 %tmp254 = fadd float %tmp253, %temp29.0
288 %tmp255 = fmul float %tmp215, %tmp250
289 %tmp256 = fadd float %tmp255, %temp30.0
290 %tmp257 = fadd float %temp24.0, 1.000000e+00
Tom Stellard859199d2013-11-27 21:23:29 +0000291 br label %LOOP
292
293LOOP65: ; preds = %ENDIF66, %IF
Matt Arsenault325cca32016-01-23 05:42:43 +0000294 %temp24.1 = phi float [ 0.000000e+00, %IF ], [ %tmp609, %ENDIF66 ]
295 %temp28.1 = phi float [ %temp28.0, %IF ], [ %tmp604, %ENDIF66 ]
296 %temp29.1 = phi float [ %temp29.0, %IF ], [ %tmp606, %ENDIF66 ]
297 %temp30.1 = phi float [ %temp30.0, %IF ], [ %tmp608, %ENDIF66 ]
298 %temp32.0 = phi float [ 1.000000e+00, %IF ], [ %tmp610, %ENDIF66 ]
299 %tmp258 = fcmp oge float %temp24.1, %tmp194
300 %tmp259 = sext i1 %tmp258 to i32
301 %tmp260 = bitcast i32 %tmp259 to float
302 %tmp261 = bitcast float %tmp260 to i32
303 %tmp262 = icmp ne i32 %tmp261, 0
304 br i1 %tmp262, label %IF67, label %ENDIF66
Tom Stellard859199d2013-11-27 21:23:29 +0000305
306IF67: ; preds = %LOOP65
Matt Arsenault325cca32016-01-23 05:42:43 +0000307 %tmp263 = bitcast float %tmp135 to i32
308 %tmp264 = bitcast float %tmp181 to i32
309 %tmp265 = bitcast float %tmp136 to i32
310 %tmp266 = bitcast float %tmp182 to i32
311 %tmp267 = bitcast float %temp28.1 to i32
312 %tmp268 = bitcast float %temp29.1 to i32
313 %tmp269 = insertelement <8 x i32> undef, i32 %tmp263, i32 0
314 %tmp270 = insertelement <8 x i32> %tmp269, i32 %tmp264, i32 1
315 %tmp271 = insertelement <8 x i32> %tmp270, i32 %tmp265, i32 2
316 %tmp272 = insertelement <8 x i32> %tmp271, i32 %tmp266, i32 3
317 %tmp273 = insertelement <8 x i32> %tmp272, i32 %tmp267, i32 4
318 %tmp274 = insertelement <8 x i32> %tmp273, i32 %tmp268, i32 5
319 %tmp275 = insertelement <8 x i32> %tmp274, i32 undef, i32 6
320 %tmp276 = insertelement <8 x i32> %tmp275, i32 undef, i32 7
Matt Arsenault018179f2016-01-26 04:38:08 +0000321 %tmp67.bc = bitcast <16 x i8> %tmp67 to <4 x i32>
322 %tmp277 = call <4 x float> @llvm.SI.image.sample.d.v8i32(<8 x i32> %tmp276, <8 x i32> %tmp65, <4 x i32> %tmp67.bc, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
Matt Arsenault325cca32016-01-23 05:42:43 +0000323 %tmp278 = extractelement <4 x float> %tmp277, i32 0
324 %tmp279 = extractelement <4 x float> %tmp277, i32 1
325 %tmp280 = extractelement <4 x float> %tmp277, i32 2
326 %tmp281 = extractelement <4 x float> %tmp277, i32 3
327 %tmp282 = fmul float %tmp281, %tmp46
328 %tmp283 = bitcast float %tmp135 to i32
329 %tmp284 = bitcast float %tmp181 to i32
330 %tmp285 = bitcast float %tmp136 to i32
331 %tmp286 = bitcast float %tmp182 to i32
332 %tmp287 = bitcast float %temp28.1 to i32
333 %tmp288 = bitcast float %temp29.1 to i32
334 %tmp289 = insertelement <8 x i32> undef, i32 %tmp283, i32 0
335 %tmp290 = insertelement <8 x i32> %tmp289, i32 %tmp284, i32 1
336 %tmp291 = insertelement <8 x i32> %tmp290, i32 %tmp285, i32 2
337 %tmp292 = insertelement <8 x i32> %tmp291, i32 %tmp286, i32 3
338 %tmp293 = insertelement <8 x i32> %tmp292, i32 %tmp287, i32 4
339 %tmp294 = insertelement <8 x i32> %tmp293, i32 %tmp288, i32 5
340 %tmp295 = insertelement <8 x i32> %tmp294, i32 undef, i32 6
341 %tmp296 = insertelement <8 x i32> %tmp295, i32 undef, i32 7
Matt Arsenault018179f2016-01-26 04:38:08 +0000342 %tmp83.bc = bitcast <16 x i8> %tmp83 to <4 x i32>
343 %tmp297 = call <4 x float> @llvm.SI.image.sample.d.v8i32(<8 x i32> %tmp296, <8 x i32> %tmp81, <4 x i32> %tmp83.bc, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
Matt Arsenault325cca32016-01-23 05:42:43 +0000344 %tmp298 = extractelement <4 x float> %tmp297, i32 0
345 %tmp299 = extractelement <4 x float> %tmp297, i32 1
346 %tmp300 = extractelement <4 x float> %tmp297, i32 2
347 %tmp301 = bitcast float %tmp135 to i32
348 %tmp302 = bitcast float %tmp181 to i32
349 %tmp303 = bitcast float %tmp136 to i32
350 %tmp304 = bitcast float %tmp182 to i32
351 %tmp305 = bitcast float %temp28.1 to i32
352 %tmp306 = bitcast float %temp29.1 to i32
353 %tmp307 = insertelement <8 x i32> undef, i32 %tmp301, i32 0
354 %tmp308 = insertelement <8 x i32> %tmp307, i32 %tmp302, i32 1
355 %tmp309 = insertelement <8 x i32> %tmp308, i32 %tmp303, i32 2
356 %tmp310 = insertelement <8 x i32> %tmp309, i32 %tmp304, i32 3
357 %tmp311 = insertelement <8 x i32> %tmp310, i32 %tmp305, i32 4
358 %tmp312 = insertelement <8 x i32> %tmp311, i32 %tmp306, i32 5
359 %tmp313 = insertelement <8 x i32> %tmp312, i32 undef, i32 6
360 %tmp314 = insertelement <8 x i32> %tmp313, i32 undef, i32 7
Matt Arsenault018179f2016-01-26 04:38:08 +0000361 %tmp79.bc = bitcast <16 x i8> %tmp79 to <4 x i32>
362 %tmp315 = call <4 x float> @llvm.SI.image.sample.d.v8i32(<8 x i32> %tmp314, <8 x i32> %tmp77, <4 x i32> %tmp79.bc, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
Matt Arsenault325cca32016-01-23 05:42:43 +0000363 %tmp316 = extractelement <4 x float> %tmp315, i32 0
364 %tmp317 = extractelement <4 x float> %tmp315, i32 1
365 %tmp318 = extractelement <4 x float> %tmp315, i32 2
366 %tmp319 = fmul float %tmp316, %tmp22
367 %tmp320 = fmul float %tmp317, %tmp23
368 %tmp321 = fmul float %tmp318, %tmp24
369 %tmp322 = fmul float %tmp298, %tmp25
370 %tmp323 = fadd float %tmp322, %tmp319
371 %tmp324 = fmul float %tmp299, %tmp26
372 %tmp325 = fadd float %tmp324, %tmp320
373 %tmp326 = fmul float %tmp300, %tmp27
374 %tmp327 = fadd float %tmp326, %tmp321
375 %tmp328 = fadd float %tmp278, %tmp323
376 %tmp329 = fadd float %tmp279, %tmp325
377 %tmp330 = fadd float %tmp280, %tmp327
378 %tmp331 = bitcast float %tmp135 to i32
379 %tmp332 = bitcast float %tmp181 to i32
380 %tmp333 = bitcast float %tmp136 to i32
381 %tmp334 = bitcast float %tmp182 to i32
382 %tmp335 = bitcast float %temp28.1 to i32
383 %tmp336 = bitcast float %temp29.1 to i32
384 %tmp337 = insertelement <8 x i32> undef, i32 %tmp331, i32 0
385 %tmp338 = insertelement <8 x i32> %tmp337, i32 %tmp332, i32 1
386 %tmp339 = insertelement <8 x i32> %tmp338, i32 %tmp333, i32 2
387 %tmp340 = insertelement <8 x i32> %tmp339, i32 %tmp334, i32 3
388 %tmp341 = insertelement <8 x i32> %tmp340, i32 %tmp335, i32 4
389 %tmp342 = insertelement <8 x i32> %tmp341, i32 %tmp336, i32 5
390 %tmp343 = insertelement <8 x i32> %tmp342, i32 undef, i32 6
391 %tmp344 = insertelement <8 x i32> %tmp343, i32 undef, i32 7
Matt Arsenault018179f2016-01-26 04:38:08 +0000392 %tmp345 = call <4 x float> @llvm.SI.image.sample.d.v8i32(<8 x i32> %tmp344, <8 x i32> %tmp61, <4 x i32> %tmp63.bc, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
Matt Arsenault325cca32016-01-23 05:42:43 +0000393 %tmp346 = extractelement <4 x float> %tmp345, i32 0
394 %tmp347 = extractelement <4 x float> %tmp345, i32 1
395 %tmp348 = extractelement <4 x float> %tmp345, i32 2
396 %tmp349 = fadd float %tmp346, -5.000000e-01
397 %tmp350 = fadd float %tmp347, -5.000000e-01
398 %tmp351 = fadd float %tmp348, -5.000000e-01
399 %tmp352 = fmul float %tmp349, %tmp349
400 %tmp353 = fmul float %tmp350, %tmp350
401 %tmp354 = fadd float %tmp353, %tmp352
402 %tmp355 = fmul float %tmp351, %tmp351
403 %tmp356 = fadd float %tmp354, %tmp355
404 %tmp357 = call float @llvm.amdgcn.rsq.f32(float %tmp356)
405 %tmp358 = fmul float %tmp349, %tmp357
406 %tmp359 = fmul float %tmp350, %tmp357
407 %tmp360 = fmul float %tmp351, %tmp357
408 %tmp361 = bitcast float %tmp135 to i32
409 %tmp362 = bitcast float %tmp181 to i32
410 %tmp363 = bitcast float %tmp136 to i32
411 %tmp364 = bitcast float %tmp182 to i32
412 %tmp365 = bitcast float %temp28.1 to i32
413 %tmp366 = bitcast float %temp29.1 to i32
414 %tmp367 = insertelement <8 x i32> undef, i32 %tmp361, i32 0
415 %tmp368 = insertelement <8 x i32> %tmp367, i32 %tmp362, i32 1
416 %tmp369 = insertelement <8 x i32> %tmp368, i32 %tmp363, i32 2
417 %tmp370 = insertelement <8 x i32> %tmp369, i32 %tmp364, i32 3
418 %tmp371 = insertelement <8 x i32> %tmp370, i32 %tmp365, i32 4
419 %tmp372 = insertelement <8 x i32> %tmp371, i32 %tmp366, i32 5
420 %tmp373 = insertelement <8 x i32> %tmp372, i32 undef, i32 6
421 %tmp374 = insertelement <8 x i32> %tmp373, i32 undef, i32 7
Matt Arsenault018179f2016-01-26 04:38:08 +0000422 %tmp71.bc = bitcast <16 x i8> %tmp71 to <4 x i32>
423 %tmp375 = call <4 x float> @llvm.SI.image.sample.d.v8i32(<8 x i32> %tmp374, <8 x i32> %tmp69, <4 x i32> %tmp71.bc, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
Matt Arsenault325cca32016-01-23 05:42:43 +0000424 %tmp376 = extractelement <4 x float> %tmp375, i32 0
425 %tmp377 = extractelement <4 x float> %tmp375, i32 1
426 %tmp378 = extractelement <4 x float> %tmp375, i32 2
427 %tmp379 = extractelement <4 x float> %tmp375, i32 3
428 %tmp380 = fsub float -0.000000e+00, %tmp94
429 %tmp381 = fsub float -0.000000e+00, %tmp95
430 %tmp382 = fsub float -0.000000e+00, %tmp96
431 %tmp383 = fmul float %tmp358, %tmp380
432 %tmp384 = fmul float %tmp359, %tmp381
433 %tmp385 = fadd float %tmp384, %tmp383
434 %tmp386 = fmul float %tmp360, %tmp382
435 %tmp387 = fadd float %tmp385, %tmp386
436 %tmp388 = fmul float %tmp387, %tmp358
437 %tmp389 = fmul float %tmp387, %tmp359
438 %tmp390 = fmul float %tmp387, %tmp360
439 %tmp391 = fmul float 2.000000e+00, %tmp388
440 %tmp392 = fmul float 2.000000e+00, %tmp389
441 %tmp393 = fmul float 2.000000e+00, %tmp390
442 %tmp394 = fsub float -0.000000e+00, %tmp391
443 %tmp395 = fadd float %tmp380, %tmp394
444 %tmp396 = fsub float -0.000000e+00, %tmp392
445 %tmp397 = fadd float %tmp381, %tmp396
446 %tmp398 = fsub float -0.000000e+00, %tmp393
447 %tmp399 = fadd float %tmp382, %tmp398
448 %tmp400 = fmul float %tmp395, %tmp97
449 %tmp401 = fmul float %tmp395, %tmp98
450 %tmp402 = fmul float %tmp395, %tmp99
451 %tmp403 = fmul float %tmp397, %tmp100
452 %tmp404 = fadd float %tmp403, %tmp400
453 %tmp405 = fmul float %tmp397, %tmp101
454 %tmp406 = fadd float %tmp405, %tmp401
455 %tmp407 = fmul float %tmp397, %tmp102
456 %tmp408 = fadd float %tmp407, %tmp402
457 %tmp409 = fmul float %tmp399, %tmp103
458 %tmp410 = fadd float %tmp409, %tmp404
459 %tmp411 = fmul float %tmp399, %tmp104
460 %tmp412 = fadd float %tmp411, %tmp406
461 %tmp413 = fmul float %tmp399, %tmp105
462 %tmp414 = fadd float %tmp413, %tmp408
463 %tmp415 = bitcast float %tmp135 to i32
464 %tmp416 = bitcast float %tmp181 to i32
465 %tmp417 = bitcast float %tmp136 to i32
466 %tmp418 = bitcast float %tmp182 to i32
467 %tmp419 = bitcast float %temp28.1 to i32
468 %tmp420 = bitcast float %temp29.1 to i32
469 %tmp421 = insertelement <8 x i32> undef, i32 %tmp415, i32 0
470 %tmp422 = insertelement <8 x i32> %tmp421, i32 %tmp416, i32 1
471 %tmp423 = insertelement <8 x i32> %tmp422, i32 %tmp417, i32 2
472 %tmp424 = insertelement <8 x i32> %tmp423, i32 %tmp418, i32 3
473 %tmp425 = insertelement <8 x i32> %tmp424, i32 %tmp419, i32 4
474 %tmp426 = insertelement <8 x i32> %tmp425, i32 %tmp420, i32 5
475 %tmp427 = insertelement <8 x i32> %tmp426, i32 undef, i32 6
476 %tmp428 = insertelement <8 x i32> %tmp427, i32 undef, i32 7
Matt Arsenault018179f2016-01-26 04:38:08 +0000477 %tmp87.bc = bitcast <16 x i8> %tmp87 to <4 x i32>
478 %tmp429 = call <4 x float> @llvm.SI.image.sample.d.v8i32(<8 x i32> %tmp428, <8 x i32> %tmp85, <4 x i32> %tmp87.bc, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
Matt Arsenault325cca32016-01-23 05:42:43 +0000479 %tmp430 = extractelement <4 x float> %tmp429, i32 0
480 %tmp431 = extractelement <4 x float> %tmp429, i32 1
481 %tmp432 = extractelement <4 x float> %tmp429, i32 2
482 %tmp433 = fmul float %tmp47, %tmp410
483 %tmp434 = fmul float %tmp48, %tmp410
484 %tmp435 = fmul float %tmp49, %tmp410
485 %tmp436 = fmul float %tmp50, %tmp412
486 %tmp437 = fadd float %tmp436, %tmp433
487 %tmp438 = fmul float %tmp51, %tmp412
488 %tmp439 = fadd float %tmp438, %tmp434
489 %tmp440 = fmul float %tmp52, %tmp412
490 %tmp441 = fadd float %tmp440, %tmp435
491 %tmp442 = fmul float %tmp53, %tmp414
492 %tmp443 = fadd float %tmp442, %tmp437
493 %tmp444 = fmul float %tmp54, %tmp414
494 %tmp445 = fadd float %tmp444, %tmp439
495 %tmp446 = fmul float %tmp55, %tmp414
496 %tmp447 = fadd float %tmp446, %tmp441
497 %tmp448 = insertelement <4 x float> undef, float %tmp443, i32 0
498 %tmp449 = insertelement <4 x float> %tmp448, float %tmp445, i32 1
499 %tmp450 = insertelement <4 x float> %tmp449, float %tmp447, i32 2
500 %tmp451 = insertelement <4 x float> %tmp450, float %tmp194, i32 3
501 %tmp452 = call <4 x float> @llvm.AMDGPU.cube(<4 x float> %tmp451)
502 %tmp453 = extractelement <4 x float> %tmp452, i32 0
503 %tmp454 = extractelement <4 x float> %tmp452, i32 1
504 %tmp455 = extractelement <4 x float> %tmp452, i32 2
505 %tmp456 = extractelement <4 x float> %tmp452, i32 3
506 %tmp457 = call float @fabs(float %tmp455)
507 %tmp458 = fdiv float 1.000000e+00, %tmp457
508 %tmp459 = fmul float %tmp453, %tmp458
509 %tmp460 = fadd float %tmp459, 1.500000e+00
510 %tmp461 = fmul float %tmp454, %tmp458
511 %tmp462 = fadd float %tmp461, 1.500000e+00
512 %tmp463 = bitcast float %tmp462 to i32
513 %tmp464 = bitcast float %tmp460 to i32
514 %tmp465 = bitcast float %tmp456 to i32
515 %tmp466 = insertelement <4 x i32> undef, i32 %tmp463, i32 0
516 %tmp467 = insertelement <4 x i32> %tmp466, i32 %tmp464, i32 1
517 %tmp468 = insertelement <4 x i32> %tmp467, i32 %tmp465, i32 2
518 %tmp469 = insertelement <4 x i32> %tmp468, i32 undef, i32 3
Matt Arsenault018179f2016-01-26 04:38:08 +0000519 %tmp91.bc = bitcast <16 x i8> %tmp91 to <4 x i32>
520 %tmp470 = call <4 x float> @llvm.SI.image.sample.v4i32(<4 x i32> %tmp469, <8 x i32> %tmp89, <4 x i32> %tmp91.bc, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
Matt Arsenault325cca32016-01-23 05:42:43 +0000521 %tmp471 = extractelement <4 x float> %tmp470, i32 0
522 %tmp472 = extractelement <4 x float> %tmp470, i32 1
523 %tmp473 = extractelement <4 x float> %tmp470, i32 2
524 %tmp474 = fmul float %tmp430, %tmp471
525 %tmp475 = fadd float %tmp474, %tmp328
526 %tmp476 = fmul float %tmp431, %tmp472
527 %tmp477 = fadd float %tmp476, %tmp329
528 %tmp478 = fmul float %tmp432, %tmp473
529 %tmp479 = fadd float %tmp478, %tmp330
530 %tmp480 = fmul float %tmp106, %tmp106
531 %tmp481 = fmul float %tmp107, %tmp107
532 %tmp482 = fadd float %tmp481, %tmp480
533 %tmp483 = fmul float %tmp108, %tmp108
534 %tmp484 = fadd float %tmp482, %tmp483
535 %tmp485 = call float @llvm.amdgcn.rsq.f32(float %tmp484)
536 %tmp486 = fmul float %tmp106, %tmp485
537 %tmp487 = fmul float %tmp107, %tmp485
538 %tmp488 = fmul float %tmp108, %tmp485
539 %tmp489 = fmul float %tmp376, %tmp39
540 %tmp490 = fmul float %tmp377, %tmp40
541 %tmp491 = fmul float %tmp378, %tmp41
542 %tmp492 = fmul float %tmp358, %tmp486
543 %tmp493 = fmul float %tmp359, %tmp487
544 %tmp494 = fadd float %tmp493, %tmp492
545 %tmp495 = fmul float %tmp360, %tmp488
546 %tmp496 = fadd float %tmp494, %tmp495
547 %tmp497 = fmul float %tmp496, %tmp358
548 %tmp498 = fmul float %tmp496, %tmp359
549 %tmp499 = fmul float %tmp496, %tmp360
550 %tmp500 = fmul float 2.000000e+00, %tmp497
551 %tmp501 = fmul float 2.000000e+00, %tmp498
552 %tmp502 = fmul float 2.000000e+00, %tmp499
553 %tmp503 = fsub float -0.000000e+00, %tmp500
554 %tmp504 = fadd float %tmp486, %tmp503
555 %tmp505 = fsub float -0.000000e+00, %tmp501
556 %tmp506 = fadd float %tmp487, %tmp505
557 %tmp507 = fsub float -0.000000e+00, %tmp502
558 %tmp508 = fadd float %tmp488, %tmp507
559 %tmp509 = fmul float %tmp94, %tmp94
560 %tmp510 = fmul float %tmp95, %tmp95
561 %tmp511 = fadd float %tmp510, %tmp509
562 %tmp512 = fmul float %tmp96, %tmp96
563 %tmp513 = fadd float %tmp511, %tmp512
564 %tmp514 = call float @llvm.amdgcn.rsq.f32(float %tmp513)
565 %tmp515 = fmul float %tmp94, %tmp514
566 %tmp516 = fmul float %tmp95, %tmp514
567 %tmp517 = fmul float %tmp96, %tmp514
568 %tmp518 = fmul float %tmp504, %tmp515
569 %tmp519 = fmul float %tmp506, %tmp516
570 %tmp520 = fadd float %tmp519, %tmp518
571 %tmp521 = fmul float %tmp508, %tmp517
572 %tmp522 = fadd float %tmp520, %tmp521
573 %tmp523 = fsub float -0.000000e+00, %tmp522
574 %tmp524 = fcmp uge float %tmp523, 0.000000e+00
575 %tmp525 = select i1 %tmp524, float %tmp523, float 0.000000e+00
576 %tmp526 = fmul float %tmp42, %tmp379
577 %tmp527 = fadd float %tmp526, 1.000000e+00
578 %tmp528 = call float @llvm.pow.f32(float %tmp525, float %tmp527)
579 %tmp529 = fmul float %tmp475, %tmp36
580 %tmp530 = fmul float %tmp477, %tmp37
581 %tmp531 = fmul float %tmp479, %tmp38
582 %tmp532 = fmul float %tmp358, %tmp486
583 %tmp533 = fmul float %tmp359, %tmp487
584 %tmp534 = fadd float %tmp533, %tmp532
585 %tmp535 = fmul float %tmp360, %tmp488
586 %tmp536 = fadd float %tmp534, %tmp535
587 %tmp537 = fcmp uge float %tmp536, 0.000000e+00
588 %tmp538 = select i1 %tmp537, float %tmp536, float 0.000000e+00
589 %tmp539 = fmul float %tmp529, %tmp538
590 %tmp540 = fmul float %tmp530, %tmp538
591 %tmp541 = fmul float %tmp531, %tmp538
592 %tmp542 = fmul float %tmp489, %tmp528
593 %tmp543 = fadd float %tmp542, %tmp539
594 %tmp544 = fmul float %tmp490, %tmp528
595 %tmp545 = fadd float %tmp544, %tmp540
596 %tmp546 = fmul float %tmp491, %tmp528
597 %tmp547 = fadd float %tmp546, %tmp541
598 %tmp548 = fmul float %tmp475, %tmp33
599 %tmp549 = fmul float %tmp477, %tmp34
600 %tmp550 = fmul float %tmp479, %tmp35
601 %tmp551 = fmul float %tmp543, %tmp56
602 %tmp552 = fadd float %tmp551, %tmp548
603 %tmp553 = fmul float %tmp545, %tmp57
604 %tmp554 = fadd float %tmp553, %tmp549
605 %tmp555 = fmul float %tmp547, %tmp58
606 %tmp556 = fadd float %tmp555, %tmp550
607 %tmp557 = bitcast float %tmp135 to i32
608 %tmp558 = bitcast float %tmp181 to i32
609 %tmp559 = bitcast float %tmp136 to i32
610 %tmp560 = bitcast float %tmp182 to i32
611 %tmp561 = bitcast float %temp28.1 to i32
612 %tmp562 = bitcast float %temp29.1 to i32
613 %tmp563 = insertelement <8 x i32> undef, i32 %tmp557, i32 0
614 %tmp564 = insertelement <8 x i32> %tmp563, i32 %tmp558, i32 1
615 %tmp565 = insertelement <8 x i32> %tmp564, i32 %tmp559, i32 2
616 %tmp566 = insertelement <8 x i32> %tmp565, i32 %tmp560, i32 3
617 %tmp567 = insertelement <8 x i32> %tmp566, i32 %tmp561, i32 4
618 %tmp568 = insertelement <8 x i32> %tmp567, i32 %tmp562, i32 5
619 %tmp569 = insertelement <8 x i32> %tmp568, i32 undef, i32 6
620 %tmp570 = insertelement <8 x i32> %tmp569, i32 undef, i32 7
Matt Arsenault018179f2016-01-26 04:38:08 +0000621 %tmp75.bc = bitcast <16 x i8> %tmp75 to <4 x i32>
622 %tmp571 = call <4 x float> @llvm.SI.image.sample.d.v8i32(<8 x i32> %tmp570, <8 x i32> %tmp73, <4 x i32> %tmp75.bc, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
Matt Arsenault325cca32016-01-23 05:42:43 +0000623 %tmp572 = extractelement <4 x float> %tmp571, i32 0
624 %tmp573 = extractelement <4 x float> %tmp571, i32 1
625 %tmp574 = extractelement <4 x float> %tmp571, i32 2
626 %tmp575 = fmul float %tmp572, %tmp43
627 %tmp576 = fadd float %tmp575, %tmp552
628 %tmp577 = fmul float %tmp573, %tmp44
629 %tmp578 = fadd float %tmp577, %tmp554
630 %tmp579 = fmul float %tmp574, %tmp45
631 %tmp580 = fadd float %tmp579, %tmp556
632 %tmp581 = call i32 @llvm.SI.packf16(float %tmp576, float %tmp578)
633 %tmp582 = bitcast i32 %tmp581 to float
634 %tmp583 = call i32 @llvm.SI.packf16(float %tmp580, float %tmp282)
635 %tmp584 = bitcast i32 %tmp583 to float
636 call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %tmp582, float %tmp584, float %tmp582, float %tmp584)
Tom Stellard859199d2013-11-27 21:23:29 +0000637 ret void
638
639ENDIF66: ; preds = %LOOP65
Matt Arsenault325cca32016-01-23 05:42:43 +0000640 %tmp585 = bitcast float %temp28.1 to i32
641 %tmp586 = bitcast float %temp29.1 to i32
642 %tmp587 = insertelement <8 x i32> %tmp236, i32 %tmp585, i32 4
643 %tmp588 = insertelement <8 x i32> %tmp587, i32 %tmp586, i32 5
644 %tmp589 = insertelement <8 x i32> %tmp588, i32 undef, i32 6
645 %tmp590 = insertelement <8 x i32> %tmp589, i32 undef, i32 7
Matt Arsenault018179f2016-01-26 04:38:08 +0000646 %tmp591 = call <4 x float> @llvm.SI.image.sample.d.v8i32(<8 x i32> %tmp590, <8 x i32> %tmp61, <4 x i32> %tmp63.bc, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
Matt Arsenault325cca32016-01-23 05:42:43 +0000647 %tmp592 = extractelement <4 x float> %tmp591, i32 3
648 %tmp593 = fcmp oge float %temp30.1, %tmp592
649 %tmp594 = sext i1 %tmp593 to i32
650 %tmp595 = bitcast i32 %tmp594 to float
651 %tmp596 = bitcast float %tmp595 to i32
652 %tmp597 = and i32 %tmp596, 1065353216
653 %tmp598 = bitcast i32 %tmp597 to float
654 %tmp599 = fmul float 5.000000e-01, %temp32.0
655 %tmp600 = fsub float -0.000000e+00, %tmp599
656 %tmp601 = fmul float %tmp598, %temp32.0
657 %tmp602 = fadd float %tmp601, %tmp600
658 %tmp603 = fmul float %tmp213, %tmp602
659 %tmp604 = fadd float %tmp603, %temp28.1
660 %tmp605 = fmul float %tmp214, %tmp602
661 %tmp606 = fadd float %tmp605, %temp29.1
662 %tmp607 = fmul float %tmp215, %tmp602
663 %tmp608 = fadd float %tmp607, %temp30.1
664 %tmp609 = fadd float %temp24.1, 1.000000e+00
665 %tmp610 = fmul float %temp32.0, 5.000000e-01
Tom Stellard859199d2013-11-27 21:23:29 +0000666 br label %LOOP65
667}
668
Tom Stellard79243d92014-10-01 17:15:17 +0000669; CHECK-LABEL: {{^}}main1:
Tom Stellard326d6ec2014-11-05 14:50:53 +0000670; CHECK: s_endpgm
Nicolai Haehnledf3a20c2016-04-06 19:40:20 +0000671define amdgpu_ps void @main1([17 x <16 x i8>] addrspace(2)* byval %arg, [32 x <16 x i8>] addrspace(2)* byval %arg1, [16 x <8 x i32>] addrspace(2)* byval %arg2, float inreg %arg3, i32 inreg %arg4, <2 x i32> %arg5, <2 x i32> %arg6, <2 x i32> %arg7, <3 x i32> %arg8, <2 x i32> %arg9, <2 x i32> %arg10, <2 x i32> %arg11, float %arg12, float %arg13, float %arg14, float %arg15, float %arg16, float %arg17, float %arg18, float %arg19, float %arg20) {
Tom Stellardc149dc02013-11-27 21:23:35 +0000672main_body:
Matt Arsenault325cca32016-01-23 05:42:43 +0000673 %tmp = getelementptr [17 x <16 x i8>], [17 x <16 x i8>] addrspace(2)* %arg, i64 0, i32 0
674 %tmp21 = load <16 x i8>, <16 x i8> addrspace(2)* %tmp, !tbaa !0
675 %tmp22 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 0)
676 %tmp23 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 4)
677 %tmp24 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 8)
678 %tmp25 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 12)
679 %tmp26 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 28)
680 %tmp27 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 48)
681 %tmp28 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 52)
682 %tmp29 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 56)
683 %tmp30 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 64)
684 %tmp31 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 68)
685 %tmp32 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 72)
686 %tmp33 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 76)
687 %tmp34 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 128)
688 %tmp35 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 132)
689 %tmp36 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 144)
690 %tmp37 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 148)
691 %tmp38 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 152)
692 %tmp39 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 160)
693 %tmp40 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 164)
694 %tmp41 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 168)
695 %tmp42 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 172)
696 %tmp43 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 176)
697 %tmp44 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 180)
698 %tmp45 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 184)
699 %tmp46 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 192)
700 %tmp47 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 196)
701 %tmp48 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 200)
702 %tmp49 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 208)
703 %tmp50 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 212)
704 %tmp51 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 216)
705 %tmp52 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 220)
706 %tmp53 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 236)
707 %tmp54 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 240)
708 %tmp55 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 244)
709 %tmp56 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 248)
710 %tmp57 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 252)
711 %tmp58 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 256)
712 %tmp59 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 260)
713 %tmp60 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 264)
714 %tmp61 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 268)
715 %tmp62 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 272)
716 %tmp63 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 276)
717 %tmp64 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 280)
718 %tmp65 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 284)
719 %tmp66 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 288)
720 %tmp67 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 292)
721 %tmp68 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 464)
722 %tmp69 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 468)
723 %tmp70 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 472)
724 %tmp71 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 496)
725 %tmp72 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 500)
726 %tmp73 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 504)
727 %tmp74 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 512)
728 %tmp75 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 516)
729 %tmp76 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 524)
730 %tmp77 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 532)
731 %tmp78 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 536)
732 %tmp79 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 540)
733 %tmp80 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 544)
734 %tmp81 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 548)
735 %tmp82 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 552)
736 %tmp83 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 556)
737 %tmp84 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 560)
738 %tmp85 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 564)
739 %tmp86 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 568)
740 %tmp87 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 572)
741 %tmp88 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 576)
742 %tmp89 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 580)
743 %tmp90 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 584)
744 %tmp91 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 588)
745 %tmp92 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 592)
746 %tmp93 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 596)
747 %tmp94 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 600)
748 %tmp95 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 604)
749 %tmp96 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 608)
750 %tmp97 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 612)
751 %tmp98 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 616)
752 %tmp99 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 624)
753 %tmp100 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 628)
754 %tmp101 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 632)
755 %tmp102 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 636)
756 %tmp103 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 640)
757 %tmp104 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 644)
758 %tmp105 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 648)
759 %tmp106 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 652)
760 %tmp107 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 656)
761 %tmp108 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 660)
762 %tmp109 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 664)
763 %tmp110 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 668)
764 %tmp111 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 672)
765 %tmp112 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 676)
766 %tmp113 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 680)
767 %tmp114 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 684)
768 %tmp115 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 688)
769 %tmp116 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 692)
770 %tmp117 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 696)
771 %tmp118 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 700)
772 %tmp119 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 704)
773 %tmp120 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 708)
774 %tmp121 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 712)
775 %tmp122 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 716)
776 %tmp123 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 864)
777 %tmp124 = call float @llvm.SI.load.const(<16 x i8> %tmp21, i32 868)
Matt Arsenault018179f2016-01-26 04:38:08 +0000778 %tmp125 = getelementptr [16 x <8 x i32>], [16 x <8 x i32>] addrspace(2)* %arg2, i64 0, i32 0
779 %tmp126 = load <8 x i32>, <8 x i32> addrspace(2)* %tmp125, !tbaa !0
Matt Arsenault325cca32016-01-23 05:42:43 +0000780 %tmp127 = getelementptr [32 x <16 x i8>], [32 x <16 x i8>] addrspace(2)* %arg1, i64 0, i32 0
781 %tmp128 = load <16 x i8>, <16 x i8> addrspace(2)* %tmp127, !tbaa !0
Matt Arsenault018179f2016-01-26 04:38:08 +0000782 %tmp129 = getelementptr [16 x <8 x i32>], [16 x <8 x i32>] addrspace(2)* %arg2, i64 0, i32 1
783 %tmp130 = load <8 x i32>, <8 x i32> addrspace(2)* %tmp129, !tbaa !0
Matt Arsenault325cca32016-01-23 05:42:43 +0000784 %tmp131 = getelementptr [32 x <16 x i8>], [32 x <16 x i8>] addrspace(2)* %arg1, i64 0, i32 1
785 %tmp132 = load <16 x i8>, <16 x i8> addrspace(2)* %tmp131, !tbaa !0
Matt Arsenault018179f2016-01-26 04:38:08 +0000786 %tmp133 = getelementptr [16 x <8 x i32>], [16 x <8 x i32>] addrspace(2)* %arg2, i64 0, i32 2
787 %tmp134 = load <8 x i32>, <8 x i32> addrspace(2)* %tmp133, !tbaa !0
Matt Arsenault325cca32016-01-23 05:42:43 +0000788 %tmp135 = getelementptr [32 x <16 x i8>], [32 x <16 x i8>] addrspace(2)* %arg1, i64 0, i32 2
789 %tmp136 = load <16 x i8>, <16 x i8> addrspace(2)* %tmp135, !tbaa !0
Matt Arsenault018179f2016-01-26 04:38:08 +0000790 %tmp137 = getelementptr [16 x <8 x i32>], [16 x <8 x i32>] addrspace(2)* %arg2, i64 0, i32 3
791 %tmp138 = load <8 x i32>, <8 x i32> addrspace(2)* %tmp137, !tbaa !0
Matt Arsenault325cca32016-01-23 05:42:43 +0000792 %tmp139 = getelementptr [32 x <16 x i8>], [32 x <16 x i8>] addrspace(2)* %arg1, i64 0, i32 3
793 %tmp140 = load <16 x i8>, <16 x i8> addrspace(2)* %tmp139, !tbaa !0
Matt Arsenault018179f2016-01-26 04:38:08 +0000794 %tmp141 = getelementptr [16 x <8 x i32>], [16 x <8 x i32>] addrspace(2)* %arg2, i64 0, i32 4
795 %tmp142 = load <8 x i32>, <8 x i32> addrspace(2)* %tmp141, !tbaa !0
Matt Arsenault325cca32016-01-23 05:42:43 +0000796 %tmp143 = getelementptr [32 x <16 x i8>], [32 x <16 x i8>] addrspace(2)* %arg1, i64 0, i32 4
797 %tmp144 = load <16 x i8>, <16 x i8> addrspace(2)* %tmp143, !tbaa !0
Matt Arsenault018179f2016-01-26 04:38:08 +0000798 %tmp145 = getelementptr [16 x <8 x i32>], [16 x <8 x i32>] addrspace(2)* %arg2, i64 0, i32 5
799 %tmp146 = load <8 x i32>, <8 x i32> addrspace(2)* %tmp145, !tbaa !0
Matt Arsenault325cca32016-01-23 05:42:43 +0000800 %tmp147 = getelementptr [32 x <16 x i8>], [32 x <16 x i8>] addrspace(2)* %arg1, i64 0, i32 5
801 %tmp148 = load <16 x i8>, <16 x i8> addrspace(2)* %tmp147, !tbaa !0
Matt Arsenault018179f2016-01-26 04:38:08 +0000802 %tmp149 = getelementptr [16 x <8 x i32>], [16 x <8 x i32>] addrspace(2)* %arg2, i64 0, i32 6
803 %tmp150 = load <8 x i32>, <8 x i32> addrspace(2)* %tmp149, !tbaa !0
Matt Arsenault325cca32016-01-23 05:42:43 +0000804 %tmp151 = getelementptr [32 x <16 x i8>], [32 x <16 x i8>] addrspace(2)* %arg1, i64 0, i32 6
805 %tmp152 = load <16 x i8>, <16 x i8> addrspace(2)* %tmp151, !tbaa !0
Matt Arsenault018179f2016-01-26 04:38:08 +0000806 %tmp153 = getelementptr [16 x <8 x i32>], [16 x <8 x i32>] addrspace(2)* %arg2, i64 0, i32 7
807 %tmp154 = load <8 x i32>, <8 x i32> addrspace(2)* %tmp153, !tbaa !0
Matt Arsenault325cca32016-01-23 05:42:43 +0000808 %tmp155 = getelementptr [32 x <16 x i8>], [32 x <16 x i8>] addrspace(2)* %arg1, i64 0, i32 7
809 %tmp156 = load <16 x i8>, <16 x i8> addrspace(2)* %tmp155, !tbaa !0
Matt Arsenault018179f2016-01-26 04:38:08 +0000810 %tmp157 = getelementptr [16 x <8 x i32>], [16 x <8 x i32>] addrspace(2)* %arg2, i64 0, i32 8
811 %tmp158 = load <8 x i32>, <8 x i32> addrspace(2)* %tmp157, !tbaa !0
Matt Arsenault325cca32016-01-23 05:42:43 +0000812 %tmp159 = getelementptr [32 x <16 x i8>], [32 x <16 x i8>] addrspace(2)* %arg1, i64 0, i32 8
813 %tmp160 = load <16 x i8>, <16 x i8> addrspace(2)* %tmp159, !tbaa !0
814 %tmp161 = fcmp ugt float %arg17, 0.000000e+00
815 %tmp162 = select i1 %tmp161, float 1.000000e+00, float 0.000000e+00
816 %tmp163 = call float @llvm.SI.fs.interp(i32 0, i32 0, i32 %arg4, <2 x i32> %arg6)
817 %tmp164 = call float @llvm.SI.fs.interp(i32 1, i32 0, i32 %arg4, <2 x i32> %arg6)
818 %tmp165 = call float @llvm.SI.fs.interp(i32 2, i32 0, i32 %arg4, <2 x i32> %arg6)
819 %tmp166 = call float @llvm.SI.fs.interp(i32 3, i32 0, i32 %arg4, <2 x i32> %arg6)
820 %tmp167 = call float @llvm.SI.fs.interp(i32 0, i32 1, i32 %arg4, <2 x i32> %arg6)
821 %tmp168 = call float @llvm.SI.fs.interp(i32 1, i32 1, i32 %arg4, <2 x i32> %arg6)
822 %tmp169 = call float @llvm.SI.fs.interp(i32 2, i32 1, i32 %arg4, <2 x i32> %arg6)
823 %tmp170 = call float @llvm.SI.fs.interp(i32 3, i32 1, i32 %arg4, <2 x i32> %arg6)
824 %tmp171 = call float @llvm.SI.fs.interp(i32 0, i32 2, i32 %arg4, <2 x i32> %arg6)
825 %tmp172 = call float @llvm.SI.fs.interp(i32 1, i32 2, i32 %arg4, <2 x i32> %arg6)
826 %tmp173 = call float @llvm.SI.fs.interp(i32 2, i32 2, i32 %arg4, <2 x i32> %arg6)
827 %tmp174 = call float @llvm.SI.fs.interp(i32 3, i32 2, i32 %arg4, <2 x i32> %arg6)
828 %tmp175 = call float @llvm.SI.fs.interp(i32 0, i32 3, i32 %arg4, <2 x i32> %arg6)
829 %tmp176 = call float @llvm.SI.fs.interp(i32 1, i32 3, i32 %arg4, <2 x i32> %arg6)
830 %tmp177 = call float @llvm.SI.fs.interp(i32 2, i32 3, i32 %arg4, <2 x i32> %arg6)
831 %tmp178 = call float @llvm.SI.fs.interp(i32 3, i32 3, i32 %arg4, <2 x i32> %arg6)
832 %tmp179 = call float @llvm.SI.fs.interp(i32 0, i32 4, i32 %arg4, <2 x i32> %arg6)
833 %tmp180 = call float @llvm.SI.fs.interp(i32 1, i32 4, i32 %arg4, <2 x i32> %arg6)
834 %tmp181 = call float @llvm.SI.fs.interp(i32 2, i32 4, i32 %arg4, <2 x i32> %arg6)
835 %tmp182 = call float @llvm.SI.fs.interp(i32 3, i32 4, i32 %arg4, <2 x i32> %arg6)
836 %tmp183 = call float @llvm.SI.fs.interp(i32 0, i32 5, i32 %arg4, <2 x i32> %arg6)
837 %tmp184 = call float @llvm.SI.fs.interp(i32 1, i32 5, i32 %arg4, <2 x i32> %arg6)
838 %tmp185 = call float @llvm.SI.fs.interp(i32 2, i32 5, i32 %arg4, <2 x i32> %arg6)
839 %tmp186 = call float @llvm.SI.fs.interp(i32 3, i32 5, i32 %arg4, <2 x i32> %arg6)
840 %tmp187 = call float @llvm.SI.fs.interp(i32 0, i32 6, i32 %arg4, <2 x i32> %arg6)
841 %tmp188 = call float @llvm.SI.fs.interp(i32 1, i32 6, i32 %arg4, <2 x i32> %arg6)
842 %tmp189 = call float @llvm.SI.fs.interp(i32 2, i32 6, i32 %arg4, <2 x i32> %arg6)
843 %tmp190 = call float @llvm.SI.fs.interp(i32 3, i32 6, i32 %arg4, <2 x i32> %arg6)
844 %tmp191 = call float @llvm.SI.fs.interp(i32 0, i32 7, i32 %arg4, <2 x i32> %arg6)
845 %tmp192 = call float @llvm.SI.fs.interp(i32 1, i32 7, i32 %arg4, <2 x i32> %arg6)
846 %tmp193 = call float @llvm.SI.fs.interp(i32 2, i32 7, i32 %arg4, <2 x i32> %arg6)
847 %tmp194 = call float @llvm.SI.fs.interp(i32 3, i32 7, i32 %arg4, <2 x i32> %arg6)
848 %tmp195 = fmul float %arg14, %tmp123
849 %tmp196 = fadd float %tmp195, %tmp124
Matt Arsenault8aa56782016-01-23 05:42:49 +0000850 %tmp197 = call float @llvm.AMDGPU.clamp.f32(float %tmp162, float 0.000000e+00, float 1.000000e+00)
851 %tmp198 = call float @llvm.AMDGPU.clamp.f32(float 0.000000e+00, float 0.000000e+00, float 1.000000e+00)
852 %tmp199 = call float @llvm.AMDGPU.clamp.f32(float 0.000000e+00, float 0.000000e+00, float 1.000000e+00)
853 %tmp200 = call float @llvm.AMDGPU.clamp.f32(float 1.000000e+00, float 0.000000e+00, float 1.000000e+00)
Matt Arsenault325cca32016-01-23 05:42:43 +0000854 %tmp201 = bitcast float %tmp197 to i32
855 %tmp202 = icmp ne i32 %tmp201, 0
856 %. = select i1 %tmp202, float -1.000000e+00, float 1.000000e+00
857 %tmp203 = fsub float -0.000000e+00, %tmp163
858 %tmp204 = fadd float %tmp43, %tmp203
859 %tmp205 = fsub float -0.000000e+00, %tmp164
860 %tmp206 = fadd float %tmp44, %tmp205
861 %tmp207 = fsub float -0.000000e+00, %tmp165
862 %tmp208 = fadd float %tmp45, %tmp207
863 %tmp209 = fmul float %tmp204, %tmp204
864 %tmp210 = fmul float %tmp206, %tmp206
865 %tmp211 = fadd float %tmp210, %tmp209
866 %tmp212 = fmul float %tmp208, %tmp208
867 %tmp213 = fadd float %tmp211, %tmp212
868 %tmp214 = call float @llvm.amdgcn.rsq.f32(float %tmp213)
869 %tmp215 = fmul float %tmp204, %tmp214
870 %tmp216 = fmul float %tmp206, %tmp214
871 %tmp217 = fmul float %tmp208, %tmp214
872 %tmp218 = fmul float %., %tmp53
873 %tmp219 = fmul float %arg13, %tmp46
874 %tmp220 = fmul float %tmp196, %tmp47
875 %tmp221 = bitcast float %tmp173 to i32
876 %tmp222 = bitcast float %tmp174 to i32
877 %tmp223 = insertelement <2 x i32> undef, i32 %tmp221, i32 0
878 %tmp224 = insertelement <2 x i32> %tmp223, i32 %tmp222, i32 1
Matt Arsenault018179f2016-01-26 04:38:08 +0000879 %tmp132.bc = bitcast <16 x i8> %tmp132 to <4 x i32>
880 %tmp225 = call <4 x float> @llvm.SI.image.sample.v2i32(<2 x i32> %tmp224, <8 x i32> %tmp130, <4 x i32> %tmp132.bc, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
Matt Arsenault325cca32016-01-23 05:42:43 +0000881 %tmp226 = extractelement <4 x float> %tmp225, i32 0
882 %tmp227 = extractelement <4 x float> %tmp225, i32 1
883 %tmp228 = extractelement <4 x float> %tmp225, i32 2
884 %tmp229 = extractelement <4 x float> %tmp225, i32 3
885 %tmp230 = fmul float %tmp226, 0x4012611180000000
886 %tmp231 = fmul float %tmp227, 0x4012611180000000
887 %tmp232 = fmul float %tmp228, 0x4012611180000000
888 %one.sub.a.i = fsub float 1.000000e+00, %tmp26
889 %result.i = fadd float %tmp230, %one.sub.a.i
890 %one.sub.a.i43 = fsub float 1.000000e+00, %tmp26
891 %result.i44 = fadd float %tmp231, %one.sub.a.i43
892 %one.sub.a.i41 = fsub float 1.000000e+00, %tmp26
893 %result.i42 = fadd float %tmp232, %one.sub.a.i41
894 %tmp233 = fmul float %tmp215, %tmp183
895 %tmp234 = fmul float %tmp216, %tmp184
896 %tmp235 = fadd float %tmp234, %tmp233
897 %tmp236 = fmul float %tmp217, %tmp185
898 %tmp237 = fadd float %tmp235, %tmp236
899 %tmp238 = fmul float %tmp215, %tmp186
900 %tmp239 = fmul float %tmp216, %tmp187
901 %tmp240 = fadd float %tmp239, %tmp238
902 %tmp241 = fmul float %tmp217, %tmp188
903 %tmp242 = fadd float %tmp240, %tmp241
904 %tmp243 = fmul float %tmp215, %tmp189
905 %tmp244 = fmul float %tmp216, %tmp190
906 %tmp245 = fadd float %tmp244, %tmp243
907 %tmp246 = fmul float %tmp217, %tmp191
908 %tmp247 = fadd float %tmp245, %tmp246
Matt Arsenault8aa56782016-01-23 05:42:49 +0000909 %tmp248 = call float @llvm.AMDGPU.clamp.f32(float %tmp247, float 0.000000e+00, float 1.000000e+00)
Matt Arsenault325cca32016-01-23 05:42:43 +0000910 %tmp249 = fmul float %tmp213, 0x3F5A36E2E0000000
Matt Arsenault8aa56782016-01-23 05:42:49 +0000911 %tmp250 = call float @llvm.AMDGPU.clamp.f32(float %tmp249, float 0.000000e+00, float 1.000000e+00)
Matt Arsenault325cca32016-01-23 05:42:43 +0000912 %tmp251 = fsub float -0.000000e+00, %tmp250
913 %tmp252 = fadd float 1.000000e+00, %tmp251
914 %tmp253 = call float @llvm.pow.f32(float %tmp248, float 2.500000e-01)
915 %tmp254 = fmul float %tmp38, %tmp253
916 %tmp255 = fmul float %tmp237, %tmp254
917 %tmp256 = fmul float %tmp242, %tmp254
918 %tmp257 = fmul float %tmp255, %tmp229
919 %tmp258 = fmul float %tmp256, %tmp229
920 %tmp259 = fadd float %tmp248, 0x3EE4F8B580000000
921 %tmp260 = fsub float -0.000000e+00, %tmp248
922 %tmp261 = fadd float 1.000000e+00, %tmp260
923 %tmp262 = fmul float 1.200000e+01, %tmp261
924 %tmp263 = fadd float %tmp262, 4.000000e+00
925 %tmp264 = fsub float -0.000000e+00, %tmp263
926 %tmp265 = fmul float %tmp264, %tmp259
927 %tmp266 = fsub float -0.000000e+00, %tmp263
928 %tmp267 = fmul float %tmp266, %tmp259
929 %tmp268 = fsub float -0.000000e+00, %tmp263
930 %tmp269 = fmul float %tmp268, %tmp259
931 %tmp270 = fdiv float 1.000000e+00, %tmp265
932 %tmp271 = fdiv float 1.000000e+00, %tmp267
933 %tmp272 = fdiv float 1.000000e+00, %tmp269
934 %tmp273 = fmul float %tmp257, %tmp270
935 %tmp274 = fmul float %tmp258, %tmp271
936 %tmp275 = fmul float %tmp259, %tmp272
Tom Stellardc149dc02013-11-27 21:23:35 +0000937 br label %LOOP
938
939LOOP: ; preds = %LOOP, %main_body
Matt Arsenault325cca32016-01-23 05:42:43 +0000940 %temp144.0 = phi float [ 1.000000e+00, %main_body ], [ %tmp288, %LOOP ]
941 %temp168.0 = phi float [ %tmp175, %main_body ], [ %tmp284, %LOOP ]
942 %temp169.0 = phi float [ %tmp176, %main_body ], [ %tmp285, %LOOP ]
943 %temp170.0 = phi float [ %tmp252, %main_body ], [ %tmp286, %LOOP ]
944 %tmp276 = bitcast float %temp168.0 to i32
945 %tmp277 = bitcast float %temp169.0 to i32
946 %tmp278 = insertelement <4 x i32> undef, i32 %tmp276, i32 0
947 %tmp279 = insertelement <4 x i32> %tmp278, i32 %tmp277, i32 1
948 %tmp280 = insertelement <4 x i32> %tmp279, i32 0, i32 2
949 %tmp281 = insertelement <4 x i32> %tmp280, i32 undef, i32 3
Matt Arsenault018179f2016-01-26 04:38:08 +0000950 %tmp148.bc = bitcast <16 x i8> %tmp148 to <4 x i32>
951 %tmp282 = call <4 x float> @llvm.SI.image.sample.l.v4i32(<4 x i32> %tmp281, <8 x i32> %tmp146, <4 x i32> %tmp148.bc, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
Matt Arsenault325cca32016-01-23 05:42:43 +0000952 %tmp283 = extractelement <4 x float> %tmp282, i32 3
953 %tmp284 = fadd float %temp168.0, %tmp273
954 %tmp285 = fadd float %temp169.0, %tmp274
955 %tmp286 = fadd float %temp170.0, %tmp275
956 %tmp287 = fsub float -0.000000e+00, %tmp283
957 %tmp288 = fadd float %tmp286, %tmp287
958 %tmp289 = fcmp oge float 0.000000e+00, %tmp288
959 %tmp290 = sext i1 %tmp289 to i32
960 %tmp291 = bitcast i32 %tmp290 to float
961 %tmp292 = bitcast float %tmp291 to i32
962 %tmp293 = icmp ne i32 %tmp292, 0
963 br i1 %tmp293, label %IF189, label %LOOP
Tom Stellardc149dc02013-11-27 21:23:35 +0000964
965IF189: ; preds = %LOOP
Matt Arsenault325cca32016-01-23 05:42:43 +0000966 %tmp294 = extractelement <4 x float> %tmp282, i32 0
967 %tmp295 = extractelement <4 x float> %tmp282, i32 1
968 %tmp296 = extractelement <4 x float> %tmp282, i32 2
969 %tmp297 = fsub float -0.000000e+00, %tmp288
970 %tmp298 = fadd float %temp144.0, %tmp297
971 %tmp299 = fdiv float 1.000000e+00, %tmp298
972 %tmp300 = fmul float %tmp288, %tmp299
973 %tmp301 = fadd float %tmp300, -1.000000e+00
974 %tmp302 = fmul float %tmp301, %tmp273
975 %tmp303 = fadd float %tmp302, %tmp284
976 %tmp304 = fmul float %tmp301, %tmp274
977 %tmp305 = fadd float %tmp304, %tmp285
978 %tmp306 = fsub float -0.000000e+00, %tmp175
979 %tmp307 = fadd float %tmp303, %tmp306
980 %tmp308 = fsub float -0.000000e+00, %tmp176
981 %tmp309 = fadd float %tmp305, %tmp308
982 %tmp310 = fadd float %tmp175, %tmp307
983 %tmp311 = fadd float %tmp176, %tmp309
984 %tmp312 = fmul float %tmp307, %tmp66
985 %tmp313 = fmul float %tmp309, %tmp67
986 %tmp314 = fmul float %tmp312, %tmp54
987 %tmp315 = fmul float %tmp312, %tmp55
988 %tmp316 = fmul float %tmp313, %tmp56
989 %tmp317 = fadd float %tmp316, %tmp314
990 %tmp318 = fmul float %tmp313, %tmp57
991 %tmp319 = fadd float %tmp318, %tmp315
992 %tmp320 = fadd float %tmp177, %tmp317
993 %tmp321 = fadd float %tmp178, %tmp319
994 %tmp322 = fmul float %tmp312, %tmp58
995 %tmp323 = fmul float %tmp312, %tmp59
996 %tmp324 = fmul float %tmp312, %tmp60
997 %tmp325 = fmul float %tmp312, %tmp61
998 %tmp326 = fmul float %tmp313, %tmp62
999 %tmp327 = fadd float %tmp326, %tmp322
1000 %tmp328 = fmul float %tmp313, %tmp63
1001 %tmp329 = fadd float %tmp328, %tmp323
1002 %tmp330 = fmul float %tmp313, %tmp64
1003 %tmp331 = fadd float %tmp330, %tmp324
1004 %tmp332 = fmul float %tmp313, %tmp65
1005 %tmp333 = fadd float %tmp332, %tmp325
1006 %tmp334 = fadd float %tmp167, %tmp327
1007 %tmp335 = fadd float %tmp168, %tmp329
1008 %tmp336 = fadd float %tmp169, %tmp331
1009 %tmp337 = fadd float %tmp170, %tmp333
1010 %tmp338 = bitcast float %tmp334 to i32
1011 %tmp339 = bitcast float %tmp335 to i32
1012 %tmp340 = insertelement <2 x i32> undef, i32 %tmp338, i32 0
1013 %tmp341 = insertelement <2 x i32> %tmp340, i32 %tmp339, i32 1
Matt Arsenault018179f2016-01-26 04:38:08 +00001014 %tmp136.bc = bitcast <16 x i8> %tmp136 to <4 x i32>
1015 %tmp342 = call <4 x float> @llvm.SI.image.sample.v2i32(<2 x i32> %tmp341, <8 x i32> %tmp134, <4 x i32> %tmp136.bc, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
Matt Arsenault325cca32016-01-23 05:42:43 +00001016 %tmp343 = extractelement <4 x float> %tmp342, i32 0
1017 %tmp344 = extractelement <4 x float> %tmp342, i32 1
1018 %tmp345 = extractelement <4 x float> %tmp342, i32 2
1019 %tmp346 = extractelement <4 x float> %tmp342, i32 3
1020 %tmp347 = fmul float %tmp343, %tmp22
1021 %tmp348 = fmul float %tmp344, %tmp23
1022 %tmp349 = fmul float %tmp345, %tmp24
1023 %tmp350 = fmul float %tmp346, %tmp25
1024 %tmp351 = fmul float %tmp347, %tmp179
1025 %tmp352 = fmul float %tmp348, %tmp180
1026 %tmp353 = fmul float %tmp349, %tmp181
1027 %tmp354 = fmul float %tmp350, %tmp182
1028 %tmp355 = fsub float -0.000000e+00, %tmp346
1029 %tmp356 = fadd float 1.000000e+00, %tmp355
1030 %tmp357 = fmul float %tmp356, %tmp48
1031 %one.sub.a.i37 = fsub float 1.000000e+00, %tmp357
1032 %one.sub.ac.i38 = fmul float %one.sub.a.i37, %tmp351
1033 %mul.i39 = fmul float %tmp343, %tmp351
Matt Arsenault77131622016-01-23 05:42:38 +00001034 %result.i40 = fadd float %mul.i39, %one.sub.ac.i38
Matt Arsenault325cca32016-01-23 05:42:43 +00001035 %one.sub.a.i33 = fsub float 1.000000e+00, %tmp357
1036 %one.sub.ac.i34 = fmul float %one.sub.a.i33, %tmp352
1037 %mul.i35 = fmul float %tmp344, %tmp352
Matt Arsenault77131622016-01-23 05:42:38 +00001038 %result.i36 = fadd float %mul.i35, %one.sub.ac.i34
Matt Arsenault325cca32016-01-23 05:42:43 +00001039 %one.sub.a.i29 = fsub float 1.000000e+00, %tmp357
1040 %one.sub.ac.i30 = fmul float %one.sub.a.i29, %tmp353
1041 %mul.i31 = fmul float %tmp345, %tmp353
Matt Arsenault77131622016-01-23 05:42:38 +00001042 %result.i32 = fadd float %mul.i31, %one.sub.ac.i30
Matt Arsenault325cca32016-01-23 05:42:43 +00001043 %tmp358 = bitcast float %tmp336 to i32
1044 %tmp359 = bitcast float %tmp337 to i32
1045 %tmp360 = insertelement <2 x i32> undef, i32 %tmp358, i32 0
1046 %tmp361 = insertelement <2 x i32> %tmp360, i32 %tmp359, i32 1
Matt Arsenault018179f2016-01-26 04:38:08 +00001047 %tmp152.bc = bitcast <16 x i8> %tmp152 to <4 x i32>
1048 %tmp362 = call <4 x float> @llvm.SI.image.sample.v2i32(<2 x i32> %tmp361, <8 x i32> %tmp150, <4 x i32> %tmp152.bc, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
Matt Arsenault325cca32016-01-23 05:42:43 +00001049 %tmp363 = extractelement <4 x float> %tmp362, i32 2
1050 %tmp364 = fmul float %result.i40, %result.i
1051 %tmp365 = fmul float %result.i36, %result.i44
1052 %tmp366 = fmul float %result.i32, %result.i42
1053 %tmp367 = fmul float %tmp354, %tmp229
1054 %tmp368 = bitcast float %tmp310 to i32
1055 %tmp369 = bitcast float %tmp311 to i32
1056 %tmp370 = insertelement <2 x i32> undef, i32 %tmp368, i32 0
1057 %tmp371 = insertelement <2 x i32> %tmp370, i32 %tmp369, i32 1
Matt Arsenault018179f2016-01-26 04:38:08 +00001058 %tmp140.bc = bitcast <16 x i8> %tmp140 to <4 x i32>
1059 %tmp372 = call <4 x float> @llvm.SI.image.sample.v2i32(<2 x i32> %tmp371, <8 x i32> %tmp138, <4 x i32> %tmp140.bc, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
Matt Arsenault325cca32016-01-23 05:42:43 +00001060 %tmp373 = extractelement <4 x float> %tmp372, i32 0
1061 %tmp374 = extractelement <4 x float> %tmp372, i32 1
1062 %tmp375 = extractelement <4 x float> %tmp372, i32 2
1063 %tmp376 = extractelement <4 x float> %tmp372, i32 3
1064 %tmp377 = fcmp olt float 0.000000e+00, %tmp375
1065 %tmp378 = sext i1 %tmp377 to i32
1066 %tmp379 = bitcast i32 %tmp378 to float
1067 %tmp380 = bitcast float %tmp379 to i32
1068 %tmp381 = icmp ne i32 %tmp380, 0
1069 %.224 = select i1 %tmp381, float %tmp374, float %tmp373
1070 %.225 = select i1 %tmp381, float %tmp376, float %tmp374
1071 %tmp382 = bitcast float %tmp320 to i32
1072 %tmp383 = bitcast float %tmp321 to i32
1073 %tmp384 = insertelement <2 x i32> undef, i32 %tmp382, i32 0
1074 %tmp385 = insertelement <2 x i32> %tmp384, i32 %tmp383, i32 1
Matt Arsenault018179f2016-01-26 04:38:08 +00001075 %tmp144.bc = bitcast <16 x i8> %tmp144 to <4 x i32>
1076 %tmp386 = call <4 x float> @llvm.SI.image.sample.v2i32(<2 x i32> %tmp385, <8 x i32> %tmp142, <4 x i32> %tmp144.bc, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
Matt Arsenault325cca32016-01-23 05:42:43 +00001077 %tmp387 = extractelement <4 x float> %tmp386, i32 0
1078 %tmp388 = extractelement <4 x float> %tmp386, i32 1
1079 %tmp389 = extractelement <4 x float> %tmp386, i32 2
1080 %tmp390 = extractelement <4 x float> %tmp386, i32 3
1081 %tmp391 = fcmp olt float 0.000000e+00, %tmp389
1082 %tmp392 = sext i1 %tmp391 to i32
1083 %tmp393 = bitcast i32 %tmp392 to float
1084 %tmp394 = bitcast float %tmp393 to i32
1085 %tmp395 = icmp ne i32 %tmp394, 0
1086 %temp112.1 = select i1 %tmp395, float %tmp388, float %tmp387
1087 %temp113.1 = select i1 %tmp395, float %tmp390, float %tmp388
1088 %tmp396 = fmul float %.224, 2.000000e+00
1089 %tmp397 = fadd float %tmp396, -1.000000e+00
1090 %tmp398 = fmul float %.225, 2.000000e+00
1091 %tmp399 = fadd float %tmp398, -1.000000e+00
1092 %tmp400 = fmul float %temp112.1, 2.000000e+00
1093 %tmp401 = fadd float %tmp400, -1.000000e+00
1094 %tmp402 = fmul float %temp113.1, 2.000000e+00
1095 %tmp403 = fadd float %tmp402, -1.000000e+00
1096 %tmp404 = fsub float -0.000000e+00, %tmp397
1097 %tmp405 = fmul float %tmp404, %tmp34
1098 %tmp406 = fsub float -0.000000e+00, %tmp399
1099 %tmp407 = fmul float %tmp406, %tmp34
1100 %tmp408 = fsub float -0.000000e+00, %tmp401
1101 %tmp409 = fmul float %tmp408, %tmp35
1102 %tmp410 = fsub float -0.000000e+00, %tmp403
1103 %tmp411 = fmul float %tmp410, %tmp35
1104 %tmp412 = fmul float %tmp409, %tmp363
1105 %tmp413 = fmul float %tmp411, %tmp363
1106 %tmp414 = call float @fabs(float %tmp405)
1107 %tmp415 = call float @fabs(float %tmp407)
1108 %tmp416 = fsub float -0.000000e+00, %tmp414
1109 %tmp417 = fadd float 1.000000e+00, %tmp416
1110 %tmp418 = fsub float -0.000000e+00, %tmp415
1111 %tmp419 = fadd float 1.000000e+00, %tmp418
1112 %tmp420 = fmul float %tmp417, %tmp412
1113 %tmp421 = fadd float %tmp420, %tmp405
1114 %tmp422 = fmul float %tmp419, %tmp413
1115 %tmp423 = fadd float %tmp422, %tmp407
1116 %tmp424 = fmul float %tmp421, %tmp421
1117 %tmp425 = fmul float %tmp423, %tmp423
1118 %tmp426 = fadd float %tmp424, %tmp425
1119 %tmp427 = fsub float -0.000000e+00, %tmp426
1120 %tmp428 = fadd float 0x3FF00068E0000000, %tmp427
Matt Arsenault8aa56782016-01-23 05:42:49 +00001121 %tmp429 = call float @llvm.AMDGPU.clamp.f32(float %tmp428, float 0.000000e+00, float 1.000000e+00)
Matt Arsenault325cca32016-01-23 05:42:43 +00001122 %tmp430 = call float @llvm.amdgcn.rsq.f32(float %tmp429)
1123 %tmp431 = fmul float %tmp430, %tmp429
1124 %tmp432 = fsub float -0.000000e+00, %tmp429
1125 %cmp = fcmp ogt float 0.000000e+00, %tmp432
1126 %tmp433 = select i1 %cmp, float %tmp431, float 0.000000e+00
1127 %tmp434 = fmul float %tmp183, %tmp421
1128 %tmp435 = fmul float %tmp184, %tmp421
1129 %tmp436 = fmul float %tmp185, %tmp421
1130 %tmp437 = fmul float %tmp186, %tmp423
1131 %tmp438 = fadd float %tmp437, %tmp434
1132 %tmp439 = fmul float %tmp187, %tmp423
1133 %tmp440 = fadd float %tmp439, %tmp435
1134 %tmp441 = fmul float %tmp188, %tmp423
1135 %tmp442 = fadd float %tmp441, %tmp436
1136 %tmp443 = fmul float %tmp189, %tmp433
1137 %tmp444 = fadd float %tmp443, %tmp438
1138 %tmp445 = fmul float %tmp190, %tmp433
1139 %tmp446 = fadd float %tmp445, %tmp440
1140 %tmp447 = fmul float %tmp191, %tmp433
1141 %tmp448 = fadd float %tmp447, %tmp442
1142 %tmp449 = fmul float %tmp444, %tmp444
1143 %tmp450 = fmul float %tmp446, %tmp446
1144 %tmp451 = fadd float %tmp450, %tmp449
1145 %tmp452 = fmul float %tmp448, %tmp448
1146 %tmp453 = fadd float %tmp451, %tmp452
1147 %tmp454 = call float @llvm.amdgcn.rsq.f32(float %tmp453)
1148 %tmp455 = fmul float %tmp444, %tmp454
1149 %tmp456 = fmul float %tmp446, %tmp454
1150 %tmp457 = fmul float %tmp448, %tmp454
1151 %tmp458 = fcmp olt float 0.000000e+00, %tmp218
1152 %tmp459 = sext i1 %tmp458 to i32
1153 %tmp460 = bitcast i32 %tmp459 to float
1154 %tmp461 = bitcast float %tmp460 to i32
1155 %tmp462 = icmp ne i32 %tmp461, 0
1156 br i1 %tmp462, label %IF198, label %ENDIF197
Tom Stellardc149dc02013-11-27 21:23:35 +00001157
1158IF198: ; preds = %IF189
Matt Arsenault325cca32016-01-23 05:42:43 +00001159 %tmp463 = fsub float -0.000000e+00, %tmp455
1160 %tmp464 = fsub float -0.000000e+00, %tmp456
1161 %tmp465 = fsub float -0.000000e+00, %tmp457
Tom Stellardc149dc02013-11-27 21:23:35 +00001162 br label %ENDIF197
1163
Matt Arsenault77131622016-01-23 05:42:38 +00001164ENDIF197: ; preds = %IF198, %IF189
Matt Arsenault325cca32016-01-23 05:42:43 +00001165 %temp14.0 = phi float [ %tmp465, %IF198 ], [ %tmp457, %IF189 ]
1166 %temp13.0 = phi float [ %tmp464, %IF198 ], [ %tmp456, %IF189 ]
1167 %temp12.0 = phi float [ %tmp463, %IF198 ], [ %tmp455, %IF189 ]
1168 %tmp466 = bitcast float %tmp219 to i32
1169 %tmp467 = bitcast float %tmp220 to i32
1170 %tmp468 = insertelement <2 x i32> undef, i32 %tmp466, i32 0
1171 %tmp469 = insertelement <2 x i32> %tmp468, i32 %tmp467, i32 1
Matt Arsenault018179f2016-01-26 04:38:08 +00001172 %tmp160.bc = bitcast <16 x i8> %tmp160 to <4 x i32>
1173 %tmp470 = call <4 x float> @llvm.SI.image.sample.v2i32(<2 x i32> %tmp469, <8 x i32> %tmp158, <4 x i32> %tmp160.bc, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
Matt Arsenault325cca32016-01-23 05:42:43 +00001174 %tmp471 = extractelement <4 x float> %tmp470, i32 0
1175 %tmp472 = extractelement <4 x float> %tmp470, i32 1
1176 %tmp473 = extractelement <4 x float> %tmp470, i32 2
1177 %tmp474 = extractelement <4 x float> %tmp470, i32 3
1178 %tmp475 = fmul float %tmp471, %tmp39
1179 %tmp476 = fadd float %tmp475, %tmp40
1180 %tmp477 = fmul float %tmp472, %tmp39
1181 %tmp478 = fadd float %tmp477, %tmp40
1182 %tmp479 = fmul float %tmp473, %tmp39
1183 %tmp480 = fadd float %tmp479, %tmp40
1184 %tmp481 = fmul float %tmp474, %tmp41
1185 %tmp482 = fadd float %tmp481, %tmp42
1186 %tmp483 = bitcast float %tmp171 to i32
1187 %tmp484 = bitcast float %tmp172 to i32
1188 %tmp485 = insertelement <2 x i32> undef, i32 %tmp483, i32 0
1189 %tmp486 = insertelement <2 x i32> %tmp485, i32 %tmp484, i32 1
Matt Arsenault018179f2016-01-26 04:38:08 +00001190 %tmp156.bc = bitcast <16 x i8> %tmp156 to <4 x i32>
1191 %tmp487 = call <4 x float> @llvm.SI.image.sample.v2i32(<2 x i32> %tmp486, <8 x i32> %tmp154, <4 x i32> %tmp156.bc, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
Matt Arsenault325cca32016-01-23 05:42:43 +00001192 %tmp488 = extractelement <4 x float> %tmp487, i32 0
1193 %tmp489 = extractelement <4 x float> %tmp487, i32 1
1194 %tmp490 = extractelement <4 x float> %tmp487, i32 2
1195 %tmp491 = extractelement <4 x float> %tmp487, i32 3
1196 %tmp492 = fmul float %tmp491, 3.200000e+01
1197 %tmp493 = fadd float %tmp492, -1.600000e+01
Matt Arsenault8aa56782016-01-23 05:42:49 +00001198 %tmp494 = call float @llvm.exp2.f32(float %tmp493)
Matt Arsenault325cca32016-01-23 05:42:43 +00001199 %tmp495 = fmul float %tmp488, %tmp494
1200 %tmp496 = fmul float %tmp489, %tmp494
1201 %tmp497 = fmul float %tmp490, %tmp494
1202 %tmp498 = fmul float %tmp27, %tmp495
1203 %tmp499 = fadd float %tmp498, %tmp192
1204 %tmp500 = fmul float %tmp28, %tmp496
1205 %tmp501 = fadd float %tmp500, %tmp193
1206 %tmp502 = fmul float %tmp29, %tmp497
1207 %tmp503 = fadd float %tmp502, %tmp194
1208 %tmp504 = fmul float %tmp499, %tmp482
1209 %tmp505 = fmul float %tmp501, %tmp482
1210 %tmp506 = fmul float %tmp503, %tmp482
1211 %tmp507 = fmul float %tmp482, 5.000000e-01
1212 %tmp508 = fadd float %tmp507, 5.000000e-01
1213 %tmp509 = fmul float %tmp476, %tmp508
1214 %tmp510 = fadd float %tmp509, %tmp504
1215 %tmp511 = fmul float %tmp478, %tmp508
1216 %tmp512 = fadd float %tmp511, %tmp505
1217 %tmp513 = fmul float %tmp480, %tmp508
1218 %tmp514 = fadd float %tmp513, %tmp506
1219 %tmp515 = fmul float %tmp510, %tmp364
1220 %tmp516 = fmul float %tmp512, %tmp365
1221 %tmp517 = fmul float %tmp514, %tmp366
1222 %tmp518 = fmul float %tmp421, 0x3FDB272440000000
1223 %tmp519 = fmul float %tmp423, 0xBFDB272440000000
1224 %tmp520 = fadd float %tmp519, %tmp518
1225 %tmp521 = fmul float %tmp433, 0x3FE99999A0000000
1226 %tmp522 = fadd float %tmp520, %tmp521
1227 %tmp523 = fmul float %tmp522, 5.000000e-01
1228 %tmp524 = fadd float %tmp523, 0x3FE3333340000000
1229 %tmp525 = fmul float %tmp524, %tmp524
1230 %tmp526 = fmul float %tmp515, %tmp525
1231 %tmp527 = fmul float %tmp516, %tmp525
1232 %tmp528 = fmul float %tmp517, %tmp525
1233 %tmp529 = fsub float -0.000000e+00, %tmp71
1234 %tmp530 = fsub float -0.000000e+00, %tmp72
1235 %tmp531 = fsub float -0.000000e+00, %tmp73
1236 %tmp532 = fmul float %temp12.0, %tmp529
1237 %tmp533 = fmul float %temp13.0, %tmp530
1238 %tmp534 = fadd float %tmp533, %tmp532
1239 %tmp535 = fmul float %temp14.0, %tmp531
1240 %tmp536 = fadd float %tmp534, %tmp535
Matt Arsenault8aa56782016-01-23 05:42:49 +00001241 %tmp537 = call float @llvm.AMDGPU.clamp.f32(float %tmp536, float 0.000000e+00, float 1.000000e+00)
Matt Arsenault325cca32016-01-23 05:42:43 +00001242 %tmp538 = fmul float %tmp364, %tmp537
1243 %tmp539 = fmul float %tmp365, %tmp537
1244 %tmp540 = fmul float %tmp366, %tmp537
1245 %tmp541 = fmul float %tmp538, %tmp68
1246 %tmp542 = fmul float %tmp539, %tmp69
1247 %tmp543 = fmul float %tmp540, %tmp70
1248 %tmp544 = fsub float -0.000000e+00, %tmp163
1249 %tmp545 = fadd float %tmp96, %tmp544
1250 %tmp546 = fsub float -0.000000e+00, %tmp164
1251 %tmp547 = fadd float %tmp97, %tmp546
1252 %tmp548 = fsub float -0.000000e+00, %tmp165
1253 %tmp549 = fadd float %tmp98, %tmp548
1254 %tmp550 = fmul float %tmp545, %tmp545
1255 %tmp551 = fmul float %tmp547, %tmp547
1256 %tmp552 = fadd float %tmp551, %tmp550
1257 %tmp553 = fmul float %tmp549, %tmp549
1258 %tmp554 = fadd float %tmp552, %tmp553
1259 %tmp555 = call float @llvm.amdgcn.rsq.f32(float %tmp554)
1260 %tmp556 = fmul float %tmp555, %tmp554
1261 %tmp557 = fsub float -0.000000e+00, %tmp554
1262 %cmp1 = fcmp ogt float %tmp557, 0.000000e+00
1263 %tmp558 = select i1 %cmp1, float %tmp556, float 0.000000e+00
1264 %tmp559 = fsub float -0.000000e+00, %tmp83
1265 %tmp560 = fadd float %tmp558, %tmp559
1266 %tmp561 = fsub float -0.000000e+00, %tmp82
1267 %tmp562 = fadd float %tmp558, %tmp561
1268 %tmp563 = fsub float -0.000000e+00, %tmp81
1269 %tmp564 = fadd float %tmp558, %tmp563
1270 %tmp565 = fsub float -0.000000e+00, %tmp83
1271 %tmp566 = fadd float %tmp82, %tmp565
1272 %tmp567 = fsub float -0.000000e+00, %tmp82
1273 %tmp568 = fadd float %tmp81, %tmp567
1274 %tmp569 = fsub float -0.000000e+00, %tmp81
1275 %tmp570 = fadd float %tmp80, %tmp569
1276 %tmp571 = fdiv float 1.000000e+00, %tmp566
1277 %tmp572 = fdiv float 1.000000e+00, %tmp568
1278 %tmp573 = fdiv float 1.000000e+00, %tmp570
1279 %tmp574 = fmul float %tmp560, %tmp571
1280 %tmp575 = fmul float %tmp562, %tmp572
1281 %tmp576 = fmul float %tmp564, %tmp573
1282 %tmp577 = fcmp olt float %tmp558, %tmp82
1283 %tmp578 = sext i1 %tmp577 to i32
1284 %tmp579 = bitcast i32 %tmp578 to float
1285 %tmp580 = bitcast float %tmp579 to i32
1286 %tmp581 = icmp ne i32 %tmp580, 0
1287 br i1 %tmp581, label %ENDIF200, label %ELSE202
Tom Stellardc149dc02013-11-27 21:23:35 +00001288
1289ELSE202: ; preds = %ENDIF197
Matt Arsenault325cca32016-01-23 05:42:43 +00001290 %tmp582 = fcmp olt float %tmp558, %tmp81
1291 %tmp583 = sext i1 %tmp582 to i32
1292 %tmp584 = bitcast i32 %tmp583 to float
1293 %tmp585 = bitcast float %tmp584 to i32
1294 %tmp586 = icmp ne i32 %tmp585, 0
1295 br i1 %tmp586, label %ENDIF200, label %ELSE205
Tom Stellardc149dc02013-11-27 21:23:35 +00001296
1297ENDIF200: ; preds = %ELSE205, %ELSE202, %ENDIF197
Matt Arsenault325cca32016-01-23 05:42:43 +00001298 %temp80.0 = phi float [ %tmp574, %ENDIF197 ], [ %.226, %ELSE205 ], [ %tmp575, %ELSE202 ]
1299 %temp88.0 = phi float [ %tmp121, %ENDIF197 ], [ %.227, %ELSE205 ], [ %tmp119, %ELSE202 ]
1300 %temp89.0 = phi float [ %tmp122, %ENDIF197 ], [ %.228, %ELSE205 ], [ %tmp120, %ELSE202 ]
1301 %temp90.0 = phi float [ %tmp119, %ENDIF197 ], [ %tmp115, %ELSE205 ], [ %tmp117, %ELSE202 ]
1302 %temp91.0 = phi float [ %tmp120, %ENDIF197 ], [ %tmp116, %ELSE205 ], [ %tmp118, %ELSE202 ]
1303 %tmp587 = fcmp olt float %tmp558, %tmp82
1304 %tmp588 = sext i1 %tmp587 to i32
1305 %tmp589 = bitcast i32 %tmp588 to float
1306 %tmp590 = bitcast float %tmp589 to i32
1307 %tmp591 = icmp ne i32 %tmp590, 0
1308 br i1 %tmp591, label %ENDIF209, label %ELSE211
Tom Stellardc149dc02013-11-27 21:23:35 +00001309
1310ELSE205: ; preds = %ELSE202
Matt Arsenault325cca32016-01-23 05:42:43 +00001311 %tmp592 = fcmp olt float %tmp558, %tmp80
1312 %tmp593 = sext i1 %tmp592 to i32
1313 %tmp594 = bitcast i32 %tmp593 to float
1314 %tmp595 = bitcast float %tmp594 to i32
1315 %tmp596 = icmp ne i32 %tmp595, 0
1316 %.226 = select i1 %tmp596, float %tmp576, float 1.000000e+00
1317 %.227 = select i1 %tmp596, float %tmp117, float %tmp115
1318 %.228 = select i1 %tmp596, float %tmp118, float %tmp116
Tom Stellardc149dc02013-11-27 21:23:35 +00001319 br label %ENDIF200
1320
1321ELSE211: ; preds = %ENDIF200
Matt Arsenault325cca32016-01-23 05:42:43 +00001322 %tmp597 = fcmp olt float %tmp558, %tmp81
1323 %tmp598 = sext i1 %tmp597 to i32
1324 %tmp599 = bitcast i32 %tmp598 to float
1325 %tmp600 = bitcast float %tmp599 to i32
1326 %tmp601 = icmp ne i32 %tmp600, 0
1327 br i1 %tmp601, label %ENDIF209, label %ELSE214
Tom Stellardc149dc02013-11-27 21:23:35 +00001328
1329ENDIF209: ; preds = %ELSE214, %ELSE211, %ENDIF200
Matt Arsenault325cca32016-01-23 05:42:43 +00001330 %temp52.0 = phi float [ %tmp107, %ENDIF200 ], [ %tmp99, %ELSE214 ], [ %tmp103, %ELSE211 ]
1331 %temp53.0 = phi float [ %tmp108, %ENDIF200 ], [ %tmp100, %ELSE214 ], [ %tmp104, %ELSE211 ]
1332 %temp54.0 = phi float [ %tmp109, %ENDIF200 ], [ %tmp101, %ELSE214 ], [ %tmp105, %ELSE211 ]
1333 %temp55.0 = phi float [ %tmp110, %ENDIF200 ], [ %tmp102, %ELSE214 ], [ %tmp106, %ELSE211 ]
1334 %temp68.0 = phi float [ %tmp111, %ENDIF200 ], [ %.230, %ELSE214 ], [ %tmp107, %ELSE211 ]
1335 %temp69.0 = phi float [ %tmp112, %ENDIF200 ], [ %.231, %ELSE214 ], [ %tmp108, %ELSE211 ]
1336 %temp70.0 = phi float [ %tmp113, %ENDIF200 ], [ %.232, %ELSE214 ], [ %tmp109, %ELSE211 ]
1337 %temp71.0 = phi float [ %tmp114, %ENDIF200 ], [ %.233, %ELSE214 ], [ %tmp110, %ELSE211 ]
1338 %tmp602 = fmul float %tmp163, %tmp84
1339 %tmp603 = fmul float %tmp164, %tmp85
1340 %tmp604 = fadd float %tmp602, %tmp603
1341 %tmp605 = fmul float %tmp165, %tmp86
1342 %tmp606 = fadd float %tmp604, %tmp605
1343 %tmp607 = fmul float %tmp166, %tmp87
1344 %tmp608 = fadd float %tmp606, %tmp607
1345 %tmp609 = fmul float %tmp163, %tmp88
1346 %tmp610 = fmul float %tmp164, %tmp89
1347 %tmp611 = fadd float %tmp609, %tmp610
1348 %tmp612 = fmul float %tmp165, %tmp90
1349 %tmp613 = fadd float %tmp611, %tmp612
1350 %tmp614 = fmul float %tmp166, %tmp91
1351 %tmp615 = fadd float %tmp613, %tmp614
1352 %tmp616 = fmul float %tmp163, %tmp92
1353 %tmp617 = fmul float %tmp164, %tmp93
1354 %tmp618 = fadd float %tmp616, %tmp617
1355 %tmp619 = fmul float %tmp165, %tmp94
1356 %tmp620 = fadd float %tmp618, %tmp619
1357 %tmp621 = fmul float %tmp166, %tmp95
1358 %tmp622 = fadd float %tmp620, %tmp621
1359 %tmp623 = fsub float -0.000000e+00, %tmp77
1360 %tmp624 = fadd float 1.000000e+00, %tmp623
1361 %tmp625 = call float @fabs(float %tmp608)
1362 %tmp626 = call float @fabs(float %tmp615)
1363 %tmp627 = fcmp oge float %tmp624, %tmp625
1364 %tmp628 = sext i1 %tmp627 to i32
1365 %tmp629 = bitcast i32 %tmp628 to float
1366 %tmp630 = bitcast float %tmp629 to i32
1367 %tmp631 = and i32 %tmp630, 1065353216
1368 %tmp632 = bitcast i32 %tmp631 to float
1369 %tmp633 = fcmp oge float %tmp624, %tmp626
1370 %tmp634 = sext i1 %tmp633 to i32
1371 %tmp635 = bitcast i32 %tmp634 to float
1372 %tmp636 = bitcast float %tmp635 to i32
1373 %tmp637 = and i32 %tmp636, 1065353216
1374 %tmp638 = bitcast i32 %tmp637 to float
1375 %tmp639 = fmul float %tmp632, %tmp638
1376 %tmp640 = fmul float %tmp622, %tmp639
1377 %tmp641 = fmul float %tmp608, %temp68.0
1378 %tmp642 = fadd float %tmp641, %temp70.0
1379 %tmp643 = fmul float %tmp615, %temp69.0
1380 %tmp644 = fadd float %tmp643, %temp71.0
1381 %tmp645 = fmul float %tmp608, %temp52.0
1382 %tmp646 = fadd float %tmp645, %temp54.0
1383 %tmp647 = fmul float %tmp615, %temp53.0
1384 %tmp648 = fadd float %tmp647, %temp55.0
1385 %tmp649 = fadd float %temp80.0, -1.000000e+00
1386 %tmp650 = fmul float %tmp649, %tmp76
1387 %tmp651 = fadd float %tmp650, 1.000000e+00
Matt Arsenault8aa56782016-01-23 05:42:49 +00001388 %tmp652 = call float @llvm.AMDGPU.clamp.f32(float %tmp651, float 0.000000e+00, float 1.000000e+00)
Matt Arsenault325cca32016-01-23 05:42:43 +00001389 %tmp653 = bitcast float %tmp642 to i32
1390 %tmp654 = bitcast float %tmp644 to i32
1391 %tmp655 = bitcast float 0.000000e+00 to i32
1392 %tmp656 = insertelement <4 x i32> undef, i32 %tmp653, i32 0
1393 %tmp657 = insertelement <4 x i32> %tmp656, i32 %tmp654, i32 1
1394 %tmp658 = insertelement <4 x i32> %tmp657, i32 %tmp655, i32 2
1395 %tmp659 = insertelement <4 x i32> %tmp658, i32 undef, i32 3
Matt Arsenault018179f2016-01-26 04:38:08 +00001396 %tmp128.bc = bitcast <16 x i8> %tmp128 to <4 x i32>
1397 %tmp660 = call <4 x float> @llvm.SI.image.sample.l.v4i32(<4 x i32> %tmp659, <8 x i32> %tmp126, <4 x i32> %tmp128.bc, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
Matt Arsenault325cca32016-01-23 05:42:43 +00001398 %tmp661 = extractelement <4 x float> %tmp660, i32 0
1399 %tmp662 = extractelement <4 x float> %tmp660, i32 1
1400 %tmp663 = bitcast float %tmp646 to i32
1401 %tmp664 = bitcast float %tmp648 to i32
1402 %tmp665 = bitcast float 0.000000e+00 to i32
1403 %tmp666 = insertelement <4 x i32> undef, i32 %tmp663, i32 0
1404 %tmp667 = insertelement <4 x i32> %tmp666, i32 %tmp664, i32 1
1405 %tmp668 = insertelement <4 x i32> %tmp667, i32 %tmp665, i32 2
1406 %tmp669 = insertelement <4 x i32> %tmp668, i32 undef, i32 3
Matt Arsenault018179f2016-01-26 04:38:08 +00001407 %tmp670 = call <4 x float> @llvm.SI.image.sample.l.v4i32(<4 x i32> %tmp669, <8 x i32> %tmp126, <4 x i32> %tmp128.bc, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
Matt Arsenault325cca32016-01-23 05:42:43 +00001408 %tmp671 = extractelement <4 x float> %tmp670, i32 0
1409 %tmp672 = extractelement <4 x float> %tmp670, i32 1
1410 %tmp673 = fsub float -0.000000e+00, %tmp662
1411 %tmp674 = fadd float 1.000000e+00, %tmp673
1412 %tmp675 = fsub float -0.000000e+00, %tmp672
1413 %tmp676 = fadd float 1.000000e+00, %tmp675
1414 %tmp677 = fmul float %tmp674, 2.500000e-01
1415 %tmp678 = fmul float %tmp676, 2.500000e-01
1416 %tmp679 = fsub float -0.000000e+00, %tmp677
1417 %tmp680 = fadd float %tmp661, %tmp679
1418 %tmp681 = fsub float -0.000000e+00, %tmp678
1419 %tmp682 = fadd float %tmp671, %tmp681
1420 %tmp683 = fmul float %tmp640, %temp88.0
1421 %tmp684 = fadd float %tmp683, %temp89.0
1422 %tmp685 = fmul float %tmp640, %temp90.0
1423 %tmp686 = fadd float %tmp685, %temp91.0
Matt Arsenault8aa56782016-01-23 05:42:49 +00001424 %tmp687 = call float @llvm.AMDGPU.clamp.f32(float %tmp684, float 0.000000e+00, float 1.000000e+00)
1425 %tmp688 = call float @llvm.AMDGPU.clamp.f32(float %tmp686, float 0.000000e+00, float 1.000000e+00)
Matt Arsenault325cca32016-01-23 05:42:43 +00001426 %tmp689 = fsub float -0.000000e+00, %tmp687
1427 %tmp690 = fadd float %tmp661, %tmp689
1428 %tmp691 = fsub float -0.000000e+00, %tmp688
1429 %tmp692 = fadd float %tmp671, %tmp691
1430 %tmp693 = fmul float %tmp661, %tmp661
1431 %tmp694 = fmul float %tmp671, %tmp671
1432 %tmp695 = fsub float -0.000000e+00, %tmp693
1433 %tmp696 = fadd float %tmp680, %tmp695
1434 %tmp697 = fsub float -0.000000e+00, %tmp694
1435 %tmp698 = fadd float %tmp682, %tmp697
1436 %tmp699 = fcmp uge float %tmp696, %tmp74
1437 %tmp700 = select i1 %tmp699, float %tmp696, float %tmp74
1438 %tmp701 = fcmp uge float %tmp698, %tmp74
1439 %tmp702 = select i1 %tmp701, float %tmp698, float %tmp74
1440 %tmp703 = fmul float %tmp690, %tmp690
1441 %tmp704 = fadd float %tmp703, %tmp700
1442 %tmp705 = fmul float %tmp692, %tmp692
1443 %tmp706 = fadd float %tmp705, %tmp702
1444 %tmp707 = fdiv float 1.000000e+00, %tmp704
1445 %tmp708 = fdiv float 1.000000e+00, %tmp706
1446 %tmp709 = fmul float %tmp700, %tmp707
1447 %tmp710 = fmul float %tmp702, %tmp708
1448 %tmp711 = fcmp oge float %tmp690, 0.000000e+00
1449 %tmp712 = sext i1 %tmp711 to i32
1450 %tmp713 = bitcast i32 %tmp712 to float
1451 %tmp714 = bitcast float %tmp713 to i32
1452 %tmp715 = icmp ne i32 %tmp714, 0
1453 %.229 = select i1 %tmp715, float 1.000000e+00, float %tmp709
1454 %tmp716 = fcmp oge float %tmp692, 0.000000e+00
1455 %tmp717 = sext i1 %tmp716 to i32
1456 %tmp718 = bitcast i32 %tmp717 to float
1457 %tmp719 = bitcast float %tmp718 to i32
1458 %tmp720 = icmp ne i32 %tmp719, 0
1459 %temp28.0 = select i1 %tmp720, float 1.000000e+00, float %tmp710
1460 %one.sub.a.i25 = fsub float 1.000000e+00, %tmp652
Matt Arsenault77131622016-01-23 05:42:38 +00001461 %one.sub.ac.i26 = fmul float %one.sub.a.i25, %.229
1462 %mul.i27 = fmul float %temp28.0, %.229
1463 %result.i28 = fadd float %mul.i27, %one.sub.ac.i26
Matt Arsenault325cca32016-01-23 05:42:43 +00001464 %tmp721 = call float @llvm.pow.f32(float %result.i28, float %tmp75)
1465 %tmp722 = fmul float %tmp721, %tmp78
1466 %tmp723 = fadd float %tmp722, %tmp79
Matt Arsenault8aa56782016-01-23 05:42:49 +00001467 %tmp724 = call float @llvm.AMDGPU.clamp.f32(float %tmp723, float 0.000000e+00, float 1.000000e+00)
Matt Arsenault325cca32016-01-23 05:42:43 +00001468 %tmp725 = fmul float %tmp724, %tmp724
1469 %tmp726 = fmul float 2.000000e+00, %tmp724
1470 %tmp727 = fsub float -0.000000e+00, %tmp726
1471 %tmp728 = fadd float 3.000000e+00, %tmp727
1472 %tmp729 = fmul float %tmp725, %tmp728
1473 %tmp730 = fmul float %tmp541, %tmp729
1474 %tmp731 = fmul float %tmp542, %tmp729
1475 %tmp732 = fmul float %tmp543, %tmp729
1476 %tmp733 = fmul float %tmp730, %tmp508
1477 %tmp734 = fadd float %tmp733, %tmp526
1478 %tmp735 = fmul float %tmp731, %tmp508
1479 %tmp736 = fadd float %tmp735, %tmp527
1480 %tmp737 = fmul float %tmp732, %tmp508
1481 %tmp738 = fadd float %tmp737, %tmp528
1482 %one.sub.a.i23 = fsub float 1.000000e+00, %tmp229
1483 %result.i24 = fadd float %tmp283, %one.sub.a.i23
1484 %one.sub.a.i21 = fsub float 1.000000e+00, %tmp36
1485 %result.i22 = fadd float %tmp294, %one.sub.a.i21
1486 %one.sub.a.i19 = fsub float 1.000000e+00, %tmp36
1487 %result.i20 = fadd float %tmp295, %one.sub.a.i19
1488 %one.sub.a.i17 = fsub float 1.000000e+00, %tmp36
1489 %result.i18 = fadd float %tmp296, %one.sub.a.i17
1490 %one.sub.a.i15 = fsub float 1.000000e+00, %tmp37
Matt Arsenault77131622016-01-23 05:42:38 +00001491 %result.i16 = fadd float %result.i24, %one.sub.a.i15
Matt Arsenault325cca32016-01-23 05:42:43 +00001492 %tmp739 = fmul float %result.i22, %result.i16
1493 %tmp740 = fmul float %result.i20, %result.i16
1494 %tmp741 = fmul float %result.i18, %result.i16
1495 %tmp742 = fmul float %tmp734, %tmp739
1496 %tmp743 = fmul float %tmp736, %tmp740
1497 %tmp744 = fmul float %tmp738, %tmp741
1498 %tmp745 = fmul float %temp12.0, %tmp215
1499 %tmp746 = fmul float %temp13.0, %tmp216
1500 %tmp747 = fadd float %tmp746, %tmp745
1501 %tmp748 = fmul float %temp14.0, %tmp217
1502 %tmp749 = fadd float %tmp747, %tmp748
1503 %tmp750 = call float @fabs(float %tmp749)
1504 %tmp751 = fmul float %tmp750, %tmp750
1505 %tmp752 = fmul float %tmp751, %tmp49
1506 %tmp753 = fadd float %tmp752, %tmp50
Matt Arsenault8aa56782016-01-23 05:42:49 +00001507 %tmp754 = call float @llvm.AMDGPU.clamp.f32(float %tmp753, float 0.000000e+00, float 1.000000e+00)
Matt Arsenault325cca32016-01-23 05:42:43 +00001508 %tmp755 = fsub float -0.000000e+00, %tmp754
1509 %tmp756 = fadd float 1.000000e+00, %tmp755
1510 %tmp757 = fmul float %tmp32, %tmp756
1511 %tmp758 = fmul float %tmp32, %tmp756
1512 %tmp759 = fmul float %tmp32, %tmp756
1513 %tmp760 = fmul float %tmp33, %tmp756
1514 %one.sub.a.i11 = fsub float 1.000000e+00, %tmp757
1515 %one.sub.ac.i12 = fmul float %one.sub.a.i11, %tmp742
1516 %mul.i13 = fmul float %tmp30, %tmp742
Matt Arsenault77131622016-01-23 05:42:38 +00001517 %result.i14 = fadd float %mul.i13, %one.sub.ac.i12
Matt Arsenault325cca32016-01-23 05:42:43 +00001518 %one.sub.a.i7 = fsub float 1.000000e+00, %tmp758
1519 %one.sub.ac.i8 = fmul float %one.sub.a.i7, %tmp743
1520 %mul.i9 = fmul float %tmp30, %tmp743
Matt Arsenault77131622016-01-23 05:42:38 +00001521 %result.i10 = fadd float %mul.i9, %one.sub.ac.i8
Matt Arsenault325cca32016-01-23 05:42:43 +00001522 %one.sub.a.i3 = fsub float 1.000000e+00, %tmp759
1523 %one.sub.ac.i4 = fmul float %one.sub.a.i3, %tmp744
1524 %mul.i5 = fmul float %tmp30, %tmp744
Matt Arsenault77131622016-01-23 05:42:38 +00001525 %result.i6 = fadd float %mul.i5, %one.sub.ac.i4
Matt Arsenault325cca32016-01-23 05:42:43 +00001526 %one.sub.a.i1 = fsub float 1.000000e+00, %tmp760
1527 %one.sub.ac.i = fmul float %one.sub.a.i1, %tmp367
1528 %mul.i = fmul float %tmp31, %tmp367
Matt Arsenault77131622016-01-23 05:42:38 +00001529 %result.i2 = fadd float %mul.i, %one.sub.ac.i
Matt Arsenault325cca32016-01-23 05:42:43 +00001530 %tmp761 = fcmp uge float %result.i14, 0x3E6FFFFE60000000
1531 %tmp762 = select i1 %tmp761, float %result.i14, float 0x3E6FFFFE60000000
1532 %tmp763 = fcmp uge float %result.i10, 0x3E6FFFFE60000000
1533 %tmp764 = select i1 %tmp763, float %result.i10, float 0x3E6FFFFE60000000
1534 %tmp765 = fcmp uge float %result.i6, 0x3E6FFFFE60000000
1535 %tmp766 = select i1 %tmp765, float %result.i6, float 0x3E6FFFFE60000000
1536 %tmp767 = fcmp uge float %tmp762, 6.550400e+04
1537 %tmp768 = select i1 %tmp767, float 6.550400e+04, float %tmp762
1538 %tmp769 = fcmp uge float %tmp764, 6.550400e+04
1539 %tmp770 = select i1 %tmp769, float 6.550400e+04, float %tmp764
1540 %tmp771 = fcmp uge float %tmp766, 6.550400e+04
1541 %tmp772 = select i1 %tmp771, float 6.550400e+04, float %tmp766
1542 %tmp773 = fmul float %result.i2, %tmp51
1543 %tmp774 = fadd float %tmp773, %tmp52
Matt Arsenault8aa56782016-01-23 05:42:49 +00001544 %tmp775 = call float @llvm.AMDGPU.clamp.f32(float %tmp774, float 0.000000e+00, float 1.000000e+00)
Matt Arsenault325cca32016-01-23 05:42:43 +00001545 %tmp776 = call i32 @llvm.SI.packf16(float %tmp768, float %tmp770)
1546 %tmp777 = bitcast i32 %tmp776 to float
1547 %tmp778 = call i32 @llvm.SI.packf16(float %tmp772, float %tmp775)
1548 %tmp779 = bitcast i32 %tmp778 to float
1549 call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %tmp777, float %tmp779, float %tmp777, float %tmp779)
Tom Stellardc149dc02013-11-27 21:23:35 +00001550 ret void
1551
1552ELSE214: ; preds = %ELSE211
Matt Arsenault325cca32016-01-23 05:42:43 +00001553 %tmp780 = fcmp olt float %tmp558, %tmp80
1554 %tmp781 = sext i1 %tmp780 to i32
1555 %tmp782 = bitcast i32 %tmp781 to float
1556 %tmp783 = bitcast float %tmp782 to i32
1557 %tmp784 = icmp ne i32 %tmp783, 0
1558 %.230 = select i1 %tmp784, float %tmp103, float %tmp99
1559 %.231 = select i1 %tmp784, float %tmp104, float %tmp100
1560 %.232 = select i1 %tmp784, float %tmp105, float %tmp101
1561 %.233 = select i1 %tmp784, float %tmp106, float %tmp102
Tom Stellardc149dc02013-11-27 21:23:35 +00001562 br label %ENDIF209
1563}
1564
1565; Function Attrs: readnone
Matt Arsenault8aa56782016-01-23 05:42:49 +00001566declare float @llvm.AMDGPU.clamp.f32(float, float, float) #1
Tom Stellardc149dc02013-11-27 21:23:35 +00001567
1568; Function Attrs: nounwind readnone
Matt Arsenault018179f2016-01-26 04:38:08 +00001569declare <4 x float> @llvm.SI.image.sample.v2i32(<2 x i32>, <8 x i32>, <4 x i32>, i32, i32, i32, i32, i32, i32, i32, i32) #2
Tom Stellardc149dc02013-11-27 21:23:35 +00001570
1571; Function Attrs: nounwind readnone
Matt Arsenault018179f2016-01-26 04:38:08 +00001572declare <4 x float> @llvm.SI.image.sample.l.v4i32(<4 x i32>, <8 x i32>, <4 x i32>, i32, i32, i32, i32, i32, i32, i32, i32) #2
1573
Tom Stellardc149dc02013-11-27 21:23:35 +00001574
Matt Arsenault8aa56782016-01-23 05:42:49 +00001575declare float @llvm.exp2.f32(float) #2
Matt Arsenault77131622016-01-23 05:42:38 +00001576
1577; Function Attrs: nounwind readnone
1578declare float @llvm.SI.load.const(<16 x i8>, i32) #2
1579
1580; Function Attrs: nounwind readnone
1581declare float @llvm.SI.fs.interp(i32, i32, i32, <2 x i32>) #2
Tom Stellardc149dc02013-11-27 21:23:35 +00001582
1583; Function Attrs: readnone
Matt Arsenault325cca32016-01-23 05:42:43 +00001584declare i32 @llvm.SI.tid() #1
Tom Stellardc149dc02013-11-27 21:23:35 +00001585
Matt Arsenault77131622016-01-23 05:42:38 +00001586; Function Attrs: nounwind readonly
Matt Arsenault325cca32016-01-23 05:42:43 +00001587declare float @ceil(float) #3
Matt Arsenault77131622016-01-23 05:42:38 +00001588
1589; Function Attrs: nounwind readnone
1590declare float @llvm.amdgcn.rsq.f32(float) #2
1591
1592; Function Attrs: nounwind readnone
Matt Arsenault018179f2016-01-26 04:38:08 +00001593declare <4 x float> @llvm.SI.image.sample.d.v8i32(<8 x i32>, <8 x i32>, <4 x i32>, i32, i32, i32, i32, i32, i32, i32, i32) #2
Matt Arsenault77131622016-01-23 05:42:38 +00001594
1595; Function Attrs: readnone
Matt Arsenault325cca32016-01-23 05:42:43 +00001596declare <4 x float> @llvm.AMDGPU.cube(<4 x float>) #1
Matt Arsenault77131622016-01-23 05:42:38 +00001597
1598; Function Attrs: readnone
Matt Arsenault325cca32016-01-23 05:42:43 +00001599declare float @fabs(float) #1
Matt Arsenault77131622016-01-23 05:42:38 +00001600
1601; Function Attrs: nounwind readnone
Matt Arsenault018179f2016-01-26 04:38:08 +00001602declare <4 x float> @llvm.SI.image.sample.v4i32(<4 x i32>, <8 x i32>, <4 x i32>, i32, i32, i32, i32, i32, i32, i32, i32) #2
1603
Matt Arsenault77131622016-01-23 05:42:38 +00001604
1605; Function Attrs: nounwind readnone
1606declare float @llvm.pow.f32(float, float) #2
1607
1608; Function Attrs: nounwind readnone
1609declare i32 @llvm.SI.packf16(float, float) #2
1610
1611declare void @llvm.SI.export(i32, i32, i32, i32, i32, float, float, float, float)
1612
Matt Arsenault325cca32016-01-23 05:42:43 +00001613attributes #1 = { readnone }
Matt Arsenault77131622016-01-23 05:42:38 +00001614attributes #2 = { nounwind readnone }
Matt Arsenault325cca32016-01-23 05:42:43 +00001615attributes #3 = { nounwind readonly }
Matt Arsenault77131622016-01-23 05:42:38 +00001616
1617!0 = !{!1, !1, i64 0, i32 1}
1618!1 = !{!"const", null}