From d4a20f9059070fc42b9effde0d890dcebccc2f84 Mon Sep 17 00:00:00 2001
From: Jan Hubicka <jh@suse.cz>
Date: Sat, 21 Nov 2020 18:07:49 +0100
Subject: [PATCH] Update vec-35.c and vect-35-big-array.c

We now determine depnedencies across union fields correctly.

	* gcc.dg/vect/vect-35-big-array.c: Excpect 2 loops to be vectorized.
	* gcc.dg/vect/vect-35.c: Excpect 2 loops to be vectorized.
---
 gcc/testsuite/gcc.dg/vect/vect-35-big-array.c | 7 +------
 gcc/testsuite/gcc.dg/vect/vect-35.c           | 7 +------
 2 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/vect/vect-35-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-35-big-array.c
index ca57a10f714a..28a99c910fd5 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-35-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-35-big-array.c
@@ -20,10 +20,6 @@ int main1 ()
       s.b[i] = i;
     }
 
-  /* Dependence analysis fails cause s.a and s.b may overlap.
-     Try to use runtime aliasing test with versioning, and
-     later versioning/vectorization are skipped because the
-     overlap is proven at compilation time.  */
   for (i = 0; i < N; i++)
     {
       s.a[i] = s.b[i] + 1;
@@ -47,5 +43,4 @@ int main (void)
 }
 
 
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect"  { xfail { ia64-*-* sparc*-*-* } } } } */
-/* { dg-final { scan-tree-dump "can't determine dependence between" "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect"  { xfail { ia64-*-* sparc*-*-* } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-35.c b/gcc/testsuite/gcc.dg/vect/vect-35.c
index 76fe32d68ad4..a7ec0f16d4cf 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-35.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-35.c
@@ -20,10 +20,6 @@ int main1 ()
       s.b[i] = i;
     }
 
-  /* Dependence analysis fails cause s.a and s.b may overlap.
-     Try to use runtime aliasing test with versioning, and
-     later versioning/vectorization are skipped because the
-     overlap is proven at compilation time.  */
   for (i = 0; i < N; i++)
     {
       s.a[i] = s.b[i] + 1;
@@ -47,5 +43,4 @@ int main (void)
 } 
 
 
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect"  { xfail { ia64-*-* sparc*-*-* } } } } */
-/* { dg-final { scan-tree-dump "can't determine dependence between" "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect"  { xfail { ia64-*-* sparc*-*-* } } } } */
-- 
GitLab