Mark XXSPLTIW/XXSPLTIDP as prefixed -- PR 104136
commitf9063d12633c62a089115df032a19295854d8b06
authorMichael Meissner <meissner@linux.ibm.com>
Fri, 21 Jan 2022 23:08:50 +0000 (21 18:08 -0500)
committerMichael Meissner <meissner@linux.ibm.com>
Fri, 21 Jan 2022 23:08:50 +0000 (21 18:08 -0500)
tree3d00c208968cb597c0aae91874b4b12ed0ff1821
parent60953a23d57b13a672f751bec0c6eefc059eb1ab
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  <meissner@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.
gcc/config/rs6000/rs6000-protos.h
gcc/config/rs6000/rs6000.cc
gcc/config/rs6000/rs6000.md
gcc/config/rs6000/vsx.md