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

--- Comment #25 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Peter Bergner
<berg...@gcc.gnu.org>:

https://gcc.gnu.org/g:04ca18ff5e2592ac88a5b72248332f519a17184b

commit r12-10409-g04ca18ff5e2592ac88a5b72248332f519a17184b
Author: Will Schmidt <will_schm...@linux.ibm.com>
Date:   Fri Apr 12 14:55:16 2024 -0500

    rs6000: Add OPTION_MASK_POWER8 [PR101865]

    The bug in PR101865 is the _ARCH_PWR8 predefine macro is conditional upon
    TARGET_DIRECT_MOVE, which can be false for some -mcpu=power8 compiles if
the
    -mno-altivec or -mno-vsx options are used.  The solution here is to create
    a new OPTION_MASK_POWER8 mask that is true for -mcpu=power8, regardless of
    Altivec or VSX enablement.

    Unfortunately, the only way to create an OPTION_MASK_* mask is to create
    a new option, which we have done here, but marked it as WarnRemoved since
    we do not want users using it.  For stage1, we will look into how we can
    create ISA mask flags for use in the compiler without the need for explicit
    options.

    2024-04-12  Will Schmidt  <will_schm...@linux.ibm.com>
                Peter Bergner  <berg...@linux.ibm.com>

    gcc/
            PR target/101865
            * config/rs6000/rs6000-builtin.cc (rs6000_builtin_is_supported):
Use
            TARGET_POWER8.
            * config/rs6000/rs6000-c.cc (rs6000_target_modify_macros): Use
            OPTION_MASK_POWER8.
            * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Add
OPTION_MASK_POWER8.
            (ISA_2_7_MASKS_SERVER): Likewise.
            * config/rs6000/rs6000.cc (rs6000_option_override_internal): Update
            comment.  Use OPTION_MASK_POWER8 and TARGET_POWER8.
            * config/rs6000/rs6000.h (TARGET_SYNC_HI_QI): Use TARGET_POWER8.
            * config/rs6000/rs6000.md (define_attr "isa"): Add p8.
            (define_attr "enabled"): Handle it.
            (define_insn "prefetch"): Use TARGET_POWER8.
            * config/rs6000/rs6000.opt (mpower8-internal): New.

    gcc/testsuite/
            PR target/101865
            * gcc.target/powerpc/predefine-p7-novsx.c: New test.
            * gcc.target/powerpc/predefine-p8-noaltivec-novsx.c: New test.
            * gcc.target/powerpc/predefine-p8-noaltivec.c: New test.
            * gcc.target/powerpc/predefine-p8-novsx.c: New test.
            * gcc.target/powerpc/predefine-p8-pragma-vsx.c: New test.
            * gcc.target/powerpc/predefine-p9-novsx.c: New test.

    (cherry picked from commit aa57af93ba22865be747f926e4e5f219e7f8758a)

Reply via email to