* expmed.c (expand_mult): Use std::swap.
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 3 Dec 2014 20:35:45 +0000 (20:35 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 3 Dec 2014 20:35:45 +0000 (20:35 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218332 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/expmed.c

index aa2f958..91613c8 100644 (file)
@@ -1,5 +1,7 @@
 2014-12-03  Jakub Jelinek  <jakub@redhat.com>
 
+       * expmed.c (expand_mult): Use std::swap.
+
        PR c/59708
        * expmed.c (expand_widening_mult): Return const0_rtx if
        coeff is 0.
index 708f04f..0970a22 100644 (file)
@@ -3087,11 +3087,7 @@ expand_mult (machine_mode mode, rtx op0, rtx op1, rtx target,
   bool do_trapv = flag_trapv && SCALAR_INT_MODE_P (mode) && !unsignedp;
 
   if (CONSTANT_P (op0))
-    {
-      rtx temp = op0;
-      op0 = op1;
-      op1 = temp;
-    }
+    std::swap (op0, op1);
 
   /* For vectors, there are several simplifications that can be made if
      all elements of the vector constant are identical.  */