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

--- Comment #20 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Xi Ruoyao <xry...@gcc.gnu.org>:

https://gcc.gnu.org/g:9e9279fadbd1c673c875b9d20261d2de0473f63f

commit r14-5542-g9e9279fadbd1c673c875b9d20261d2de0473f63f
Author: Andrew Pinski <pins...@gmail.com>
Date:   Mon Nov 13 20:18:34 2023 +0000

    Only allow (copysign x, NEG_CONST) -> (fneg (fabs x)) simplification for
constant folding [PR112483]

    On targets with native copysign instructions, (copysign x, -1) is
    usually more efficient than (fneg (fabs x)).  Since r14-5284, in the
    middle end we always optimize (fneg (fabs x)) to (copysign x, -1), not
    vice versa.  If the target does not support native fcopysign,
    expand_COPYSIGN will expand it as (fneg (fabs x)) anyway.

    gcc/ChangeLog:

            PR rtl-optimization/112483
            * simplify-rtx.cc (simplify_binary_operation_1) <case COPYSIGN>:
            Call simplify_unary_operation for NEG instead of
            simplify_gen_unary.

Reply via email to