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

--- Comment #9 from Peter Bergner <bergner at gcc dot gnu.org> ---
(In reply to Segher Boessenkool from comment #8)
> I don't think we have an instruction for that?  But we can inline the
> code we need instead of doing a library call, which is much faster.
> (We probably can use FMAs here usefully, btw; maybe even without needing
> -ffast-math.)

Yes, I was mistaken we had a hw insn.  I do see xlc does not expand
__builtin_fmod (x, y), so it's only xlf that does this optimization.

Agreed on the inlining thing.  It's interesting that even libm's fmod() routine
on ppc just calls a C function and doesn't have an optimized asm routine.

Reply via email to