diff mbox series

[rs6000,9/9] Enable some additional combinations for builtin_vec_xst

Message ID 1527796792.15912.33.camel@brimstone.rchland.ibm.com
State New
Headers show
Series gimple folding of vector loads/stores + tests | expand

Commit Message

will schmidt May 31, 2018, 7:59 p.m. UTC
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.

Comments

Segher Boessenkool June 5, 2018, 7:13 p.m. UTC | #1
On Thu, May 31, 2018 at 02:59:52PM -0500, Will Schmidt wrote:
> 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.

	* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
	BUILTIN_VEC_XST entries for pointer to double and long long.

Okay for trunk.  Thanks!


Segher
diff mbox series

Patch

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 },