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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |luoxhu at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So, with -O1 -mvsx we ICE on
typedef int V __attribute__ ((vector_size (16)));

V
foo (V x, int y, int z)
{
  x[z] = y;
  return x;
}
because rs6000_expand_vector_set assumes that if !VECTOR_MEM_VSX_P (mode), then
the index must be CONST_INT.
With -O1 -mvsx -mcpu=power9 it ICEs elsewhere instead:
pr98065.c:8:1: error: unrecognizable insn:
    8 | }
      | ^
(insn 10 9 11 2 (set (reg:V4SI 123)
        (unspec:V4SI [
                (reg:V4SI 123)
                (reg:SI 125)
                (subreg/s/u:SI (reg/v:DI 122 [ z ]) 0)
            ] UNSPEC_VSX_SET)) "pr98065.c":6:8 -1
     (nil))
during RTL pass: vregs
pr98065.c:8:1: internal compiler error: in extract_insn, at recog.c:2769

The vsx_set_<mode>_p9 assume that the index is again CONST_INT, fits into
QImode and has also limited range based on how many elts the vector has.

Reply via email to