i386.c (output_387_binary_op): Use std::swap.
authorUros Bizjak <ubizjak@gmail.com>
Mon, 5 Jan 2015 22:08:07 +0000 (23:08 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Mon, 5 Jan 2015 22:08:07 +0000 (23:08 +0100)
* config/i386/i386.c (output_387_binary_op): Use std::swap.

From-SVN: r219204

gcc/ChangeLog
gcc/config/i386/i386.c

index aaa8cc843e524a604c31c4cae3ab0e6c7423d647..bf805fbf52d04a793de998440a76346aec082e3a 100644 (file)
@@ -1,3 +1,7 @@
+2015-01-05  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/i386/i386.c (output_387_binary_op): Use std::swap.
+
 2015-01-05  Oleg Endo  <olegendo@gcc.gnu.org>
 
        * rtlanal.c (refers_to_regno_p): Change return value from int to bool.
        * config/pa/predicates.md (reg_before_reload_operand): Tighten
        predicate to reject register index and LO_SUM DLT memory forms
        after reload.
-       
+
 2015-01-02  Sandra Loosemore  <sandra@codesourcery.com>
 
        * doc/invoke.texi (Option Summary): Fix spelling of
index 0e710713fbaefb2cd2911fe6ccfb95ab0f4f9583..dc2b7d808875d518123b3374030b9bf72c2fd832 100644 (file)
@@ -16414,11 +16414,7 @@ output_387_binary_op (rtx insn, rtx *operands)
     case MULT:
     case PLUS:
       if (REG_P (operands[2]) && REGNO (operands[0]) == REGNO (operands[2]))
-       {
-         rtx temp = operands[2];
-         operands[2] = operands[1];
-         operands[1] = temp;
-       }
+       std::swap (operands[1], operands[2]);
 
       /* know operands[0] == operands[1].  */