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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Michael Meissner <meiss...@gcc.gnu.org>:

https://gcc.gnu.org/g:f9063d12633c62a089115df032a19295854d8b06

commit r12-6812-gf9063d12633c62a089115df032a19295854d8b06
Author: Michael Meissner <meiss...@linux.ibm.com>
Date:   Fri Jan 21 18:08:50 2022 -0500

    Mark XXSPLTIW/XXSPLTIDP as prefixed -- PR 104136

    If you compile module_advect_em.F90 with -Ofast -mcpu=power10, one module
    is large enough that we can't use a single conditional jump to span the
    function.  Instead, GCC has to reverse the condition, and do a conditional
    jump around an unconditional branch.  It turns out when xxspltiw and
    xxspltdp instructions were generated, they were not marked as being
    prefixed (i.e. length of 12 bytes instead of 4 bytes).  This meant the
    calculations for the branch length were off, which in turn meant the
    assembler raised an error because it couldn't do the conditional jump.

    The fix is to explicitly set the prefixed attribute when we are loading up
    vector constants with the xxspltiw or xxspltidp instructions.

    I have removed the code that sets the prefixed attribute for xxspltiw,
    xxspltidp, and xxsplti32dx instructions, since it no longer will be
invoked.

    I have also explicitly set the prefixed attribute for load SF and DF mode
    constants with xxsplitw and xxspltidp.  Previously, it was not set on these
    insns, but when the insn was split to get the XXSPLTIW/XXSPLTIDP forms,
those
    forms already had the prefixed attribute set.

    2022-01-21  Michael Meissner  <meiss...@the-meissners.org>

    gcc/
            PR target/104136
            * config/rs6000/rs6000-protos.h (prefixed_xxsplti_p): Delete.
            * config/rs6000/rs6000.cc (prefixed_xxsplti_p): Delete.
            * config/rs6000/rs6000.md (prefixed attribute): Delete section
            that sets the prefixed attribute for xxspltiw, xxspltidp, and
            xxsplti32dx instructions.
            (movsf_hardfloat): Explicitly set the prefixed attribute
            when xxspltiw and xxspltidp instructions are generated.
            (mov<mode>_hardfloat32): Likewise.
            (mov<mode>_hardfloat64): Likewise.
            * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Explicitly set the
            prefixed attribute for xxspltiw and xxspltidp instructions.
            (vsx_mov<mode>_32bit): Likewise.

Reply via email to