Commit adc84037 by Richard Sandiford Committed by Richard Sandiford

PR81738: Split vect-alias-check-6.c

The second loop in the testcase only vectorises if we can reverse
a vector and if aligned loads aren't required.

2017-08-10  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/testsuite/
	PR testsuite/81738
	* gcc.dg/vect/vect-alias-check-6.c: Move second function to...
	* gcc.dg/vect/vect-alias-check-7.c: ...this new file.  Require
	vect_perm and vect_element_align for vectorization.

From-SVN: r251037
parent 339922f4
2017-08-10 Richard Sandiford <richard.sandiford@linaro.org>
PR testsuite/81738
* gcc.dg/vect/vect-alias-check-6.c: Move second function to...
* gcc.dg/vect/vect-alias-check-7.c: ...this new file. Require
vect_perm and vect_element_align for vectorization.
2017-08-10 H.J. Lu <hongjiu.lu@intel.com> 2017-08-10 H.J. Lu <hongjiu.lu@intel.com>
PR target/81736 PR target/81736
......
...@@ -12,12 +12,5 @@ f1 (struct s *a, struct s *b) ...@@ -12,12 +12,5 @@ f1 (struct s *a, struct s *b)
a->x[i + 1] += b->x[i]; a->x[i + 1] += b->x[i];
} }
void /* { dg-final { scan-tree-dump {checking that [^\n]* and [^\n]* have different addresses} "vect" } } */
f2 (struct s *a, struct s *b) /* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
{
for (int i = 0; i < N; ++i)
a->x[i] += b->x[N - i - 1];
}
/* { dg-final { scan-tree-dump-times {checking that [^\n]* and [^\n]* have different addresses} 2 "vect" } } */
/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 2 "vect" } } */
/* { dg-do compile } */
/* { dg-require-effective-target vect_int } */
#define N 16
struct s { int x[N]; };
void
f1 (struct s *a, struct s *b)
{
for (int i = 0; i < N; ++i)
a->x[i] += b->x[N - i - 1];
}
/* { dg-final { scan-tree-dump {checking that [^\n]* and [^\n]* have different addresses} "vect" } } */
/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { vect_perm && vect_element_align } } } } */
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