Skip to content

Commit

Permalink
Fix overwide shifts in PR/88903 testcase
Browse files Browse the repository at this point in the history
gcc/testsuite/ChangeLog:

	PR/tree-optimization 88903
	* gcc.dg/vect/pr88903-1.c: Add explicit &.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268144 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
tnfchris committed Jan 22, 2019
1 parent d92b550 commit dc7008d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions gcc/testsuite/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2019-01-22 Tamar Christina <tamar.christina@arm.com>

PR/tree-optimization 88903
* gcc.dg/vect/pr88903-1.c: Add explicit &.

2019-01-22 Jakub Jelinek <jakub@redhat.com>

PR rtl-optimization/88904
Expand Down
6 changes: 3 additions & 3 deletions gcc/testsuite/gcc.dg/vect/pr88903-1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand All @@ -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;
}

0 comments on commit dc7008d

Please sign in to comment.