[PATCH] D156344: Disable call to fma for soft-float

ChenZheng via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 15 00:45:13 PDT 2023


shchenz added a comment.

In D156344#4583767 <https://reviews.llvm.org/D156344#4583767>, @long5hot wrote:

> In D156344#4583559 <https://reviews.llvm.org/D156344#4583559>, @shchenz wrote:
>
>> compiler-rt builtins library should not just undefining fma for PPC, right (see https://gcc.gnu.org/onlinedocs/gccint/Soft-float-library-routines.html)? If so, maybe we should at least first try not generating fma for soft-float at the first place where fmul + fadd is fused, like `tryEmitFMulAdd` in clang front end?
>
> I actually raised D154605 <https://reviews.llvm.org/D154605> for that one, but it's only for X86.
> I was relying on target-features containing "+fma", which is wrong. The review was raised just to get feedback from community working on various targets.
> Plan is to disable fma-intrinsic from IR for all targets which doesn't support fma.

Thanks. I think `soft-float` looks like a candidate for the `hasFMA` function in D154605 <https://reviews.llvm.org/D154605>.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156344/new/

https://reviews.llvm.org/D156344



More information about the cfe-commits mailing list