* expmed.c (expand_mult): Use std::swap.

From-SVN: r218332
This commit is contained in:
Jakub Jelinek 2014-12-03 21:35:45 +01:00 committed by Jakub Jelinek
parent e9082138bd
commit 4c278134e8
2 changed files with 3 additions and 5 deletions

View 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.

View 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. */