[PATCH, rs6000] optimization for vec_reve builtin [PR100868]

HAO CHEN GUI guihaoc@linux.ibm.com
Tue Nov 23 08:38:04 GMT 2021

Thanks for your review. Committed as r12-5463.

On 22/11/2021 上午 10:56, David Edelsohn wrote:
> On Wed, Nov 17, 2021 at 3:28 AM HAO CHEN GUI <guihaoc@linux.ibm.com> wrote:
>> Hi,
>>   The patch optimized for vec_reve builtin on rs6000. For V2DI and V2DF, it is implemented by xxswapd on all targets. For V16QI, V8HI, V4SI and V4SF, it is implemented by quadword byte reverse plus halfword/word byte reverse when p9_vector is set.
>>   Bootstrapped and tested on powerpc64le-linux with no regressions. Is this okay for trunk? Any recommendations? Thanks a lot.
>> ChangeLog
>> 2021-11-17 Haochen Gui <guihaoc@linux.ibm.com>
>> gcc/
>>         * config/rs6000/altivec.md (altivec_vreve<mode>2 for VEC_K): Use
>>         xxbrq for v16qi, xxbrq + xxbrh for v8hi and xxbrq + xxbrw for v4si
>>         or v4sf when p9_vector is set.
>>         (altivec_vreve<mode>2 for VEC_64): Defined. Implemented by xxswapd.
>> gcc/testsuite/
>>         * gcc.target/powerpc/vec_reve_1.c: New test.
>>         * gcc.target/powerpc/vec_reve_2.c: Likewise.
> This is okay.
> Please don't send a message that contains the patch as both an inline
> message and as an attachment.
> Thanks, David

More information about the Gcc-patches mailing list