[llvm] [llvm] Ensure that soft float targets don't emit `fma()` libcalls. (PR #106615)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 30 09:34:51 PDT 2024


================
@@ -0,0 +1,75 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+; RUN: llc -mtriple=arm < %s | FileCheck %s -check-prefix=SOFT-FLOAT
+; RUN: llc -mtriple=arm -mattr=+vfp4d16sp < %s | FileCheck %s -check-prefix=SOFT-FLOAT-VFP32
+; RUN: llc -mtriple=arm -mattr=+vfp4d16sp,+fp64 < %s | FileCheck %s -check-prefix=SOFT-FLOAT-VFP64
+
+define float @fma_f32(float %a, float %b, float %c) "use-soft-float"="true" {
----------------
arsenm wrote:

Test name is misleading, it's not using FMA directly. Can you also add tests with the fmul contract + fadd contract pattern?

Also use attribute group? 

https://github.com/llvm/llvm-project/pull/106615


More information about the llvm-commits mailing list