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

--- Comment #6 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
The problem is that on Arm the .COPYSIGN IFN is not always available. and so
when it's not the optimization won't trigger.  This compared to
__builtin_copysign which is because it has a libcall fallback.

But .COPYSIGN can have fallback code too and indeed expand does have this
fallback code in expand_copysign.

So the optimization does not trigger for all of Arm's many variants depending
on this since the IFN is direct IFN.

The solution is rework the code so copysign is and DEF_INTERNAL_FN instead of a
DEF_INTERNAL_OPTAB_FN so that those variants of Arm can have the optimization
too by using the fallback code. I had started on this but had other things to
take care of and forgot.

So Arm isn't getting the optimization, but it isn't a "regression" in the sense
that code didn't get worse, it just didn't improve as expected.

Reply via email to