https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108922

--- Comment #18 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Uroš Bizjak from comment #17)
> So, based on the above finding, should insn condition be changed to
> !flag_errno_math?

I'd say that it shouldn't be the business of backends to check flag_errno_math,
it should be the middle-end.  And it can either ignore the fmod (but isn't say
hypot and others a similar case) optab in that case or it could do the sqrt
trick by using the optab inline even for flag_errno_math, then using comparison
detect if it is one of the exceptional cases and call the library function in
that case.

Of course, that is probably GCC 14 material and so a hack on the backend side
would be acceptable too.

Reply via email to