rs6000: Convert the vector set variable idx to DImode [PR98914]
authorXionghu Luo <luoxhu@linux.ibm.com>
Mon, 22 Mar 2021 02:14:02 +0000 (21:14 -0500)
committerXionghu Luo <luoxhu@linux.ibm.com>
Mon, 22 Mar 2021 02:14:02 +0000 (21:14 -0500)
commitd0a5e8e1a84bdd6ce915c3be65da8af2552cd49e
treee7d7ffa8c5668e9a67e3061d342a08cd66288250
parentd2de43b775a0bfe941584bb2650157005a7536cc
rs6000: Convert the vector set variable idx to DImode [PR98914]

vec_insert defines the element argument type to be signed int by ELFv2
ABI.  When expanding a vector with a variable rtx, convert the rtx type
to DImode to support both intrinsic usage and other callers from
rs6000_expand_vector_init produced by v[k] = val when k is long type.

gcc/ChangeLog:

2021-03-21  Xionghu Luo  <luoxhu@linux.ibm.com>

PR target/98914
* config/rs6000/rs6000.c (rs6000_expand_vector_set_var_p9):
Convert idx to DImode.
(rs6000_expand_vector_set_var_p8): Likewise.

gcc/testsuite/ChangeLog:

2021-03-21  Xionghu Luo  <luoxhu@linux.ibm.com>

PR target/98914
* gcc.target/powerpc/pr98914.c: New test.
gcc/config/rs6000/rs6000.c
gcc/testsuite/gcc.target/powerpc/pr98914.c [new file with mode: 0644]