================
@@ -313,4 +313,15 @@ double test_fma_f64(double a, double b, double c) {
   // OGCG: %[[R:.*]] = call double @llvm.fma.f64(double %[[A:.*]], double 
%[[B:.*]], double %[[C:.*]])
   return __builtin_fma(a, b, c);
 }
+// CHECK-LABEL: cir.func @test_vfmadd
+// CHECK: cir.call @__builtin_ia32_vfmaddpd
+// CHECK: cir.call @__builtin_ia32_vfmaddps
+// CHECK: cir.call @__builtin_ia32_vfmaddsubpd
+// CHECK: cir.call @__builtin_ia32_vfmaddsubps
+void test_vfmadd(double a, double b, double c) {
----------------
andykaylor wrote:

When you add tests for the correct builtins, they should be calling the x86 
intrinsics that wrap the builtin functions -- _mm_fmadd_sh, _mm_mask_fmadd_ss, 
_mm_mask_fmadd_sd, etc. The tests should be added to 
clang/test/CIR/CodeGenBuiltins/X86/avx512f-builtins.c. Look at the existing 
tests there for a model of what is required. The tests should have checks for 
CIR, LLVM (LLVM IR produced with -fclangir), and OGCG (LLVM IR produced without 
-fclangir).

https://github.com/llvm/llvm-project/pull/217326
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to