Commit 3f3f5af0 by Uros Bizjak Committed by Uros Bizjak

alpha.c (alpha_emit_conditional_branch): Replace open-coded swap with std::swap to swap values.

	* config/alpha/alpha.c (alpha_emit_conditional_branch): Replace
	open-coded swap with std::swap to swap values.
	(alpha_emit_setcc): Ditto.
	(alpha_emit_conditional_move): Ditto.
	(alpha_split_tmode_pair): Ditto.

From-SVN: r217360
parent af4c011e
2014-11-11 Uros Bizjak <ubizjak@gmail.com>
* config/alpha/alpha.c (alpha_emit_conditional_branch): Replace
open-coded swap with std::swap to swap values.
(alpha_emit_setcc): Ditto.
(alpha_emit_conditional_move): Ditto.
(alpha_split_tmode_pair): Ditto.
2014-11-11 Evgeny Stupachenko <evstupac@gmail.com> 2014-11-11 Evgeny Stupachenko <evstupac@gmail.com>
* tree-vect-data-refs.c (vect_shift_permute_load_chain): Extend shift * tree-vect-data-refs.c (vect_shift_permute_load_chain): Extend shift
...@@ -2545,7 +2545,7 @@ alpha_emit_conditional_branch (rtx operands[], machine_mode cmp_mode) ...@@ -2545,7 +2545,7 @@ alpha_emit_conditional_branch (rtx operands[], machine_mode cmp_mode)
{ {
cmp_code = swap_condition (code); cmp_code = swap_condition (code);
branch_code = NE; branch_code = NE;
tem = op0, op0 = op1, op1 = tem; std::swap (op0, op1);
} }
else else
{ {
...@@ -2569,7 +2569,7 @@ alpha_emit_conditional_branch (rtx operands[], machine_mode cmp_mode) ...@@ -2569,7 +2569,7 @@ alpha_emit_conditional_branch (rtx operands[], machine_mode cmp_mode)
else if (op0 == CONST0_RTX (DFmode)) else if (op0 == CONST0_RTX (DFmode))
{ {
/* Undo the swap we probably did just above. */ /* Undo the swap we probably did just above. */
tem = op0, op0 = op1, op1 = tem; std::swap (op0, op1);
branch_code = swap_condition (cmp_code); branch_code = swap_condition (cmp_code);
cmp_code = UNKNOWN; cmp_code = UNKNOWN;
} }
...@@ -2689,7 +2689,7 @@ alpha_emit_setcc (rtx operands[], machine_mode cmp_mode) ...@@ -2689,7 +2689,7 @@ alpha_emit_setcc (rtx operands[], machine_mode cmp_mode)
code = swap_condition (code); code = swap_condition (code);
if (cmp_mode == DFmode) if (cmp_mode == DFmode)
cmp_code = code, code = NE; cmp_code = code, code = NE;
tmp = op0, op0 = op1, op1 = tmp; std::swap (op0, op1);
break; break;
default: default:
...@@ -2786,7 +2786,7 @@ alpha_emit_conditional_move (rtx cmp, machine_mode mode) ...@@ -2786,7 +2786,7 @@ alpha_emit_conditional_move (rtx cmp, machine_mode mode)
{ {
cmp_code = swap_condition (code); cmp_code = swap_condition (code);
code = NE; code = NE;
tem = op0, op0 = op1, op1 = tem; std::swap (op0, op1);
} }
break; break;
...@@ -2857,7 +2857,7 @@ alpha_emit_conditional_move (rtx cmp, machine_mode mode) ...@@ -2857,7 +2857,7 @@ alpha_emit_conditional_move (rtx cmp, machine_mode mode)
if (cmp_mode == DImode && op1 == const0_rtx) if (cmp_mode == DImode && op1 == const0_rtx)
break; break;
code = swap_condition (code); code = swap_condition (code);
tem = op0, op0 = op1, op1 = tem; std::swap (op0, op1);
break; break;
default: default:
...@@ -3318,9 +3318,8 @@ alpha_split_tmode_pair (rtx operands[4], machine_mode mode, ...@@ -3318,9 +3318,8 @@ alpha_split_tmode_pair (rtx operands[4], machine_mode mode,
if (fixup_overlap && reg_overlap_mentioned_p (operands[0], operands[3])) if (fixup_overlap && reg_overlap_mentioned_p (operands[0], operands[3]))
{ {
rtx tmp; std::swap (operands[0], operands[1]);
tmp = operands[0], operands[0] = operands[1], operands[1] = tmp; std::swap (operands[2], operands[3]);
tmp = operands[2], operands[2] = operands[3], operands[3] = tmp;
} }
} }
......
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