]> gcc.gnu.org Git - gcc.git/commit
PR94613: Fix vec_sel builtin for IBM Z
authorAndreas Krebbel <krebbel@linux.ibm.com>
Mon, 4 May 2020 08:43:02 +0000 (10:43 +0200)
committerJakub Jelinek <jakub@redhat.com>
Thu, 17 Sep 2020 15:40:15 +0000 (17:40 +0200)
commitb027538774a21691b2a560162a2134837846d41a
treefdc0e5de6eb9943b37e2501d1db105d53b524b0f
parent26eade0c4b0744c84f1e01c07602a6a8f6248ec7
PR94613: Fix vec_sel builtin for IBM Z

The vsel instruction is a bit-wise select instruction.  Using an
IF_THEN_ELSE to express it in RTL is wrong and leads to wrong code being
generated in the combine pass.

With the patch the pattern is written using bit operations.  However,
I've just noticed that the manual still demands a fixed point mode for
AND/IOR and friends although several targets emit bit ops on floating
point vectors (including i386, Power, and s390). So I assume this is a
safe thing to do?!

gcc/ChangeLog:

2020-05-04  Andreas Krebbel  <krebbel@linux.ibm.com>

Backport from mainline
2020-04-20  Andreas Krebbel  <krebbel@linux.ibm.com>

PR target/94613
* config/s390/s390-builtin-types.def: Add 3 new function modes.
* config/s390/s390-builtins.def: Add mode dependent low-level
builtin and map the overloaded builtins to these.
* config/s390/vx-builtins.md ("vec_selV_HW"): Rename to ...
("vsel<V_HW"): ... this and rewrite the pattern with bitops.

gcc/testsuite/ChangeLog:

2020-05-04  Andreas Krebbel  <krebbel@linux.ibm.com>

Backport from mainline
2020-04-20  Andreas Krebbel  <krebbel@linux.ibm.com>

PR target/94613
* gcc.target/s390/zvector/pr94613.c: New test.
* gcc.target/s390/zvector/vec_sel-1.c: New test.
gcc/ChangeLog
gcc/config/s390/s390-builtin-types.def
gcc/config/s390/s390-builtins.def
gcc/config/s390/vx-builtins.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/s390/zvector/pr94613.c [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/zvector/vec_sel-1.c [new file with mode: 0644]
This page took 0.064181 seconds and 6 git commands to generate.