IBM Z: Fix error checking for builtin vec_permi
authorMarius Hillenbrand <mhillen@linux.ibm.com>
Tue, 4 May 2021 11:30:05 +0000 (13:30 +0200)
committerMarius Hillenbrand <mhillen@linux.ibm.com>
Thu, 6 May 2021 08:49:18 +0000 (10:49 +0200)
commit3c33c00f43bfe585d9414dfb620f0f518e55a457
tree5ac7fc2f15a9cc93cebf4d580e8e581963da30d5
parentad96c867e173c1ebcfc201b201adac5095683a08
IBM Z: Fix error checking for builtin vec_permi

The builtin vec_permi is peculiar in that its immediate operand is
encoded differently than the immediate operand that is backing the
builtin. This fixes the check for the immediate operand, adding a
regression test in the process.

This partially reverts commit 3191c1f4488d1f7563b563d7ae2a102a26f16d82

2021-05-06  Marius Hillenbrand  <mhillen@linux.ibm.com>

gcc/ChangeLog:

* config/s390/s390-builtins.def (O_M5, O1_M5, ...): Remove unused macros.
(s390_vec_permi_s64, s390_vec_permi_b64, s390_vec_permi_u64)
(s390_vec_permi_dbl, s390_vpdi): Use the O3_U2 type for the immediate
operand.
* config/s390/s390.c (s390_const_operand_ok): Remove unused
values.

gcc/testsuite/ChangeLog:

* gcc.target/s390/zvector/imm-range-error-1.c: Fix test for
__builtin_s390_vpdi.
* gcc.target/s390/zvector/vec-permi.c: New test for builtin
vec_permi.
gcc/config/s390/s390-builtins.def
gcc/config/s390/s390.c
gcc/testsuite/gcc.target/s390/zvector/imm-range-error-1.c
gcc/testsuite/gcc.target/s390/zvector/vec-permi.c [new file with mode: 0644]