1 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -verify-machineinstrs < %s | FileCheck %s
3 %struct.ShapeData = type { <4 x float>, <4 x float>, <4 x float>, <4 x float>, <4 x float>, i32, i32, i64, <4 x float>, i32, i8, i8, i16, i32, i32 }
5 declare float @llvm.fmuladd.f32(float, float, float)
7 declare <4 x float> @llvm.fmuladd.v4f32(<4 x float>, <4 x float>, <4 x float>)
9 declare ptr addrspace(1) @Scene_getSubShapeData(i32, ptr addrspace(1), ptr addrspace(1)) local_unnamed_addr
11 define <4 x float> @Scene_transformT(i32 %subshapeIdx, <4 x float> %v, float %time, ptr addrspace(1) %gScene, ptr addrspace(1) %gSceneOffsets) local_unnamed_addr !dbg !110 {
13 ; CHECK: v_mov_b32_e32 v[[COPIED_ARG_PIECE:[0-9]+]], v9
15 ; CHECK: ;DEBUG_VALUE: Scene_transformT:gScene <- [DW_OP_constu 1, DW_OP_swap, DW_OP_xderef, DW_OP_LLVM_fragment 0 32] $vgpr6
16 ; CHECK: ;DEBUG_VALUE: Scene_transformT:gScene <- [DW_OP_constu 1, DW_OP_swap, DW_OP_xderef, DW_OP_LLVM_fragment 32 32] $vgpr7
17 call void @llvm.dbg.value(metadata ptr addrspace(1) %gScene, metadata !120, metadata !DIExpression(DW_OP_constu, 1, DW_OP_swap, DW_OP_xderef)), !dbg !154
18 ; CHECK: ;DEBUG_VALUE: Scene_transformT:gSceneOffsets <- [DW_OP_constu 1, DW_OP_swap, DW_OP_xderef, DW_OP_LLVM_fragment 0 32] $vgpr8
19 ; CHECK: ;DEBUG_VALUE: Scene_transformT:gSceneOffsets <- [DW_OP_constu 1, DW_OP_swap, DW_OP_xderef, DW_OP_LLVM_fragment 32 32] $vgpr[[COPIED_ARG_PIECE]]
20 call void @llvm.dbg.value(metadata ptr addrspace(1) %gSceneOffsets, metadata !121, metadata !DIExpression(DW_OP_constu, 1, DW_OP_swap, DW_OP_xderef)), !dbg !155
21 %call = tail call ptr addrspace(1) @Scene_getSubShapeData(i32 %subshapeIdx, ptr addrspace(1) %gScene, ptr addrspace(1) %gSceneOffsets)
22 %m_linearMotion = getelementptr inbounds %struct.ShapeData, ptr addrspace(1) %call, i64 0, i32 2
23 %tmp = load <4 x float>, ptr addrspace(1) %m_linearMotion, align 16
24 %m_angularMotion = getelementptr inbounds %struct.ShapeData, ptr addrspace(1) %call, i64 0, i32 3
25 %tmp1 = load <4 x float>, ptr addrspace(1) %m_angularMotion, align 16
26 %m_scaleMotion = getelementptr inbounds %struct.ShapeData, ptr addrspace(1) %call, i64 0, i32 4
27 %tmp2 = load <4 x float>, ptr addrspace(1) %m_scaleMotion, align 16
28 %splat.splatinsert = insertelement <4 x float> undef, float %time, i32 0
29 %splat.splat = shufflevector <4 x float> %splat.splatinsert, <4 x float> undef, <4 x i32> zeroinitializer
30 %tmp3 = tail call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %tmp2, <4 x float> %splat.splat, <4 x float> <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>)
31 %tmp4 = load <4 x float>, ptr addrspace(1) %call, align 16
32 %m_quaternion = getelementptr inbounds %struct.ShapeData, ptr addrspace(1) %call, i64 0, i32 1
33 %tmp5 = load <4 x float>, ptr addrspace(1) %m_quaternion, align 16
34 %m_scale = getelementptr inbounds %struct.ShapeData, ptr addrspace(1) %call, i64 0, i32 8
35 %tmp6 = load <4 x float>, ptr addrspace(1) %m_scale, align 16
36 %mul = fmul <4 x float> %tmp6, %v
37 %tmp7 = extractelement <4 x float> %tmp5, i64 0
38 %sub.i.i = fsub float -0.000000e+00, %tmp7
39 %vecinit.i.i = insertelement <4 x float> undef, float %sub.i.i, i32 0
40 %tmp8 = extractelement <4 x float> %tmp5, i64 1
41 %sub1.i.i = fsub float -0.000000e+00, %tmp8
42 %vecinit2.i.i = insertelement <4 x float> %vecinit.i.i, float %sub1.i.i, i32 1
43 %tmp9 = extractelement <4 x float> %tmp5, i64 2
44 %sub3.i.i = fsub float -0.000000e+00, %tmp9
45 %vecinit4.i.i = insertelement <4 x float> %vecinit2.i.i, float %sub3.i.i, i32 2
46 %vecinit5.i.i = shufflevector <4 x float> %vecinit4.i.i, <4 x float> %tmp5, <4 x i32> <i32 0, i32 1, i32 2, i32 7>
47 %tmp10 = insertelement <4 x float> %mul, float 0.000000e+00, i64 3
48 %tmp11 = extractelement <4 x float> %mul, i64 2
49 %tmp12 = extractelement <4 x float> %mul, i64 1
50 %tmp13 = fmul float %tmp9, %tmp12
51 %tmp14 = fsub float -0.000000e+00, %tmp13
52 %tmp15 = tail call float @llvm.fmuladd.f32(float %tmp8, float %tmp11, float %tmp14)
53 %tmp16 = extractelement <4 x float> %mul, i64 0
54 %tmp17 = fmul float %tmp7, %tmp11
55 %tmp18 = fsub float -0.000000e+00, %tmp17
56 %tmp19 = tail call float @llvm.fmuladd.f32(float %tmp9, float %tmp16, float %tmp18)
57 %tmp20 = fmul float %tmp8, %tmp16
58 %tmp21 = fsub float -0.000000e+00, %tmp20
59 %tmp22 = tail call float @llvm.fmuladd.f32(float %tmp7, float %tmp12, float %tmp21)
60 %tmp23 = insertelement <4 x float> <float undef, float undef, float undef, float 0.000000e+00>, float %tmp15, i32 0
61 %tmp24 = insertelement <4 x float> %tmp23, float %tmp19, i32 1
62 %tmp25 = insertelement <4 x float> %tmp24, float %tmp22, i32 2
63 %tmp26 = extractelement <4 x float> %tmp5, i64 3
64 %splat.splat.i8.i = shufflevector <4 x float> %tmp5, <4 x float> undef, <4 x i32> <i32 3, i32 3, i32 3, i32 3>
65 %splat.splat2.i9.i = shufflevector <4 x float> %tmp10, <4 x float> undef, <4 x i32> <i32 3, i32 3, i32 3, i32 3>
66 %mul3.i10.i = fmul <4 x float> %tmp5, %splat.splat2.i9.i
67 %tmp27 = tail call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %splat.splat.i8.i, <4 x float> %tmp10, <4 x float> %mul3.i10.i)
68 %add.i11.i = fadd <4 x float> %tmp27, %tmp25
69 %tmp28 = extractelement <4 x float> %tmp5, i32 2
70 %tmp29 = extractelement <4 x float> %mul, i32 2
71 %tmp30 = extractelement <4 x float> %tmp5, i32 1
72 %tmp31 = extractelement <4 x float> %mul, i32 1
73 %tmp32 = extractelement <4 x float> %tmp5, i32 0
74 %tmp33 = extractelement <4 x float> %mul, i32 0
75 %tmp34 = fmul float %tmp32, %tmp33
76 %tmp35 = tail call float @llvm.fmuladd.f32(float %tmp30, float %tmp31, float %tmp34)
77 %tmp36 = tail call float @llvm.fmuladd.f32(float %tmp28, float %tmp29, float %tmp35)
78 %tmp37 = tail call float @llvm.fmuladd.f32(float 0.000000e+00, float 0.000000e+00, float %tmp36)
79 %neg.i12.i = fsub float -0.000000e+00, %tmp37
80 %tmp38 = tail call float @llvm.fmuladd.f32(float %tmp26, float 0.000000e+00, float %neg.i12.i)
81 %tmp39 = insertelement <4 x float> %add.i11.i, float %tmp38, i64 3
82 %tmp40 = extractelement <4 x float> %add.i11.i, i64 1
83 %tmp41 = extractelement <4 x float> %add.i11.i, i64 2
84 %tmp42 = fmul float %tmp41, %sub1.i.i
85 %tmp43 = fsub float -0.000000e+00, %tmp42
86 %tmp44 = tail call float @llvm.fmuladd.f32(float %tmp40, float %sub3.i.i, float %tmp43)
87 %tmp45 = extractelement <4 x float> %add.i11.i, i64 0
88 %tmp46 = fmul float %tmp45, %sub3.i.i
89 %tmp47 = fsub float -0.000000e+00, %tmp46
90 %tmp48 = tail call float @llvm.fmuladd.f32(float %tmp41, float %sub.i.i, float %tmp47)
91 %tmp49 = fmul float %tmp40, %sub.i.i
92 %tmp50 = fsub float -0.000000e+00, %tmp49
93 %tmp51 = tail call float @llvm.fmuladd.f32(float %tmp45, float %sub1.i.i, float %tmp50)
94 %tmp52 = insertelement <4 x float> <float undef, float undef, float undef, float 0.000000e+00>, float %tmp44, i32 0
95 %tmp53 = insertelement <4 x float> %tmp52, float %tmp48, i32 1
96 %tmp54 = insertelement <4 x float> %tmp53, float %tmp51, i32 2
97 %splat.splat.i.i = shufflevector <4 x float> %tmp39, <4 x float> undef, <4 x i32> <i32 3, i32 3, i32 3, i32 3>
98 %tmp55 = extractelement <4 x float> %tmp5, i32 3
99 %mul3.i.i = fmul <4 x float> %splat.splat.i8.i, %tmp39
100 %tmp56 = tail call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %splat.splat.i.i, <4 x float> %vecinit5.i.i, <4 x float> %mul3.i.i)
101 %add.i.i = fadd <4 x float> %tmp56, %tmp54
102 %tmp57 = extractelement <4 x float> %add.i11.i, i32 2
103 %tmp58 = extractelement <4 x float> %add.i11.i, i32 1
104 %tmp59 = extractelement <4 x float> %add.i11.i, i32 0
105 %tmp60 = fmul float %tmp59, %sub.i.i
106 %tmp61 = tail call float @llvm.fmuladd.f32(float %tmp58, float %sub1.i.i, float %tmp60)
107 %tmp62 = tail call float @llvm.fmuladd.f32(float %tmp57, float %sub3.i.i, float %tmp61)
108 %tmp63 = tail call float @llvm.fmuladd.f32(float 0.000000e+00, float 0.000000e+00, float %tmp62)
109 %neg.i.i = fsub float -0.000000e+00, %tmp63
110 %tmp64 = tail call float @llvm.fmuladd.f32(float %tmp38, float %tmp55, float %neg.i.i)
111 %tmp65 = insertelement <4 x float> %add.i.i, float %tmp64, i64 3
112 %mul2 = fmul <4 x float> %tmp3, %tmp65
113 %tmp66 = extractelement <4 x float> %tmp1, i64 3
114 %mul3 = fmul float %tmp66, %time
115 %tmp67 = insertelement <4 x float> %tmp1, float 0.000000e+00, i32 3
116 %tmp68 = shufflevector <4 x float> %tmp67, <4 x float> %tmp1, <4 x i32> <i32 0, i32 5, i32 undef, i32 3>
117 %vecinit3.i.i = shufflevector <4 x float> %tmp68, <4 x float> %tmp1, <4 x i32> <i32 0, i32 1, i32 6, i32 3>
118 %tmp69 = fcmp oeq <4 x float> %vecinit3.i.i, zeroinitializer
119 %tmp70 = sext <4 x i1> %tmp69 to <4 x i32>
120 %tmp71 = shufflevector <4 x i32> %tmp70, <4 x i32> undef, <2 x i32> <i32 2, i32 3>
121 %tmp72 = shufflevector <4 x i32> %tmp70, <4 x i32> undef, <2 x i32> <i32 0, i32 1>
122 %tmp73 = and <2 x i32> %tmp71, %tmp72
123 %tmp74 = extractelement <2 x i32> %tmp73, i64 0
124 %tmp75 = extractelement <2 x i32> %tmp73, i64 1
125 %tmp76 = and i32 %tmp74, %tmp75
126 %tmp77 = icmp sgt i32 %tmp76, -1
127 br i1 %tmp77, label %bb, label %qtSet.exit
130 %tmp78 = extractelement <4 x float> %tmp1, i32 2
131 %tmp79 = extractelement <4 x float> %tmp1, i32 1
132 %tmp80 = extractelement <4 x float> %tmp1, i32 0
133 %tmp81 = fmul float %tmp80, %tmp80
134 %tmp82 = tail call float @llvm.fmuladd.f32(float %tmp79, float %tmp79, float %tmp81)
135 %tmp83 = tail call float @llvm.fmuladd.f32(float %tmp78, float %tmp78, float %tmp82)
136 %tmp84 = tail call float @llvm.fmuladd.f32(float 0.000000e+00, float 0.000000e+00, float %tmp83)
137 %tmp85 = fcmp olt float %tmp84, 0x3810000000000000
138 br i1 %tmp85, label %bb86, label %bb96
141 %tmp87 = fmul <4 x float> %vecinit3.i.i, <float 0x4550000000000000, float 0x4550000000000000, float 0x4550000000000000, float 0x4550000000000000>
142 %tmp88 = extractelement <4 x float> %tmp87, i64 3
143 %tmp89 = extractelement <4 x float> %tmp87, i64 2
144 %tmp90 = extractelement <4 x float> %tmp87, i64 1
145 %tmp91 = extractelement <4 x float> %tmp87, i64 0
146 %tmp92 = fmul float %tmp91, %tmp91
147 %tmp93 = tail call float @llvm.fmuladd.f32(float %tmp90, float %tmp90, float %tmp92)
148 %tmp94 = tail call float @llvm.fmuladd.f32(float %tmp89, float %tmp89, float %tmp93)
149 %tmp95 = tail call float @llvm.fmuladd.f32(float %tmp88, float %tmp88, float %tmp94)
153 %tmp97 = fcmp oeq float %tmp84, 0x7FF0000000000000
154 br i1 %tmp97, label %bb98, label %bb141
156 bb98: ; preds = %bb96
157 %tmp99 = fmul <4 x float> %vecinit3.i.i, <float 0x3BD0000000000000, float 0x3BD0000000000000, float 0x3BD0000000000000, float 0x3BD0000000000000>
158 %tmp100 = extractelement <4 x float> %tmp99, i64 3
159 %tmp101 = extractelement <4 x float> %tmp99, i64 2
160 %tmp102 = extractelement <4 x float> %tmp99, i64 1
161 %tmp103 = extractelement <4 x float> %tmp99, i64 0
162 %tmp104 = fmul float %tmp103, %tmp103
163 %tmp105 = tail call float @llvm.fmuladd.f32(float %tmp102, float %tmp102, float %tmp104)
164 %tmp106 = tail call float @llvm.fmuladd.f32(float %tmp101, float %tmp101, float %tmp105)
165 %tmp107 = tail call float @llvm.fmuladd.f32(float %tmp100, float %tmp100, float %tmp106)
166 %tmp108 = fcmp oeq float %tmp107, 0x7FF0000000000000
167 br i1 %tmp108, label %bb109, label %bb141
169 bb109: ; preds = %bb98
170 %tmp110 = tail call zeroext i1 @llvm.amdgcn.class.f32(float %tmp103, i32 516)
171 %tmp111 = sext i1 %tmp110 to i32
172 %tmp112 = insertelement <4 x i32> undef, i32 %tmp111, i32 0
173 %tmp113 = tail call zeroext i1 @llvm.amdgcn.class.f32(float %tmp102, i32 516)
174 %tmp114 = sext i1 %tmp113 to i32
175 %tmp115 = insertelement <4 x i32> %tmp112, i32 %tmp114, i32 1
176 %tmp116 = tail call zeroext i1 @llvm.amdgcn.class.f32(float %tmp101, i32 516)
177 %tmp117 = sext i1 %tmp116 to i32
178 %tmp118 = insertelement <4 x i32> %tmp115, i32 %tmp117, i32 2
179 %tmp119 = tail call zeroext i1 @llvm.amdgcn.class.f32(float %tmp100, i32 516)
180 %tmp120 = sext i1 %tmp119 to i32
181 %tmp121 = insertelement <4 x i32> %tmp118, i32 %tmp120, i32 3
182 %tmp122 = ashr <4 x i32> %tmp121, <i32 31, i32 31, i32 31, i32 31>
183 %tmp123 = and <4 x i32> %tmp122, <i32 1065353216, i32 1065353216, i32 1065353216, i32 1065353216>
184 %tmp124 = bitcast <4 x i32> %tmp123 to <4 x float>
185 %tmp125 = extractelement <4 x float> %tmp124, i64 0
186 %tmp126 = tail call float @llvm.copysign.f32(float %tmp125, float %tmp103)
187 %tmp127 = insertelement <4 x float> undef, float %tmp126, i32 0
188 %tmp128 = extractelement <4 x float> %tmp124, i64 1
189 %tmp129 = tail call float @llvm.copysign.f32(float %tmp128, float %tmp102)
190 %tmp130 = insertelement <4 x float> %tmp127, float %tmp129, i32 1
191 %tmp131 = extractelement <4 x float> %tmp124, i64 2
192 %tmp132 = tail call float @llvm.copysign.f32(float %tmp131, float %tmp101)
193 %tmp133 = insertelement <4 x float> %tmp130, float %tmp132, i32 2
194 %tmp134 = extractelement <4 x float> %tmp124, i64 3
195 %tmp135 = tail call float @llvm.copysign.f32(float %tmp134, float %tmp100)
196 %tmp136 = insertelement <4 x float> %tmp133, float %tmp135, i32 3
197 %tmp137 = fmul float %tmp126, %tmp126
198 %tmp138 = tail call float @llvm.fmuladd.f32(float %tmp129, float %tmp129, float %tmp137)
199 %tmp139 = tail call float @llvm.fmuladd.f32(float %tmp132, float %tmp132, float %tmp138)
200 %tmp140 = tail call float @llvm.fmuladd.f32(float %tmp135, float %tmp135, float %tmp139)
203 bb141: ; preds = %bb109, %bb98, %bb96, %bb86
204 %tmp142 = phi <4 x float> [ %tmp87, %bb86 ], [ %tmp136, %bb109 ], [ %tmp99, %bb98 ], [ %vecinit3.i.i, %bb96 ]
205 %tmp143 = phi float [ %tmp95, %bb86 ], [ %tmp140, %bb109 ], [ %tmp107, %bb98 ], [ %tmp84, %bb96 ]
206 %tmp144 = tail call float @llvm.amdgcn.rsq.f32(float %tmp143)
207 %tmp145 = insertelement <4 x float> undef, float %tmp144, i32 0
208 %tmp146 = shufflevector <4 x float> %tmp145, <4 x float> undef, <4 x i32> zeroinitializer
209 %tmp147 = fmul <4 x float> %tmp142, %tmp146
212 qtSet.exit: ; preds = %bb141, %entry
213 %tmp148 = phi <4 x float> [ %tmp147, %bb141 ], [ %vecinit3.i.i, %entry ]
214 %div.i = fmul float %mul3, 5.000000e-01
215 %cmp.i.i = fcmp olt float %div.i, 0x400921CAC0000000
216 %cond.i.i = select i1 %cmp.i.i, float 0x401921CAC0000000, float 0.000000e+00
217 %add.i18.i = fadd float %div.i, %cond.i.i
218 %cmp1.i.i = fcmp ogt float %add.i18.i, 0x400921CAC0000000
219 %cond2.i.i = select i1 %cmp1.i.i, float 0x401921CAC0000000, float 0.000000e+00
220 %sub.i.i48 = fsub float %add.i18.i, %cond2.i.i
221 %mul.i.i = fmul float %sub.i.i48, 0x3FF45F3060000000
222 %cmp3.i.i = fcmp olt float %sub.i.i48, 0.000000e+00
223 %mul5.i.i = select i1 %cmp3.i.i, float 0x3FD9F02F60000000, float 0xBFD9F02F60000000
224 %mul6.i.i = fmul float %sub.i.i48, %mul5.i.i
225 %tmp149 = tail call float @llvm.fmuladd.f32(float %mul6.i.i, float %sub.i.i48, float %mul.i.i)
226 %cmp8.i.i = fcmp olt float %tmp149, 0.000000e+00
227 %cond9.i.i = select i1 %cmp8.i.i, float -1.000000e+00, float 1.000000e+00
228 %mul10.i.i = fmul float %tmp149, %cond9.i.i
229 %neg.i.i49 = fsub float -0.000000e+00, %tmp149
230 %tmp150 = tail call float @llvm.fmuladd.f32(float %mul10.i.i, float %tmp149, float %neg.i.i49)
231 %tmp151 = tail call float @llvm.fmuladd.f32(float %tmp150, float 0x3FCCCCCCC0000000, float %tmp149)
232 %tmp152 = extractelement <4 x float> %tmp148, i64 0
233 %mul.i = fmul float %tmp151, %tmp152
234 %tmp153 = insertelement <4 x float> undef, float %mul.i, i64 0
235 %tmp154 = extractelement <4 x float> %tmp148, i64 1
236 %mul2.i = fmul float %tmp151, %tmp154
237 %tmp155 = insertelement <4 x float> %tmp153, float %mul2.i, i64 1
238 %tmp156 = extractelement <4 x float> %tmp148, i64 2
239 %mul3.i = fmul float %tmp151, %tmp156
240 %tmp157 = insertelement <4 x float> %tmp155, float %mul3.i, i64 2
241 %add.i.i50 = fadd float %div.i, 0x3FF921CAC0000000
242 %cmp.i.i.i = fcmp olt float %add.i.i50, 0x400921CAC0000000
243 %cond.i.i.i = select i1 %cmp.i.i.i, float 0x401921CAC0000000, float 0.000000e+00
244 %add.i.i.i = fadd float %add.i.i50, %cond.i.i.i
245 %cmp1.i.i.i = fcmp ogt float %add.i.i.i, 0x400921CAC0000000
246 %cond2.i.i.i = select i1 %cmp1.i.i.i, float 0x401921CAC0000000, float 0.000000e+00
247 %sub.i.i.i = fsub float %add.i.i.i, %cond2.i.i.i
248 %mul.i.i.i = fmul float %sub.i.i.i, 0x3FF45F3060000000
249 %cmp3.i.i.i = fcmp olt float %sub.i.i.i, 0.000000e+00
250 %mul5.i.i.i = select i1 %cmp3.i.i.i, float 0x3FD9F02F60000000, float 0xBFD9F02F60000000
251 %mul6.i.i.i = fmul float %sub.i.i.i, %mul5.i.i.i
252 %tmp158 = tail call float @llvm.fmuladd.f32(float %mul6.i.i.i, float %sub.i.i.i, float %mul.i.i.i)
253 %cmp8.i.i.i = fcmp olt float %tmp158, 0.000000e+00
254 %cond9.i.i.i = select i1 %cmp8.i.i.i, float -1.000000e+00, float 1.000000e+00
255 %mul10.i.i.i = fmul float %tmp158, %cond9.i.i.i
256 %neg.i.i.i = fsub float -0.000000e+00, %tmp158
257 %tmp159 = tail call float @llvm.fmuladd.f32(float %mul10.i.i.i, float %tmp158, float %neg.i.i.i)
258 %tmp160 = tail call float @llvm.fmuladd.f32(float %tmp159, float 0x3FCCCCCCC0000000, float %tmp158)
259 %tmp161 = insertelement <4 x float> %tmp157, float %tmp160, i64 3
260 %sub.i.i32 = fsub float -0.000000e+00, %mul.i
261 %vecinit.i.i33 = insertelement <4 x float> undef, float %sub.i.i32, i32 0
262 %sub1.i.i34 = fsub float -0.000000e+00, %mul2.i
263 %vecinit2.i.i35 = insertelement <4 x float> %vecinit.i.i33, float %sub1.i.i34, i32 1
264 %sub3.i.i36 = fsub float -0.000000e+00, %mul3.i
265 %vecinit4.i.i37 = insertelement <4 x float> %vecinit2.i.i35, float %sub3.i.i36, i32 2
266 %vecinit5.i.i38 = shufflevector <4 x float> %vecinit4.i.i37, <4 x float> %tmp161, <4 x i32> <i32 0, i32 1, i32 2, i32 7>
267 %tmp162 = insertelement <4 x float> %mul2, float 0.000000e+00, i64 3
268 ret <4 x float> %tmp162
271 declare float @llvm.copysign.f32(float, float)
273 declare i1 @llvm.amdgcn.class.f32(float, i32)
275 declare float @llvm.amdgcn.rsq.f32(float)
277 declare void @llvm.dbg.value(metadata, metadata, metadata)
280 !llvm.module.flags = !{!104, !105, !106}
281 !opencl.ocl.version = !{!107}
282 !llvm.ident = !{!108, !109}
284 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 7.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !74)
285 !1 = !DIFile(filename: "tmp.cl", directory: "/home/yaxunl/h/git/llvm/assert")
286 !2 = !{!3, !27, !37, !42, !46, !51, !55, !68}
287 !3 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "BrdfType", file: !4, line: 1334, size: 32, elements: !5)
288 !4 = !DIFile(filename: "GraphMaterialSystemKernels1.cl", directory: "/home/yaxunl/h/git/llvm/assert")
289 !5 = !{!6, !7, !8, !9, !10, !11, !12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22, !23, !24, !25, !26}
290 !6 = !DIEnumerator(name: "BRDF_DEFAULT", value: 0)
291 !7 = !DIEnumerator(name: "BRDF_LAMBERT", value: 1)
292 !8 = !DIEnumerator(name: "BRDF_MICROFACET", value: 2)
293 !9 = !DIEnumerator(name: "BRDF_REFLECT", value: 3)
294 !10 = !DIEnumerator(name: "BRDF_REFRACT", value: 4)
295 !11 = !DIEnumerator(name: "BRDF_EMISSIVE", value: 5)
296 !12 = !DIEnumerator(name: "BRDF_LAYERED", value: 6)
297 !13 = !DIEnumerator(name: "BRDF_FUR", value: 7)
298 !14 = !DIEnumerator(name: "BRDF_DIFFUSE_ORENNAYAR", value: 8)
299 !15 = !DIEnumerator(name: "BRDF_TRANSPARENT", value: 9)
300 !16 = !DIEnumerator(name: "BRDF_PHONG", value: 10)
301 !17 = !DIEnumerator(name: "BRDF_WARD", value: 11)
302 !18 = !DIEnumerator(name: "BRDF_ASHIKHMIN", value: 12)
303 !19 = !DIEnumerator(name: "BRDF_MICROFACET_GGX", value: 13)
304 !20 = !DIEnumerator(name: "BRDF_MICROFACET_REFRACTION", value: 14)
305 !21 = !DIEnumerator(name: "BRDF_PASSTHROUGH", value: 15)
306 !22 = !DIEnumerator(name: "BRDF_VOLUME", value: 16)
307 !23 = !DIEnumerator(name: "BRDF_LAMBERT_REFRACTION", value: 17)
308 !24 = !DIEnumerator(name: "BRDF_MICROFACET_ANISOTROPIC_REFLECTION", value: 18)
309 !25 = !DIEnumerator(name: "BRDF_MICROFACET_ANISOTROPIC_REFRACTION", value: 19)
310 !26 = !DIEnumerator(name: "BRDF_MICROFACET_BECKMANN", value: 20)
311 !27 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "LightType", file: !4, line: 1470, size: 32, elements: !28)
312 !28 = !{!29, !30, !31, !32, !33, !34, !35, !36}
313 !29 = !DIEnumerator(name: "LIGHT_POINT", value: 0)
314 !30 = !DIEnumerator(name: "LIGHT_SPOT", value: 1)
315 !31 = !DIEnumerator(name: "LIGHT_DIRECTIONAL", value: 2)
316 !32 = !DIEnumerator(name: "LIGHT_UNIFORM", value: 3)
317 !33 = !DIEnumerator(name: "LIGHT_MESH", value: 4)
318 !34 = !DIEnumerator(name: "LIGHT_IBL", value: 5)
319 !35 = !DIEnumerator(name: "LIGHT_GONIOPHOTO", value: 6)
320 !36 = !DIEnumerator(name: "LIGHT_SKY", value: 7)
321 !37 = !DICompositeType(tag: DW_TAG_enumeration_type, file: !4, line: 1569, size: 32, elements: !38)
322 !38 = !{!39, !40, !41}
323 !39 = !DIEnumerator(name: "UG3D_FILTER_NEAREST", value: 0)
324 !40 = !DIEnumerator(name: "UG3D_FILTER_LINEAR", value: 1)
325 !41 = !DIEnumerator(name: "UG3D_FILTER_MONOTONIC_CUBIC", value: 2)
326 !42 = !DICompositeType(tag: DW_TAG_enumeration_type, file: !4, line: 1562, size: 32, elements: !43)
328 !44 = !DIEnumerator(name: "VH_CHECKER", value: 0)
329 !45 = !DIEnumerator(name: "VH_OPENVDB", value: 1)
330 !46 = !DICompositeType(tag: DW_TAG_enumeration_type, file: !4, line: 1554, size: 32, elements: !47)
331 !47 = !{!48, !49, !50}
332 !48 = !DIEnumerator(name: "VOLUME_HOMOGENEOUS", value: 0)
333 !49 = !DIEnumerator(name: "VOLUME_HETEROGENEOUS", value: 1)
334 !50 = !DIEnumerator(name: "VOLUME_NONE", value: 65535)
335 !51 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "VolumeFlags", file: !4, line: 1504, size: 32, elements: !52)
337 !53 = !DIEnumerator(name: "VFLAGS_NONE", value: 0)
338 !54 = !DIEnumerator(name: "VFLAGS_SINGLE_SCATTER", value: 1)
339 !55 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "OffsetIdx", file: !4, line: 1316, size: 32, elements: !56)
340 !56 = !{!57, !58, !59, !60, !61, !62, !63, !64, !65, !66, !67}
341 !57 = !DIEnumerator(name: "SCENE_OFFSET_IDX_FACE", value: 0)
342 !58 = !DIEnumerator(name: "SCENE_OFFSET_IDX_VTX", value: 1)
343 !59 = !DIEnumerator(name: "SCENE_OFFSET_IDX_N", value: 2)
344 !60 = !DIEnumerator(name: "SCENE_OFFSET_IDX_TEXCRD", value: 3)
345 !61 = !DIEnumerator(name: "SCENE_OFFSET_IDX_TEXCRD1", value: 4)
346 !62 = !DIEnumerator(name: "SCENE_OFFSET_IDX_SUBSHAPE_DATA", value: 5)
347 !63 = !DIEnumerator(name: "SCENE_OFFSET_IDX_MATERIAL", value: 6)
348 !64 = !DIEnumerator(name: "SCENE_OFFSET_IDX_MATERIAL_DESC", value: 7)
349 !65 = !DIEnumerator(name: "SCENE_OFFSET_IDX_GRID3D", value: 8)
350 !66 = !DIEnumerator(name: "SCENE_OFFSET_IDX_WORLD_VOLUME", value: 9)
351 !67 = !DIEnumerator(name: "SCENE_OFFSET_INTERVAL", value: 4)
352 !68 = !DICompositeType(tag: DW_TAG_enumeration_type, file: !4, line: 1972, size: 32, elements: !69)
353 !69 = !{!70, !71, !72, !73}
354 !70 = !DIEnumerator(name: "FACE_TRIANGLE", value: 0)
355 !71 = !DIEnumerator(name: "FACE_LINE_SEGMENT", value: 1)
356 !72 = !DIEnumerator(name: "FACE_QUAD", value: 2)
357 !73 = !DIEnumerator(name: "FACE_OTHERS", value: 3)
358 !74 = !{!75, !77, !80, !83, !84, !87, !88, !102}
359 !75 = !DIDerivedType(tag: DW_TAG_typedef, name: "u32", file: !4, line: 85, baseType: !76)
360 !76 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned)
361 !77 = !DIDerivedType(tag: DW_TAG_typedef, name: "float4", file: !78, line: 127, baseType: !79)
362 !78 = !DIFile(filename: "/home/yaxunl/h/driver/1490442/opencl/include/opencl-c.h", directory: "/home/yaxunl/h/git/llvm/assert")
363 !79 = !DICompositeType(tag: DW_TAG_array_type, baseType: !80, size: 128, flags: DIFlagVector, elements: !81)
364 !80 = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float)
366 !82 = !DISubrange(count: 4)
367 !83 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
368 !84 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !85, size: 32, dwarfAddressSpace: 1)
369 !85 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !86)
370 !86 = !DIBasicType(name: "half", size: 16, encoding: DW_ATE_float)
371 !87 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !86, size: 32, dwarfAddressSpace: 1)
372 !88 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !89, size: 64)
373 !89 = !DIDerivedType(tag: DW_TAG_typedef, name: "Face", file: !4, line: 1993, baseType: !90)
374 !90 = distinct !DICompositeType(tag: DW_TAG_structure_type, file: !4, line: 1981, size: 640, elements: !91)
375 !91 = !{!92, !94, !95, !96, !97, !98, !100, !101}
376 !92 = !DIDerivedType(tag: DW_TAG_member, name: "m_v", scope: !90, file: !4, line: 1983, baseType: !93, size: 128)
377 !93 = !DICompositeType(tag: DW_TAG_array_type, baseType: !83, size: 128, elements: !81)
378 !94 = !DIDerivedType(tag: DW_TAG_member, name: "m_n", scope: !90, file: !4, line: 1984, baseType: !93, size: 128, offset: 128)
379 !95 = !DIDerivedType(tag: DW_TAG_member, name: "m_t", scope: !90, file: !4, line: 1985, baseType: !93, size: 128, offset: 256)
380 !96 = !DIDerivedType(tag: DW_TAG_member, name: "m_t1", scope: !90, file: !4, line: 1986, baseType: !93, size: 128, offset: 384)
381 !97 = !DIDerivedType(tag: DW_TAG_member, name: "m_m", scope: !90, file: !4, line: 1988, baseType: !83, size: 32, offset: 512)
382 !98 = !DIDerivedType(tag: DW_TAG_member, name: "m_type", scope: !90, file: !4, line: 1989, baseType: !99, size: 32, offset: 544)
383 !99 = !DIDerivedType(tag: DW_TAG_typedef, name: "FaceType", file: !4, line: 1978, baseType: !68)
384 !100 = !DIDerivedType(tag: DW_TAG_member, name: "m_lightIdx", scope: !90, file: !4, line: 1990, baseType: !83, size: 32, offset: 576)
385 !101 = !DIDerivedType(tag: DW_TAG_member, name: "m_padding", scope: !90, file: !4, line: 1991, baseType: !83, size: 32, offset: 608)
386 !102 = !DIDerivedType(tag: DW_TAG_typedef, name: "u64", file: !4, line: 84, baseType: !103)
387 !103 = !DIBasicType(name: "long unsigned int", size: 64, encoding: DW_ATE_unsigned)
388 !104 = !{i32 2, !"Dwarf Version", i32 2}
389 !105 = !{i32 2, !"Debug Info Version", i32 3}
390 !106 = !{i32 1, !"wchar_size", i32 4}
391 !107 = !{i32 2, i32 0}
392 !108 = !{!"clang version 7.0.0"}
393 !109 = !{!"clang version 4.0 "}
394 !110 = distinct !DISubprogram(name: "Scene_transformT", scope: !4, file: !4, line: 2182, type: !111, isLocal: false, isDefinition: true, scopeLine: 2183, flags: DIFlagPrototyped, isOptimized: true, unit: !0, retainedNodes: !116)
395 !111 = !DISubroutineType(types: !112)
396 !112 = !{!77, !83, !77, !80, !113, !115}
397 !113 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !114, size: 64)
398 !114 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)
399 !115 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !75, size: 64)
400 !116 = !{!117, !118, !119, !120, !121, !122, !147, !149, !150, !151, !152, !153}
401 !117 = !DILocalVariable(name: "subshapeIdx", arg: 1, scope: !110, file: !4, line: 2182, type: !83)
402 !118 = !DILocalVariable(name: "v", arg: 2, scope: !110, file: !4, line: 2182, type: !77)
403 !119 = !DILocalVariable(name: "time", arg: 3, scope: !110, file: !4, line: 2182, type: !80)
404 !120 = !DILocalVariable(name: "gScene", arg: 4, scope: !110, file: !4, line: 2182, type: !113)
405 !121 = !DILocalVariable(name: "gSceneOffsets", arg: 5, scope: !110, file: !4, line: 2182, type: !115)
406 !122 = !DILocalVariable(name: "ss", scope: !110, file: !4, line: 2184, type: !123)
407 !123 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !124, size: 64)
408 !124 = !DIDerivedType(tag: DW_TAG_typedef, name: "ShapeData", file: !4, line: 1949, baseType: !125)
409 !125 = distinct !DICompositeType(tag: DW_TAG_structure_type, file: !4, line: 1927, size: 1024, elements: !126)
410 !126 = !{!127, !128, !130, !131, !132, !133, !134, !135, !136, !137, !138, !141, !142, !145, !146}
411 !127 = !DIDerivedType(tag: DW_TAG_member, name: "m_translation", scope: !125, file: !4, line: 1929, baseType: !77, size: 128)
412 !128 = !DIDerivedType(tag: DW_TAG_member, name: "m_quaternion", scope: !125, file: !4, line: 1930, baseType: !129, size: 128, offset: 128)
413 !129 = !DIDerivedType(tag: DW_TAG_typedef, name: "Quaternion", file: !4, line: 625, baseType: !77)
414 !130 = !DIDerivedType(tag: DW_TAG_member, name: "m_linearMotion", scope: !125, file: !4, line: 1931, baseType: !77, size: 128, offset: 256)
415 !131 = !DIDerivedType(tag: DW_TAG_member, name: "m_angularMotion", scope: !125, file: !4, line: 1932, baseType: !77, size: 128, offset: 384)
416 !132 = !DIDerivedType(tag: DW_TAG_member, name: "m_scaleMotion", scope: !125, file: !4, line: 1933, baseType: !77, size: 128, offset: 512)
417 !133 = !DIDerivedType(tag: DW_TAG_member, name: "m_rootIdx", scope: !125, file: !4, line: 1935, baseType: !75, size: 32, offset: 640)
418 !134 = !DIDerivedType(tag: DW_TAG_member, name: "m_materialIdx", scope: !125, file: !4, line: 1936, baseType: !75, size: 32, offset: 672)
419 !135 = !DIDerivedType(tag: DW_TAG_member, name: "m_shapeAddr", scope: !125, file: !4, line: 1937, baseType: !102, size: 64, offset: 704)
420 !136 = !DIDerivedType(tag: DW_TAG_member, name: "m_scale", scope: !125, file: !4, line: 1939, baseType: !77, size: 128, offset: 768)
421 !137 = !DIDerivedType(tag: DW_TAG_member, name: "m_flags", scope: !125, file: !4, line: 1941, baseType: !75, size: 32, offset: 896)
422 !138 = !DIDerivedType(tag: DW_TAG_member, name: "m_hasUv", scope: !125, file: !4, line: 1942, baseType: !139, size: 8, offset: 928)
423 !139 = !DIDerivedType(tag: DW_TAG_typedef, name: "u8", file: !4, line: 87, baseType: !140)
424 !140 = !DIBasicType(name: "unsigned char", size: 8, encoding: DW_ATE_unsigned_char)
425 !141 = !DIDerivedType(tag: DW_TAG_member, name: "m_padd00", scope: !125, file: !4, line: 1943, baseType: !139, size: 8, offset: 936)
426 !142 = !DIDerivedType(tag: DW_TAG_member, name: "m_objectGroupId", scope: !125, file: !4, line: 1944, baseType: !143, size: 16, offset: 944)
427 !143 = !DIDerivedType(tag: DW_TAG_typedef, name: "u16", file: !4, line: 86, baseType: !144)
428 !144 = !DIBasicType(name: "unsigned short", size: 16, encoding: DW_ATE_unsigned)
429 !145 = !DIDerivedType(tag: DW_TAG_member, name: "m_faceIndexShift", scope: !125, file: !4, line: 1946, baseType: !75, size: 32, offset: 960)
430 !146 = !DIDerivedType(tag: DW_TAG_member, name: "m_padd2", scope: !125, file: !4, line: 1947, baseType: !75, size: 32, offset: 992)
431 !147 = !DILocalVariable(name: "mt", scope: !148, file: !4, line: 2187, type: !77)
432 !148 = distinct !DILexicalBlock(scope: !110, file: !4, line: 2186, column: 2)
433 !149 = !DILocalVariable(name: "ma", scope: !148, file: !4, line: 2188, type: !77)
434 !150 = !DILocalVariable(name: "ms", scope: !148, file: !4, line: 2189, type: !77)
435 !151 = !DILocalVariable(name: "t", scope: !148, file: !4, line: 2191, type: !77)
436 !152 = !DILocalVariable(name: "q", scope: !148, file: !4, line: 2193, type: !129)
437 !153 = !DILocalVariable(name: "w", scope: !148, file: !4, line: 2194, type: !80)
438 !154 = !DILocation(line: 2182, column: 80, scope: !110)
439 !155 = !DILocation(line: 2182, column: 102, scope: !110)