[PATCH, rs6000] improve vec_ctf invalid parameter handling.
authorWill Schmidt <will_schmidt@vnet.ibm.com>
Fri, 23 Oct 2020 22:28:17 +0000 (17:28 -0500)
committerWill Schmidt <will_schmidt@vnet.ibm.com>
Fri, 29 Jan 2021 17:34:59 +0000 (11:34 -0600)
commit91a95ad2ae0e0f2fa953fafe55ff2ec32c8277d5
treef00a6fb4f2923d80c59fb17fd0370ce8ecd882b1
parent83bdc9f70347e6438822e719c30c3793c81df18e
[PATCH, rs6000] improve vec_ctf invalid parameter handling.

Hi,
  Per PR91903, GCC ICEs when we attempt to pass a variable
(or out of range value) into the vec_ctf() builtin.  Per
investigation, the parameter checking exists for this
builtin with the int types, but was missing for
the long long types. This problem also occurs for the
vec_cts() builtin, which is also fixed by this patch.

This patch adds the missing CODE_FOR_* entries to the
rs6000_expand_binup_builtin to cover that scenario.
This patch also updates some existing tests to remove
calls to vec_ctf() and vec_cts() that contain negative
values.

PR target/91903

2020-01-29  Will Schmidt  <will_schmidt@vnet.ibm.com>

gcc/ChangeLog:
* config/rs6000/rs6000-call.c (rs6000_expand_binup_builtin): Add
clauses for CODE_FOR_vsx_xvcvuxddp_scale and
CODE_FOR_vsx_xvcvsxddp_scale to the parameter checking code.

gcc/testsuite/ChangeLog:
* gcc.target/powerpc/pr91903.c: New test.
* gcc.target/powerpc/builtins-1.fold.h: Update.
* gcc.target/powerpc/builtins-2.c: Update.
gcc/config/rs6000/rs6000-call.c
gcc/testsuite/gcc.target/powerpc/builtins-1.fold.h
gcc/testsuite/gcc.target/powerpc/builtins-2.c
gcc/testsuite/gcc.target/powerpc/pr91903.c [new file with mode: 0644]