s390x: Fix vec_xl/vec_xst type aliasing [PR114676]
commit42189f21b22c43ac8ab46edf5f6a7b4d99bc86a5
authorAndreas Krebbel <krebbel@linux.ibm.com>
Tue, 23 Apr 2024 08:05:46 +0000 (23 10:05 +0200)
committerAndreas Krebbel <krebbel@linux.ibm.com>
Tue, 23 Apr 2024 08:05:56 +0000 (23 10:05 +0200)
treef4bc379161e2d6f81c7d6e77a95449775ecfebbc
parentaa73eb97a1e3c84564fa71158d09f9c5582c4d2e
s390x: Fix vec_xl/vec_xst type aliasing [PR114676]

The requirements of the vec_xl/vec_xst intrinsincs wrt aliasing of the
pointer argument are not really documented.  As it turns out, users
are likely to get it wrong.  With this patch we let the pointer
argument alias everything in order to make it more robust for users.

gcc/ChangeLog:

PR target/114676
* config/s390/s390-c.cc (s390_expand_overloaded_builtin): Use a
MEM_REF with an addend of type ptr_type_node.

gcc/testsuite/ChangeLog:

PR target/114676
* gcc.target/s390/zvector/pr114676.c: New test.

Suggested-by: Jakub Jelinek <jakub@redhat.com>
gcc/config/s390/s390-c.cc
gcc/testsuite/gcc.target/s390/zvector/pr114676.c [new file with mode: 0644]