[AArch64] Use std::swap instead of manually swapping
* config/aarch64/aarch64.c (aarch64_evpc_ext): Use std::swap instead of manual swapping implementation. (aarch64_expand_vec_perm_const_1): Likewise. From-SVN: r220402
This commit is contained in:
parent
bd95e65526
commit
cb5c6c29bd
@ -1,3 +1,9 @@
|
||||
2015-02-04 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
|
||||
|
||||
* config/aarch64/aarch64.c (aarch64_evpc_ext): Use std::swap instead
|
||||
of manual swapping implementation.
|
||||
(aarch64_expand_vec_perm_const_1): Likewise.
|
||||
|
||||
2015-02-04 James Greenhalgh <james.greenhalgh@arm.com>
|
||||
|
||||
* config/aarch64/aarch64.c (NAMED_PARAM): Delete it.
|
||||
|
@ -9832,9 +9832,7 @@ aarch64_evpc_ext (struct expand_vec_perm_d *d)
|
||||
/* After setup, we want the high elements of the first vector (stored
|
||||
at the LSB end of the register), and the low elements of the second
|
||||
vector (stored at the MSB end of the register). So swap. */
|
||||
rtx temp = d->op0;
|
||||
d->op0 = d->op1;
|
||||
d->op1 = temp;
|
||||
std::swap (d->op0, d->op1);
|
||||
/* location != 0 (above), so safe to assume (nelt - location) < nelt. */
|
||||
location = nelt - location;
|
||||
}
|
||||
@ -10005,15 +10003,12 @@ aarch64_expand_vec_perm_const_1 (struct expand_vec_perm_d *d)
|
||||
if (d->perm[0] >= d->nelt)
|
||||
{
|
||||
unsigned i, nelt = d->nelt;
|
||||
rtx x;
|
||||
|
||||
gcc_assert (nelt == (nelt & -nelt));
|
||||
for (i = 0; i < nelt; ++i)
|
||||
d->perm[i] ^= nelt; /* Keep the same index, but in the other vector. */
|
||||
|
||||
x = d->op0;
|
||||
d->op0 = d->op1;
|
||||
d->op1 = x;
|
||||
std::swap (d->op0, d->op1);
|
||||
}
|
||||
|
||||
if (TARGET_SIMD)
|
||||
|
Loading…
Reference in New Issue
Block a user