]> git.ipfire.org Git - thirdparty/gcc.git/commit
IBM Z: Fix ICE in expand_perm_as_replicate
authorAndreas Krebbel <krebbel@linux.ibm.com>
Mon, 10 Jun 2024 07:09:10 +0000 (09:09 +0200)
committerAndreas Krebbel <krebbel@linux.ibm.com>
Mon, 10 Jun 2024 07:55:49 +0000 (09:55 +0200)
commit21fd8c67ad297212e3cb885883cc8df8611f3040
tree1b0d09286afc780de734d23cc6d74c3f52d13a3f
parent48d6d8c9e91018a625a797d50ac4def88376a515
IBM Z: Fix ICE in expand_perm_as_replicate

The current implementation assumes to always be invoked with register
operands. For memory operands we even have an instruction
though (vlrep). With the patch we try this first and only if it fails
force the input into a register and continue.

vec_splats generation fails for single element 128bit types which are
allowed for vec_splat. This is something to sort out with another
patch I guess.

gcc/ChangeLog:

* config/s390/s390.cc (expand_perm_as_replicate): Handle memory
operands.
* config/s390/vx-builtins.md (vec_splats<mode>): Turn into parameterized expander.
(@vec_splats<mode>): New expander.

gcc/testsuite/ChangeLog:

* g++.dg/torture/vshuf-mem.C: New test.
gcc/config/s390/s390.cc
gcc/config/s390/vx-builtins.md
gcc/testsuite/g++.dg/torture/vshuf-mem.C [new file with mode: 0644]