Commit a14e3083 by Tamar Christina Committed by Tamar Christina

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
parent 9a658585
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> 2019-01-22 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/88904 PR rtl-optimization/88904
......
...@@ -7,8 +7,8 @@ foo() ...@@ -7,8 +7,8 @@ foo()
{ {
for (int i = 0; i < 512; ++i) for (int i = 0; i < 512; ++i)
{ {
x[2*i] = x[2*i] << (i+1); x[2*i] = x[2*i] << ((i+1) & 31);
x[2*i+1] = x[2*i+1] << (i+1); x[2*i+1] = x[2*i+1] << ((i+1) & 31);
} }
} }
...@@ -20,7 +20,7 @@ main() ...@@ -20,7 +20,7 @@ main()
x[i] = i; x[i] = i;
foo (); foo ();
for (int i = 0; i < 1024; ++i) for (int i = 0; i < 1024; ++i)
if (x[i] != i << (i/2+1)) if (x[i] != i << ((i/2+1) & 31))
__builtin_abort (); __builtin_abort ();
return 0; return 0;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment