[libc-commits] [PATCH] D146253: [libc] Enabled more tests for targets other than x86_64

Mikhail Ramalho via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Mar 23 06:13:05 PDT 2023


mikhail.ramalho added a comment.
Herald added a subscriber: asb.

In D146253#4201018 <https://reviews.llvm.org/D146253#4201018>, @lntue wrote:

> @mikhail.ramalho : why do you need to force the `FMA_OPT` and `ROUND_OPT` for RISC-V target?  These are to expand to build and test both with and without those instructions automatically.  Do you plan the same thing for RISC-V?  Without this, the current setup should test the trig functions with FMA and rounding instructions by default, and not testing trig functions without those instructions.
>
> With this change, on AArch64, AArch32, RISC-V, and GPU, each math function will have 2-4 targets, with and without `FMA_OPT` and  `ROUND_OPT` flags, and since the build system does not do anything, add any special compile options or flags, those targets are all identical.  So I don't think that's your intention?
>
> Do you want to test both non-FMA and FMA math implementations on RISC-V64 automatically similar to x86-64 instead?

Yeah, that was my plan: I assumed that by disabling the FMA flag, the tests would automatically pick up the generic fma implementation, but checking the generated asm I saw that's not the case. I'll check how we can fix that, at least for riscv.

Also, I was assuming that the ROUND_OPT flag was related to rounding modes (e.g., adding `-fno-rounding-math`), but it actually checks for SSE 4.2. May I ask what's the purpose of this flag exactly?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146253



More information about the libc-commits mailing list