diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2017-10-12 16:46:45 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2017-10-12 16:46:45 +0200 |
commit | 7159f19c1d94f5fd8bb3a43c87745f019ee090e2 (patch) | |
tree | e2aca03bed9b05d2ae00550912e7e10211f08314 /gcc/config/alpha | |
parent | 939cf90f620b91441180aacb7a3c290f1a53aa10 (diff) | |
download | gcc-7159f19c1d94f5fd8bb3a43c87745f019ee090e2.zip gcc-7159f19c1d94f5fd8bb3a43c87745f019ee090e2.tar.gz gcc-7159f19c1d94f5fd8bb3a43c87745f019ee090e2.tar.bz2 |
alpha.c (alpha_split_conditional_move): Use std::swap instead of manually swapping.
* config/alpha/alpha.c (alpha_split_conditional_move):
Use std::swap instead of manually swapping.
(alpha_stdarg_optimize_hook): Ditto.
(alpha_canonicalize_comparison): Ditto.
From-SVN: r253681
Diffstat (limited to 'gcc/config/alpha')
-rw-r--r-- | gcc/config/alpha/alpha.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index 41f3e3a..ece8879 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -2910,8 +2910,8 @@ alpha_split_conditional_move (enum rtx_code code, rtx dest, rtx cond, || (code == GE || code == GT)) { code = reverse_condition (code); - diff = t, t = f, f = diff; - diff = t - f; + std::swap (t, f); + diff = -diff; } subtarget = target = dest; @@ -6078,10 +6078,8 @@ alpha_stdarg_optimize_hook (struct stdarg_info *si, const gimple *stmt) else if (code2 == COMPONENT_REF && (code1 == MINUS_EXPR || code1 == PLUS_EXPR)) { - gimple *tem = arg1_stmt; + std::swap (arg1_stmt, arg2_stmt); code2 = code1; - arg1_stmt = arg2_stmt; - arg2_stmt = tem; } else goto escapes; @@ -9831,9 +9829,7 @@ alpha_canonicalize_comparison (int *code, rtx *op0, rtx *op1, && (*code == GE || *code == GT || *code == GEU || *code == GTU) && (REG_P (*op1) || *op1 == const0_rtx)) { - rtx tem = *op0; - *op0 = *op1; - *op1 = tem; + std::swap (*op0, *op1); *code = (int)swap_condition ((enum rtx_code)*code); } |