Commit cb5c6c29 by Kyrylo Tkachov Committed by Kyrylo Tkachov

[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
parent bd95e655
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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment