This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH AARCH64] One-line tidy of bit-twiddle expression in aarch64.c

Whilst I agree with Richard H that it is obvious, my feeling is that the assertion does no harm, so have committed rev 210005 with Richard E's changes.


Richard Henderson wrote:
On 04/29/2014 05:42 AM, Richard Earnshaw wrote:
On 23/04/14 16:20, Alan Lawrence wrote:
This patch is a small tidy of a more-complicated expression that just flips a single bit and can thus be a simple XOR.

No regressions on aarch64-none-elf or aarch64_be-none-elf. (I've verified code is indeed exercised by dg-torture.exp vshuf-v*.c).

Also ok after applying TBL and testsuite patches in and

2014-04-23  Alan Lawrence  <>

	* config/aarch64/aarch64.c (aarch64_expand_vec_perm_1): tidy bit-flip expression.


It's not obvious from your description (or from the code, for that
matter) that for this to be valid nelt must be a power of 2.

I suggest that, above the loop, you put

	gcc_assert (nelt == (nelt & -nelt));

OK with those changes.

I think it's sort of obvious from context that we're working with a vector.
And it also seems obvious that we won't have a vector without a power-of-two
number of elements.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]