Hi all,

This obvious patch replaces yet another instance of manual swapping by 
std::swap.

Bootstrapped and tested on aarch64 and x86_64.
Applied to trunk with r226094.

Thanks,
Kyrill

2015-07-23  Kyrylo Tkachov  <kyrylo.tkac...@arm.com>

    * combine.c (try_combine): Use std::swap instead of manually
    swapping.

commit d0d5686b87bf842b46ba460a943ef7f826656968
Author: Kyrylo Tkachov <kyrylo.tkac...@arm.com>
Date:   Tue Jul 21 15:20:18 2015 +0100

    [combine][obvious] Use std::swap in try_combine

diff --git a/gcc/combine.c b/gcc/combine.c
index 2f806ab..e47cbc4 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -2730,11 +2730,11 @@ try_combine (rtx_insn *i3, rtx_insn *i2, rtx_insn *i1, rtx_insn *i0,
   /* If multiple insns feed into one of I2 or I3, they can be in any
      order.  To simplify the code below, reorder them in sequence.  */
   if (i0 && DF_INSN_LUID (i0) > DF_INSN_LUID (i2))
-    temp_insn = i2, i2 = i0, i0 = temp_insn;
+    std::swap (i0, i2);
   if (i0 && DF_INSN_LUID (i0) > DF_INSN_LUID (i1))
-    temp_insn = i1, i1 = i0, i0 = temp_insn;
+    std::swap (i0, i1);
   if (i1 && DF_INSN_LUID (i1) > DF_INSN_LUID (i2))
-    temp_insn = i1, i1 = i2, i2 = temp_insn;
+    std::swap (i1, i2);
 
   added_links_insn = 0;
 

Reply via email to