+2014-07-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/61682
+ * wide-int.cc (wi::mul_internal): Handle high correctly
+ for umul_ppmm using cases and when one of the operands is
+ equal to 1.
+
2014-07-03 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.md (rotl<mode>3, ashl<mode>3, lshr<mode>3,
+2014-07-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/61682
+ * gcc.c-torture/execute/pr61682.c: New test.
+
2014-07-03 Segher Boessenkool <segher@kernel.crashing.org>
* gcc.target/powerpc/shift-dot.c: New test.
/* Operations with very long integers.
- Copyright (C) 2012-2013 Free Software Foundation, Inc.
+ Copyright (C) 2012-2014 Free Software Foundation, Inc.
Contributed by Kenneth Zadeck <zadeck@naturalbridge.com>
This file is part of GCC.
&& wi::fits_uhwi_p (op1)
&& wi::fits_uhwi_p (op2))
{
+ /* This case never overflows. */
+ if (high)
+ {
+ val[0] = 0;
+ return 1;
+ }
umul_ppmm (val[1], val[0], op1.ulow (), op2.ulow ());
return 1 + (val[1] != 0 || val[0] < 0);
}
umul_ppmm (upper, val[0], op1.ulow (), op2.ulow ());
if (needs_overflow)
*overflow = (upper != 0);
+ if (high)
+ val[0] = upper;
return 1;
}
}
/* Handle multiplications by 1. */
if (op1 == 1)
{
+ if (high)
+ {
+ val[0] = wi::neg_p (op2, sgn) ? -1 : 0;
+ return 1;
+ }
for (i = 0; i < op2len; i++)
val[i] = op2val[i];
return op2len;
}
if (op2 == 1)
{
+ if (high)
+ {
+ val[0] = wi::neg_p (op1, sgn) ? -1 : 0;
+ return 1;
+ }
for (i = 0; i < op1len; i++)
val[i] = op1val[i];
return op1len;