summaryrefslogtreecommitdiff
path: root/gcc/gimple-match-head.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/gimple-match-head.c')
-rw-r--r--gcc/gimple-match-head.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/gcc/gimple-match-head.c b/gcc/gimple-match-head.c
index 86ba78bab80..7b1f1ace8f9 100644
--- a/gcc/gimple-match-head.c
+++ b/gcc/gimple-match-head.c
@@ -190,9 +190,7 @@ gimple_resimplify2 (gimple_seq *seq,
|| commutative_tree_code (*res_code))
&& tree_swap_operands_p (res_ops[0], res_ops[1], false))
{
- tree tem = res_ops[0];
- res_ops[0] = res_ops[1];
- res_ops[1] = tem;
+ std::swap (res_ops[0], res_ops[1]);
if (TREE_CODE_CLASS ((enum tree_code) *res_code) == tcc_comparison)
*res_code = swap_tree_comparison (*res_code);
canonicalized = true;
@@ -262,9 +260,7 @@ gimple_resimplify3 (gimple_seq *seq,
&& commutative_ternary_tree_code (*res_code)
&& tree_swap_operands_p (res_ops[0], res_ops[1], false))
{
- tree tem = res_ops[0];
- res_ops[0] = res_ops[1];
- res_ops[1] = tem;
+ std::swap (res_ops[0], res_ops[1]);
canonicalized = true;
}
@@ -427,9 +423,7 @@ gimple_simplify (enum tree_code code, tree type,
|| TREE_CODE_CLASS (code) == tcc_comparison)
&& tree_swap_operands_p (op0, op1, false))
{
- tree tem = op0;
- op0 = op1;
- op1 = tem;
+ std::swap (op0, op1);
if (TREE_CODE_CLASS (code) == tcc_comparison)
code = swap_tree_comparison (code);
}
@@ -462,11 +456,7 @@ gimple_simplify (enum tree_code code, tree type,
generation. */
if (commutative_ternary_tree_code (code)
&& tree_swap_operands_p (op0, op1, false))
- {
- tree tem = op0;
- op0 = op1;
- op1 = tem;
- }
+ std::swap (op0, op1);
code_helper rcode;
tree ops[3] = {};