From: Jakub Jelinek Date: Wed, 3 Dec 2014 20:35:45 +0000 (+0100) Subject: * expmed.c (expand_mult): Use std::swap. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4c278134e827782a06c73b5e9c72a6b724e1a58b;p=gcc.git * expmed.c (expand_mult): Use std::swap. From-SVN: r218332 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index aa2f9589e5f..91613c837b2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,7 @@ 2014-12-03 Jakub Jelinek + * expmed.c (expand_mult): Use std::swap. + PR c/59708 * expmed.c (expand_widening_mult): Return const0_rtx if coeff is 0. diff --git a/gcc/expmed.c b/gcc/expmed.c index 708f04f11c5..0970a22b946 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -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. */