]> git.ipfire.org Git - thirdparty/gcc.git/commit
S/390: Fix the vec_xl / vec_xst style builtins
authorkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Feb 2019 15:53:38 +0000 (15:53 +0000)
committerkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Feb 2019 15:53:38 +0000 (15:53 +0000)
commit8c0752a66e81ec8376bea80ad01bc6296dd0d842
tree0c1bc7a4b0330764d1b62101bf30f683cf0e7de2
parentbb8389e1f0d0058fad0fdeb3f6e49abcde13d31b
S/390: Fix the vec_xl / vec_xst style builtins

This patch fixes several problems with the vec_xl/vec_xst builtins:

- vec_xl/vec_xst needs to use the alignment of the scalar memory
  operand for the vector type reference. This is required to emit the
  proper vl/vst alignment hints.
- vec_xl / vec_xld2 / vec_xlw4 should accept const pointer source operands
- vec_xlw4 / vec_xstw4 needs to accept float memory operands

gcc/ChangeLog:

2019-02-07  Andreas Krebbel  <krebbel@linux.ibm.com>

* config/s390/s390-builtin-types.def: Add new types.
* config/s390/s390-builtins.def: (s390_vec_xl, s390_vec_xld2)
(s390_vec_xlw4): Make the memory operand into a const pointer.
(s390_vec_xld2, s390_vec_xlw4): Add a variant for single precision
float.
* config/s390/s390-c.c (s390_expand_overloaded_builtin): Generate
a new vector type with the alignment of the scalar memory operand.

gcc/testsuite/ChangeLog:

2019-02-07  Andreas Krebbel  <krebbel@linux.ibm.com>

* gcc.target/s390/zvector/xl-xst-align-1.c: New test.
* gcc.target/s390/zvector/xl-xst-align-2.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268651 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/s390/s390-builtin-types.def
gcc/config/s390/s390-builtins.def
gcc/config/s390/s390-c.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/s390/zvector/xl-xst-align-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/zvector/xl-xst-align-2.c [new file with mode: 0644]