[all-commits] [llvm/llvm-project] 8aeeb9: [AArch64] Don't call fma/fmaf for @llvm.fmuladd.f6...
Simon Tatham via All-commits
all-commits at lists.llvm.org
Thu Jun 25 03:48:24 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8aeeb9f67a4f314fb4f4e83788a62d69d4f3e742
https://github.com/llvm/llvm-project/commit/8aeeb9f67a4f314fb4f4e83788a62d69d4f3e742
Author: Simon Tatham <simon.tatham at arm.com>
Date: 2026-06-25 (Thu, 25 Jun 2026)
Changed paths:
M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
A llvm/test/CodeGen/AArch64/aarch64-fmuladd.ll
Log Message:
-----------
[AArch64] Don't call fma/fmaf for @llvm.fmuladd.f64/f32 in softfp (#205356)
@llvm.fmuladd is the IR intrinsic that leaves it up to code generation
whether to fuse an FP multiply+add pair or leave them separate.
Generally you only fuse them if fused mul+add has good performance.
On AArch64, for the float and double instances of this intrinsic, isel
was unconditionally fusing the operations. This is sensible with
hardware FP, but a bad idea for the rare case of AArch64 without
hardware FP, because that leads to a call to the libm `fma()` or
`fmaf()` function. That function generally (in multiple libcs) seems to
be much slower than separate mul+add operations. So this patch checks
for the presence of FP before reporting that fusing the operations is a
performance win.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list