[llvm] [SLP]Initial FMAD support (PR #149102)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 10 08:00:24 PDT 2025
alexey-bataev wrote:
> > > A note we saw some fallout from this in internal performance testing too. Something like this example doing a reduce of a fmul under fast-math is no longer vectorizing from the SLP vectorizer: https://godbolt.org/z/rYWM7dxEj. It wasn't helped on AArch64 by a different set of cost calculations that marked a fmul the same cost as a fma, but that example is x86. The original fadds in a reduction can be combined into a fma, but the expanded reduction will still become fma for part of it.
> >
> >
> > There should be a follow up patch to support fma-based reduction
>
> Sounds great. The performance regressions were pretty large and people here wouldn't be happy with something so large being broken for any length of time. Its a multiply accumulate after all, they come up everywhere. I've added some phase-ordering tests in [a976843](https://github.com/llvm/llvm-project/commit/a976843033485ff44bb4bbb0b0b8a537956b4c40).
https://github.com/llvm/llvm-project/pull/152787/files/611246c7328ac226ac3773eadf57f92c7ef648cc..5bbf933ff0236d13b06b13f2d0e0c4289f64111b
https://github.com/llvm/llvm-project/pull/149102
More information about the llvm-commits
mailing list