On Wed, Jul 28, 2021 at 03:58:02PM -0500, Bill Schmidt wrote:
> On 7/27/21 4:07 PM, will schmidt wrote:
> >On Thu, 2021-06-17 at 10:19 -0500, Bill Schmidt via Gcc-patches wrote:
> >>+#ifdef _ARCH_PWR8
> >>+#define vec_vclz vec_cntlz
> >>+#define vec_vgbbd vec_gb
> >>+#define vec_vmrgew vec_mergee
> >>+#define vec_vmrgow vec_mergeo
> >>+#define vec_vpopcntu vec_popcnt
> >>+#define vec_vrld vec_rl
> >>+#define vec_vsld vec_sl
> >>+#define vec_vsrd vec_sr
> >>+#define vec_vsrad vec_sra
> >>+#endif
> >
> >Does anything bad happen if these are simply defined, without the
> >#ifdef/#endif protection?
> >I'm wondering if there is some scenario with
> >pragma GCC target "cpu=powerX" where we may want them defined
> >anyway.
> 
> Yes, you're right about that.  We could run into such problems, I 
> think.  I think it's best to always define these.  If the builtin isn't 
> supported for the specific target configuration, it'll be flagged during 
> the lookup process.
I don't think it will ever cause problems.  But yes, it certainly is not
the best place to do it here, and it is done elsewhere already, as you
say.

It does make a user-visible difference though: without the #if user code
using the name "vec_vgbbd" for some other purpose will stop working
(when building for older machines, it already will break on power8).
These aren't reserved names.  We don't really care though I guess ;-)


Segher

Reply via email to