This is the mail archive of the
mailing list for the GCC project.
Re: [Patch, AArch64] Fix shuffle for big-endian.
- From: Tejas Belagod <tbelagod at arm dot com>
- To: Richard Henderson <rth at redhat dot com>, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>
- Cc: Alan Lawrence <Alan dot Lawrence at arm dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 22 Apr 2014 14:40:59 +0100
- Subject: Re: [Patch, AArch64] Fix shuffle for big-endian.
- Authentication-results: sourceware.org; auth=none
- References: <53077F31 dot 8070003 at arm dot com> <533078AC dot 3020307 at redhat dot com> <533C1BAB dot 1020509 at arm dot com> <533EADB6 dot 2060808 at arm dot com>
Alan Lawrence wrote:
Sorry to be pedantic again, but 'wierd' should be spelt 'weird'. Otherwise,
looks good to me and much neater than before. (Seems you'd rather keep the
re-enabling, here and in the testsuite, for another patch?)
Yes, the re-enabling is another patch.
Thanks for the typo correction. OK for trunk with that change?
Tejas Belagod wrote:
Richard Henderson wrote:
On 02/21/2014 08:30 AM, Tejas Belagod wrote:
+ /* If two vectors, we end up with a wierd mixed-endian mode on NEON. */
+ if (BYTES_BIG_ENDIAN)
+ if (!d->one_vector_p && d->perm[i] & nunits)
+ /* Extract the offset. */
+ elt = d->perm[i] & (nunits - 1);
+ /* Reverse the top half. */
+ elt = nunits - 1 - elt;
+ /* Offset it by the bottom half. */
+ elt += nunits;
+ elt = nunits - 1 - d->perm[i];
Isn't this just
elt = d->perm[i] ^ (nunits - 1);
all the time? I.e. invert the index within the word,
but leave the word index (nunits) unchanged.
Here is a revised patch. OK for stage-1?
2014-04-02 Tejas Belagod <firstname.lastname@example.org>
* config/aarch64/aarch64.c (aarch64_evpc_tbl): Reverse order of elements