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

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Hongyu Wang <hong...@gcc.gnu.org>:

https://gcc.gnu.org/g:83a765768510d1f329887116757d6818d7846717

commit r15-1293-g83a765768510d1f329887116757d6818d7846717
Author: Hongyu Wang <hongyu.w...@intel.com>
Date:   Thu Jun 13 00:18:32 2024 +0800

    [APX CCMP] Add targetm.have_ccmp hook [PR115370]

    In cfgexpand, there is an optimization for branch which tests
    targetm.gen_ccmp_first == NULL. However for target like x86-64, the
    hook was implemented but it does not indicate that ccmp was enabled.
    Add a new target hook TARGET_HAVE_CCMP and replace the middle-end
    check for the existance of gen_ccmp_first to avoid misoptimization.

    gcc/ChangeLog:

            PR target/115370
            PR target/115463
            * target.def (have_ccmp): New target hook.
            * targhooks.cc (default_have_ccmp): New function.
            * targhooks.h (default_have_ccmp): New prototype.
            * doc/tm.texi.in: Add TARGET_HAVE_CCMP.
            * doc/tm.texi: Regenerate.
            * cfgexpand.cc (expand_gimple_cond): Call targetm.have_ccmp
            instead of checking if targetm.gen_ccmp_first exists.
            * expr.cc (expand_expr_real_gassign): Likewise.
            * config/i386/i386.cc (ix86_have_ccmp): New target hook to
            check if APX_CCMP enabled.
            (TARGET_HAVE_CCMP): Define.

Reply via email to