IBM Z: Fix vcond-shift.c testcase.
commite99b25df68d4528141f6079e1e3af8ef20bbcb00
authorAndreas Krebbel <krebbel@linux.ibm.com>
Mon, 8 Mar 2021 11:49:22 +0000 (8 12:49 +0100)
committerAndreas Krebbel <krebbel@linux.ibm.com>
Mon, 8 Mar 2021 11:49:36 +0000 (8 12:49 +0100)
tree87695d5df61ee32b16c4c06d151d00a88c12b9e9
parentb48d76c4e6bd3b88f23979ede4ff12f875e0ad60
IBM Z: Fix vcond-shift.c testcase.

Due to a common code change the comparison in the testcase is emitted
via vec_cmp instead of vcond.  The testcase checks for an optimization
currently only available via vcond.

Fixed by implementing the same optimization also in
s390_expand_vec_compare.

gcc/ChangeLog:

* config/s390/s390.c (s390_expand_vec_compare): Implement <0
comparison with arithmetic right shift.
(s390_expand_vcond): No need for a force_reg anymore.
s390_vec_compare will do it.
* config/s390/vector.md ("vec_cmp<mode><tointvec>"): Accept also
immediate operands.
gcc/config/s390/s390.c
gcc/config/s390/vector.md