mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-13 21:01:29 +08:00
re PR tree-optimization/69399 (wrong code with -O and int128)
PR tree-optimization/69399 * wide-int.h (wi::lrshift): For larger precisions, only use fast path if shift is known to be < HOST_BITS_PER_WIDE_INT. * gcc.dg/torture/pr69399.c: New test. From-SVN: r232869
This commit is contained in:
parent
dfa654c8cf
commit
b1652ddea9
@ -1,3 +1,9 @@
|
||||
2016-01-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/69399
|
||||
* wide-int.h (wi::lrshift): For larger precisions, only
|
||||
use fast path if shift is known to be < HOST_BITS_PER_WIDE_INT.
|
||||
|
||||
2016-01-27 Claudiu Zissulescu <claziss@synopsys.com>
|
||||
|
||||
* config/arc/predicates.md (proper_comparison_operator): Reject
|
||||
|
@ -1,3 +1,8 @@
|
||||
2016-01-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/69399
|
||||
* gcc.dg/torture/pr69399.c: New test.
|
||||
|
||||
2016-01-27 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gcc.dg/tree-ssa/ssa-dom-cse-2.c: XFAIL on SPARC 64-bit.
|
||||
|
18
gcc/testsuite/gcc.dg/torture/pr69399.c
Normal file
18
gcc/testsuite/gcc.dg/torture/pr69399.c
Normal file
@ -0,0 +1,18 @@
|
||||
/* { dg-do run { target int128 } } */
|
||||
|
||||
static unsigned __attribute__((noinline, noclone))
|
||||
foo (unsigned long long u)
|
||||
{
|
||||
unsigned __int128 v = u | 0xffffff81U;
|
||||
v >>= 64;
|
||||
return v;
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
unsigned x = foo (27);
|
||||
if (x != 0)
|
||||
__builtin_abort ();
|
||||
return 0;
|
||||
}
|
@ -2909,7 +2909,9 @@ wi::lrshift (const T1 &x, const T2 &y)
|
||||
For variable-precision integers like wide_int, handle HWI
|
||||
and sub-HWI integers inline. */
|
||||
if (STATIC_CONSTANT_P (xi.precision > HOST_BITS_PER_WIDE_INT)
|
||||
? xi.len == 1 && xi.val[0] >= 0
|
||||
? (shift < HOST_BITS_PER_WIDE_INT
|
||||
&& xi.len == 1
|
||||
&& xi.val[0] >= 0)
|
||||
: xi.precision <= HOST_BITS_PER_WIDE_INT)
|
||||
{
|
||||
val[0] = xi.to_uhwi () >> shift;
|
||||
|
Loading…
x
Reference in New Issue
Block a user