From 4c278134e827782a06c73b5e9c72a6b724e1a58b Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 3 Dec 2014 21:35:45 +0100 Subject: [PATCH] * expmed.c (expand_mult): Use std::swap. From-SVN: r218332 --- gcc/ChangeLog | 2 ++ gcc/expmed.c | 6 +----- 2 files changed, 3 insertions(+), 5 deletions(-) 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. */ -- 2.30.2