Commit 6c620b07 by Jakub Jelinek Committed by Jakub Jelinek

re PR tree-optimization/87320 (Last iteration of vectorized loop not executed…

re PR tree-optimization/87320 (Last iteration of vectorized loop not executed when peeling for gaps)

	PR tree-optimization/87320
	* gcc.dg/pr87320.c: New test.

From-SVN: r266805
parent 31475afa
2018-12-04 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/87320
* gcc.dg/pr87320.c: New test.
2018-12-04 Jeff Law <law@redhat.com> 2018-12-04 Jeff Law <law@redhat.com>
* gcc.dg/strlenopt-58.c: Handle targets with 2 byte wchar_t. * gcc.dg/strlenopt-58.c: Handle targets with 2 byte wchar_t.
......
/* PR tree-optimization/87320 */
/* { dg-do run } */
/* { dg-options "-O3" } */
/* { dg-additional-options "-mavx" { target avx_runtime } } */
static void __attribute__ ((noinline))
transpose_vector (unsigned long n)
{
unsigned long data[2 * n];
for (unsigned long i = 0; i < 2 * n; i++)
data[i] = 4 * i + 2;
unsigned long transposed[n];
for (unsigned long i = 0; i < n; i++)
transposed[i] = data[2 * i];
for (unsigned long i = 0; i < n; i++)
if (transposed[i] != 8 * i + 2)
__builtin_abort ();
}
int
main ()
{
transpose_vector (4);
transpose_vector (120);
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