On Mon, Oct 31, 2016 at 05:28:42PM -0500, Bill Schmidt wrote:
> The PowerPC back end loses performance on vector intrinsics, because currently
> all of them are treated as calls throughout the middle-end phases and only
> expanded when they reach RTL.  Our version of altivec.h currently defines the
> public names of overloaded functions (like vec_add) to be #defines for hidden
> functions (like __builtin_vec_add), which are recognized in the parser as 
> requiring special back-end support.  Tables in rs6000-c.c handle dispatch of
> the overloaded functions to specific function calls appropriate to the 
> argument
> types.

This doesn't look very nice.  If all you care is that the builtins like
__builtin_altivec_vaddubm etc. that __builtin_vec_add overloads into fold
into generic vector operations under certain conditions, just fold those
into whatever you want in targetm.gimple_fold_builtin (gsi).

        Jakub

Reply via email to