This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, rs6000] Fix vec_xl and vec_xst intrinsics for P8
- From: Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, David Edelsohn <dje dot gcc at gmail dot com>
- Date: Tue, 9 May 2017 13:44:35 -0500
- Subject: Re: [PATCH, rs6000] Fix vec_xl and vec_xst intrinsics for P8
- Authentication-results: sourceware.org; auth=none
- References: <cfbb608f-43e1-d6d5-9ad7-4a764ecd9146@linux.vnet.ibm.com> <20170509145856.GT19687@gate.crashing.org>
On May 9, 2017, at 9:58 AM, Segher Boessenkool <segher@kernel.crashing.org> wrote:
>
> Hi!
>
> On Thu, May 04, 2017 at 04:35:10PM -0500, Bill Schmidt wrote:
>> In an earlier patch, I changed vec_xl and vec_xst to make use of new
>> POWER9 instructions when loading or storing vector short/char values.
>> In so doing, I failed to enable the existing instruction use for
>> -mcpu=power8, so these were no longer considered valid by the compiler.
>> Not good.
>>
>> This patch fixes the problem by using other existing built-in definitions
>> when the POWER9 instructions are not available. I've added a test case
>> to improve coverage and demonstrate that the problem is fixed.
>>
>> Bootstrapped and tested on powerpc64le-unknown-linux-gnu with no
>> regressions. Is this ok for trunk?
>
> Yes, thanks! One nit:
>
>> --- gcc/config/rs6000/rs6000.c (revision 247560)
>> +++ gcc/config/rs6000/rs6000.c (working copy)
>> @@ -18183,6 +18183,17 @@ altivec_init_builtins (void)
>> def_builtin ("__builtin_vsx_st_elemrev_v16qi",
>> void_ftype_v16qi_long_pvoid, VSX_BUILTIN_ST_ELEMREV_V16QI);
>> }
>> + else
>> + {
>> + rs6000_builtin_decls[(int)VSX_BUILTIN_LD_ELEMREV_V8HI]
>> + = rs6000_builtin_decls[(int)VSX_BUILTIN_LXVW4X_V8HI];
>
> There should be a space after the cast operators.
OK, will fix. Thanks for the review!
I forgot to ask -- this fix is needed for GCC 6 and 7 as well. Is this ok for backport
after the usual burn-in?
Thanks,
Bill
>
>
> Segher
>