diff options
author | Kyrylo Tkachov <kyrylo.tkachov@arm.com> | 2015-06-19 11:05:02 +0000 |
---|---|---|
committer | Kyrylo Tkachov <ktkachov@gcc.gnu.org> | 2015-06-19 11:05:02 +0000 |
commit | 3fc4f5cd9345bf1fcf348fa46afccde67dbd398d (patch) | |
tree | 5a502525ac07d82fc75ed4de86c0cf9029b28561 /gcc | |
parent | 97d39d4133a547136c9831b743e6f96a29494610 (diff) | |
download | gcc-3fc4f5cd9345bf1fcf348fa46afccde67dbd398d.zip gcc-3fc4f5cd9345bf1fcf348fa46afccde67dbd398d.tar.gz gcc-3fc4f5cd9345bf1fcf348fa46afccde67dbd398d.tar.bz2 |
[i386][obvious] Use std::swap instead of manually swapping in a couple of places
* config/i386/i386.c (ix86_function_versions): Use std::swap instead
of manually swapping.
(expand_vec_perm_interleave2): Likewise.
From-SVN: r224647
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 8 |
2 files changed, 8 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e567ed0..bd9b856 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-06-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com> + + * config/i386/i386.c (ix86_function_versions): Use std::swap instead + of manually swapping. + (expand_vec_perm_interleave2): Likewise. + 2015-06-19 Ilya Enkovich <enkovich.gnu@gmail.com> * tree-chkp.c (chkp_compute_bounds_for_assignment): Don't diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index bd548a9..24fccfc 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -34971,9 +34971,7 @@ ix86_function_versions (tree fn1, tree fn2) { if (attr2 != NULL_TREE) { - tree tem = fn1; - fn1 = fn2; - fn2 = tem; + std::swap (fn1, fn2); attr1 = attr2; } error_at (DECL_SOURCE_LOCATION (fn2), @@ -47990,9 +47988,7 @@ expand_vec_perm_interleave2 (struct expand_vec_perm_d *d) { /* Attempt to increase the likelihood that dfinal shuffle will be intra-lane. */ - char tmph = nonzero_halves[0]; - nonzero_halves[0] = nonzero_halves[1]; - nonzero_halves[1] = tmph; + std::swap (nonzero_halves[0], nonzero_halves[1]); } /* vperm2f128 or vperm2i128. */ |