Fix internal error with vectorization on SPARC
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 10 May 2022 07:33:16 +0000 (09:33 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Tue, 10 May 2022 07:40:35 +0000 (09:40 +0200)
commitb931d0cfd33fec6ffc259b1be5c832144b4e7bea
tree77eeff91a2d7abd8143c8c7c4a53b1115ae7376e
parent6d7d4f59c3f35202805b2963d0b94f2f3d34ccf0
Fix internal error with vectorization on SPARC

This is a regression present since the 10.x series, but the underlying issue
has been there since the TARGET_VEC_PERM_CONST hook was implemented, in the
form of an ICE when expanding a constant VEC_PERM_EXPR in V4QI, while the
back-end only supports V8QI constant VEC_PERM_EXPRs.

gcc/
PR target/105292
* config/sparc/sparc.cc (sparc_vectorize_vec_perm_const): Return
true only for 8-byte vector modes.

gcc/testsuite/
* gcc.target/sparc/20220510-1.c: New test.
gcc/config/sparc/sparc.cc
gcc/testsuite/gcc.target/sparc/20220510-1.c [new file with mode: 0644]