[PATCH] rs6000, restrict bfloat convert intrinsic to Power 10. Fix BU_P10V macro definitions.
Fri Aug 14 21:33:03 GMT 2020
On Thu, Aug 13, 2020 at 09:12:48AM -0700, Carl Love wrote:
> The macro expansion for the bfloat convert intrinsics XVCVBF16SP and
> XVCVSPBF16 need to be restricted to P10.
> The following patch creates new macro expansions BU_P10V_VSX_# and
> BU_P10V_AV_# for the VSX and Altivec instructions respectively. The
> new names are consistent with the P8 and P9 naming convention for the
> VSX and Altivec instructions.
So _vsx if it is for all VSRs, but _altivec for just the VRs?
> The macro expansion for XVCVBF16SP and XVCVSPBF16 is changed from
> BU_VSX_1 to BU_P10V_VSX_1 to restrict it to P10 and beyond. Also MISC
> is changed to CONST in the macro expansion call.
The spelling of the xvcvbf16sp name will probably change, fwiw. So you
might want to wait before committing this (but changing it later is fine
> The side effect of creating the macro expansions for VSX and Altivec is
> it changes all of the expanded names. The patch fixes all the uses of
> the expanded names as needed for the new VSX and Altivec macros.
Do the names agree with the (future) documentation now?
> -#define BU_P10V_1(ENUM, NAME, ATTR, ICODE) \
> - RS6000_BUILTIN_1 (P10_BUILTIN_ ## ENUM, /* ENUM */ \
> - "__builtin_altivec_" NAME, /* NAME */ \
> +#define BU_P10V_VSX_1(ENUM, NAME, ATTR, ICODE) \
Hrm, this now says "V" (for vector) as well as "VSX" (for all 64 vector
regs allowed). One of those is superfluous.
> + RS6000_BUILTIN_1 (P10V_BUILTIN_ ## ENUM, /* ENUM */ \
So this enum name doesn't say it allows all 64 registers?
> + "__builtin_vsx_" NAME, /* NAME */ \
> /* Builtins for vector instructions added in ISA 3.1 (power10). */
> -BU_P10V_2 (VCLRLB, "vclrlb", CONST, vclrlb)
> +BU_P10V_AV_2 (VCLRLB, "vclrlb", CONST, vclrlb)
Maybe you should just keep "V" for insns using only the VRs (which you
call V_AV now), and do "VS" for those working on all VSRs (which you call
More information about the Gcc-patches