From a14e30837f2e90ea075a850609c7076d9615b83a Mon Sep 17 00:00:00 2001 From: Tamar Christina Date: Tue, 22 Jan 2019 10:13:56 +0000 Subject: [PATCH] Fix overwide shifts in PR/88903 testcase gcc/testsuite/ChangeLog: PR/tree-optimization 88903 * gcc.dg/vect/pr88903-1.c: Add explicit &. From-SVN: r268144 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/vect/pr88903-1.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5dce351975d..bbf04da7a58 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-01-22 Tamar Christina + + PR/tree-optimization 88903 + * gcc.dg/vect/pr88903-1.c: Add explicit &. + 2019-01-22 Jakub Jelinek PR rtl-optimization/88904 diff --git a/gcc/testsuite/gcc.dg/vect/pr88903-1.c b/gcc/testsuite/gcc.dg/vect/pr88903-1.c index dead2b5e723..77dbfd47c91 100644 --- a/gcc/testsuite/gcc.dg/vect/pr88903-1.c +++ b/gcc/testsuite/gcc.dg/vect/pr88903-1.c @@ -7,8 +7,8 @@ foo() { for (int i = 0; i < 512; ++i) { - x[2*i] = x[2*i] << (i+1); - x[2*i+1] = x[2*i+1] << (i+1); + x[2*i] = x[2*i] << ((i+1) & 31); + x[2*i+1] = x[2*i+1] << ((i+1) & 31); } } @@ -20,7 +20,7 @@ main() x[i] = i; foo (); for (int i = 0; i < 1024; ++i) - if (x[i] != i << (i/2+1)) + if (x[i] != i << ((i/2+1) & 31)) __builtin_abort (); return 0; } -- 2.30.2