]> git.ipfire.org Git - thirdparty/gcc.git/commit
x86: Fix ix86_expand_vector_init for V*TImode [PR100887]
authorJakub Jelinek <jakub@redhat.com>
Fri, 4 Jun 2021 09:20:02 +0000 (11:20 +0200)
committerJakub Jelinek <jakub@redhat.com>
Fri, 4 Jun 2021 09:20:02 +0000 (11:20 +0200)
commitb7dd2e4eeb44bc8678ecde8a6c7401de85e63561
treecf544ef47edabc72f2243d560131be9e1f0fdcdf
parent3011f1046628d5ce5e6e5f8e917a6aea1385fdc3
x86: Fix ix86_expand_vector_init for V*TImode [PR100887]

We have vec_initv4tiv2ti and vec_initv2titi patterns which call
ix86_expand_vector_init and assume it works for those modes.  For the
case of construction from two half-sized vectors, the code assumes it
will always succeed, but we have only insn patterns with SImode and DImode
element types.  QImode and HImode element types are already handled
by performing it with same sized vectors with SImode elements and the
following patch extends that to V*TImode vectors.

2021-06-04  Jakub Jelinek  <jakub@redhat.com>

PR target/100887
* config/i386/i386-expand.c (ix86_expand_vector_init): Handle
concatenation from half-sized modes with TImode elements.

* gcc.target/i386/pr100887.c: New test.
gcc/config/i386/i386-expand.c
gcc/testsuite/gcc.target/i386/pr100887.c [new file with mode: 0644]