]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
One-line tidy of bit-twiddle expression in aarch64.c
authorAlan Lawrence <alan.lawrence@arm.com>
Fri, 2 May 2014 15:11:04 +0000 (15:11 +0000)
committerAlan Lawrence <alalaw01@gcc.gnu.org>
Fri, 2 May 2014 15:11:04 +0000 (15:11 +0000)
* config/aarch64/aarch64.c (aarch64_expand_vec_perm_1): Tidy bit-flip
expression.

From-SVN: r210005

gcc/ChangeLog
gcc/config/aarch64/aarch64.c

index 817fb2629f41df23ca230de4e847554333543b78..69342ebbb91d24ae523f16e60e607333402ac753 100644 (file)
@@ -1,3 +1,8 @@
+2014-05-02  Alan Lawrence  <alan.lawrence@arm.com>
+
+       * config/aarch64/aarch64.c (aarch64_expand_vec_perm_1): Tidy bit-flip
+       expression.
+
 2014-05-02  Marek Polacek  <polacek@redhat.com>
 
        * doc/invoke.texi: Describe -fsanitize=float-divide-by-zero.
index 94e05bb5e3ff3182ee392adb0ff22dd8dc0cf7f9..8655f049ba4681942a524361ca0b436a227abf0e 100644 (file)
@@ -8180,8 +8180,9 @@ aarch64_expand_vec_perm_const_1 (struct expand_vec_perm_d *d)
       unsigned i, nelt = d->nelt;
       rtx x;
 
+      gcc_assert (nelt == (nelt & -nelt));
       for (i = 0; i < nelt; ++i)
-       d->perm[i] = (d->perm[i] + nelt) & (2 * nelt - 1);
+       d->perm[i] ^= nelt; /* Keep the same index, but in the other vector.  */
 
       x = d->op0;
       d->op0 = d->op1;