@@ -255,3 +255,23 @@ __device__ void test_div_scale_f32_with_ptr(float* out, int* flagout, bool* flag
255255{
256256 *out = __builtin_amdgcn_div_scalef (a, b, true , flag);
257257}
258+
259+ // CIR-LABEL: @_Z17test_div_fmas_f32Pdfffi
260+ // CIR: cir.llvm.intrinsic "amdgcn.div.fmas" {{.*}} : (!cir.float, !cir.float, !cir.float, !cir.bool) -> !cir.float
261+ // LLVM: define{{.*}} void @_Z17test_div_fmas_f32Pdfffi
262+ // LLVM: call float @llvm.amdgcn.div.fmas.f32(float %{{.+}}, float %{{.+}}, float %{{.+}}, i1 %{{.*}})
263+ // OGCG: define{{.*}} void @_Z17test_div_fmas_f32Pdfffi
264+ // OGCG: call {{.*}} float @llvm.amdgcn.div.fmas.f32(float %{{.+}}, float %{{.+}}, float %{{.+}}, i1 %{{.*}})
265+ __device__ void test_div_fmas_f32 (double * out, float a, float b, float c, int d) {
266+ *out = __builtin_amdgcn_div_fmasf (a, b, c, d);
267+ }
268+
269+ // CIR-LABEL: @_Z17test_div_fmas_f64Pddddi
270+ // CIR: cir.llvm.intrinsic "amdgcn.div.fmas" {{.*}} : (!cir.double, !cir.double, !cir.double, !cir.bool) -> !cir.double
271+ // LLVM: define{{.*}} void @_Z17test_div_fmas_f64Pddddi
272+ // LLVM: call double @llvm.amdgcn.div.fmas.f64(double %{{.+}}, double %{{.+}}, double %{{.+}}, i1 %{{.*}})
273+ // OGCG: define{{.*}} void @_Z17test_div_fmas_f64Pddddi
274+ // OGCG: call {{.*}} double @llvm.amdgcn.div.fmas.f64(double %{{.+}}, double %{{.+}}, double %{{.+}}, i1 %{{.*}})
275+ __device__ void test_div_fmas_f64 (double * out, double a, double b, double c, int d) {
276+ *out = __builtin_amdgcn_div_fmas (a, b, c, d);
277+ }
0 commit comments