This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, rs6000 9/9] Enable some additional combinations for builtin_vec_xst
- From: Will Schmidt <will_schmidt at vnet dot ibm dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>, David Edelsohn <dje dot gcc at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 31 May 2018 14:59:52 -0500
- Subject: [PATCH, rs6000 9/9] Enable some additional combinations for builtin_vec_xst
- References: <1527794851.6620.20.camel@brimstone.rchland.ibm.com>
- Reply-to: will_schmidt at vnet dot ibm dot com
Hi,
Enable some variations of the _builtin_vec_xst() instrinsic.
For most data types (char,short,int,...) the _builtin_vec_xst() intrinsic
accepts either a pointer to <type>, or a pointer to a vector of elements of
<type>. We currently do not accept pointer-to-type for the long long or
double data types.
This adds the combinations to accept *double and both signed and unsigned
*long long for the instrinsic.
Testcases coverage is provided by the fold-vec-load-* and fold-vec-store-*
series of tests, posted separately.
Regtest is clean across P6-P9 Linux platforms.
OK for trunk?
Thanks,
-Will
[gcc]
2018-05-31 Will Schmidt <will_schmidt@vnet.ibm.com>
* config/rs6000/rs6000-c.c: Add BUILTIN_VEC_XST entries for *double
and *long long.
diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c
index 98a812e..61ff4e2 100644
--- a/gcc/config/rs6000/rs6000-c.c
+++ b/gcc/config/rs6000/rs6000-c.c
@@ -4079,13 +4079,19 @@ const struct altivec_builtin_types altivec_overloaded_builtins[] = {
RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI },
{ ALTIVEC_BUILTIN_VEC_STVRXL, ALTIVEC_BUILTIN_STVRXL,
RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI },
{ VSX_BUILTIN_VEC_XST, VSX_BUILTIN_STXVD2X_V2DF,
RS6000_BTI_void, RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_V2DF },
+ { VSX_BUILTIN_VEC_XST, VSX_BUILTIN_STXVD2X_V2DF,
+ RS6000_BTI_void, RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_double },
{ VSX_BUILTIN_VEC_XST, VSX_BUILTIN_STXVD2X_V2DI,
RS6000_BTI_void, RS6000_BTI_V2DI, RS6000_BTI_INTSI, ~RS6000_BTI_V2DI },
{ VSX_BUILTIN_VEC_XST, VSX_BUILTIN_STXVD2X_V2DI,
+ RS6000_BTI_void, RS6000_BTI_V2DI, RS6000_BTI_INTSI, ~RS6000_BTI_long_long },
+ { VSX_BUILTIN_VEC_XST, VSX_BUILTIN_STXVD2X_V2DI, RS6000_BTI_void,
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_long_long },
+ { VSX_BUILTIN_VEC_XST, VSX_BUILTIN_STXVD2X_V2DI,
RS6000_BTI_void, RS6000_BTI_unsigned_V2DI, RS6000_BTI_INTSI,
~RS6000_BTI_unsigned_V2DI },
{ VSX_BUILTIN_VEC_XST, VSX_BUILTIN_STXVD2X_V2DI,
RS6000_BTI_void, RS6000_BTI_bool_V2DI, RS6000_BTI_INTSI,
~RS6000_BTI_bool_V2DI },