MIN/MAX and trapping math and NANs
Andrew Pinski
pinskia@gmail.com
Sat Apr 1 22:29:17 GMT 2023
Hi,
I noticed while working on phi-opt, that MIN/MAX EXPR (and the
corresponding RTL codes) both can return true for trapping even if
NANs are not honored (that is -ffinite-math-only). Is this true? I
would have assumed when -ffinite-math-only -fno-signed-zeros is used,
then MIN/MAX would be the same as a > b ? a : b which would not cause
a trap.
If we think they should not trap, then I will create a patch and test
it for GCC 14.
Thanks,
Andrew Pinski
More information about the Gcc
mailing list