[clang] [clang] Make -fveclib={ArmPL, SLEEF} imply -fno-math-errno (PR #112580)

Benjamin Maxwell via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 17 01:56:31 PDT 2024


MacDue wrote:

> > Have you checked the flang driver? Is it not applicable there since errno is not used in Flang?
> 
> We don't support the gfortran extension for checking errno in flang and I can't see another way of checking it portably, so I wonder if we should just have this flag on by default in flang in general? It shouldn't provide any observable change and might increase performance as far as I can tell.

As far as I can tell from looking at the `flang` driver, it already defaults to the equivalent of `-fno-math-errno` (looks like there's no way to set `-fmath-errno` at all). That's corroborated by looking at the LLVM IR for a call to `sin` which uses the non-errno setting  LLVM intrinsic by default: https://godbolt.org/z/dvTvP3vPr.

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


More information about the cfe-commits mailing list