diff options
author | Stefan Schulze Frielinghaus <stefansf@gcc.gnu.org> | 2025-01-09 17:49:02 +0100 |
---|---|---|
committer | Stefan Schulze Frielinghaus <stefansf@gcc.gnu.org> | 2025-01-09 17:49:02 +0100 |
commit | 2f31819a0ac7b000fa3a456e5b068242e954edac (patch) | |
tree | d206cbbbc1c869347e152ff440c8930204fd8475 /gcc | |
parent | ca79349c050c27ff466735ba78d2e2bbce56ffdc (diff) | |
download | gcc-2f31819a0ac7b000fa3a456e5b068242e954edac.zip gcc-2f31819a0ac7b000fa3a456e5b068242e954edac.tar.gz gcc-2f31819a0ac7b000fa3a456e5b068242e954edac.tar.bz2 |
s390: Fix s390_constant_via_vgbm_p() [PR118362]
Optimization s390_constant_via_vgbm_p() should only apply to constant
vectors which can be expressed by the hardware, i.e., which have a size
of at most 16-bytes, similar as it is done for s390_constant_via_vgm_p()
and s390_constant_via_vrepi_p().
gcc/ChangeLog:
PR target/118362
* config/s390/s390.cc (s390_constant_via_vgbm_p): Allow at most
16-byte vectors.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/s390/s390.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/s390/s390.cc b/gcc/config/s390/s390.cc index 918a2cd..08acb69 100644 --- a/gcc/config/s390/s390.cc +++ b/gcc/config/s390/s390.cc @@ -2818,7 +2818,7 @@ s390_constant_via_vgbm_p (rtx op, unsigned *mask) unsigned tmp_mask = 0; int nunit, unit_size; - if (GET_CODE (op) == CONST_VECTOR) + if (GET_CODE (op) == CONST_VECTOR && GET_MODE_SIZE (GET_MODE (op)) <= 16) { if (GET_MODE_INNER (GET_MODE (op)) == TImode || GET_MODE_INNER (GET_MODE (op)) == TFmode) |