Patchwork Fix up ivdep/do concurrent testcases (PR testsuite/59064)

login
register
mail settings
Submitter Jakub Jelinek
Date Jan. 17, 2014, 2:03 p.m.
Message ID <20140117140306.GD892@tucnak.redhat.com>
Download mbox | patch
Permalink /patch/312075/
State New
Headers show

Comments

Jakub Jelinek - Jan. 17, 2014, 2:03 p.m.
Hi!

I believe the intent of these testcases was to verify the loops
are vectorized and don't need versioning for alias, which is the only thing
these constructs tell the compiler about.  On some architectures, it is
possible the loops will need versioning for alignment (or peeling for
alignment or just using unaligned loads and/or stores in the vectorized
loop).

Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for
trunk?

2014-01-17  Jakub Jelinek  <jakub@redhat.com>

	PR testsuite/59064
	* gcc.dg/vect/vect-ivdep-1.c: Replace two dg-bogus lines separately
	testing for " version" and " alias" with one testing for
	" version\[^\n\r]* alias".
	* gcc.dg/vect/vect-ivdep-2.c: Likewise.
	* gfortran.dg/vect/vect-do-concurrent-1.f90: Likewise.
	* g++.dg/vect/pr33426-ivdep.cc: Likewise.
	* g++.dg/vect/pr33426-ivdep-2.cc: Likewise.
	* g++.dg/vect/pr33426-ivdep-3.cc: Likewise.
	* g++.dg/vect/pr33426-ivdep-4.cc: Adjust comments similarly.


	Jakub
Richard Guenther - Jan. 17, 2014, 2:37 p.m.
On Fri, 17 Jan 2014, Jakub Jelinek wrote:

> Hi!
> 
> I believe the intent of these testcases was to verify the loops
> are vectorized and don't need versioning for alias, which is the only thing
> these constructs tell the compiler about.  On some architectures, it is
> possible the loops will need versioning for alignment (or peeling for
> alignment or just using unaligned loads and/or stores in the vectorized
> loop).
> 
> Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for
> trunk?

Ok.

Thanks,
Richard.

> 2014-01-17  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR testsuite/59064
> 	* gcc.dg/vect/vect-ivdep-1.c: Replace two dg-bogus lines separately
> 	testing for " version" and " alias" with one testing for
> 	" version\[^\n\r]* alias".
> 	* gcc.dg/vect/vect-ivdep-2.c: Likewise.
> 	* gfortran.dg/vect/vect-do-concurrent-1.f90: Likewise.
> 	* g++.dg/vect/pr33426-ivdep.cc: Likewise.
> 	* g++.dg/vect/pr33426-ivdep-2.cc: Likewise.
> 	* g++.dg/vect/pr33426-ivdep-3.cc: Likewise.
> 	* g++.dg/vect/pr33426-ivdep-4.cc: Adjust comments similarly.
> 
> --- gcc/testsuite/gcc.dg/vect/vect-ivdep-1.c.jj	2013-11-12 11:31:19.000000000 +0100
> +++ gcc/testsuite/gcc.dg/vect/vect-ivdep-1.c	2014-01-17 08:38:37.919749235 +0100
> @@ -14,6 +14,5 @@ void foo(int n, int *a, int *b, int *c,
>  }
>  
>  /* { dg-message "loop vectorized" "" { target *-*-* } 0 } */
> -/* { dg-bogus " version" "" { target *-*-* } 0 } */
> -/* { dg-bogus " alias" "" { target *-*-* } 0 } */
> +/* { dg-bogus " version\[^\n\r]* alias" "" { target *-*-* } 0 } */
>  /* { dg-final { cleanup-tree-dump "vect" } } */
> --- gcc/testsuite/gcc.dg/vect/vect-ivdep-2.c.jj	2013-11-12 11:31:19.000000000 +0100
> +++ gcc/testsuite/gcc.dg/vect/vect-ivdep-2.c	2014-01-17 08:38:55.854652038 +0100
> @@ -30,6 +30,5 @@ void bar(int n, int *a, int *b, int *c)
>  
>  
>  /* { dg-message "loop vectorized" "" { target *-*-* } 0 } */
> -/* { dg-bogus " version" "" { target *-*-* } 0 } */
> -/* { dg-bogus " alias" "" { target *-*-* } 0 } */
> +/* { dg-bogus " version\[^\n\r]* alias" "" { target *-*-* } 0 } */
>  /* { dg-final { cleanup-tree-dump "vect" } } */
> --- gcc/testsuite/gfortran.dg/vect/vect-do-concurrent-1.f90.jj	2013-11-12 11:31:16.000000000 +0100
> +++ gcc/testsuite/gfortran.dg/vect/vect-do-concurrent-1.f90	2014-01-17 08:41:58.744714758 +0100
> @@ -12,6 +12,5 @@ subroutine test(n, a, b, c)
>  end subroutine test
>  
>  ! { dg-message "loop vectorized" "" { target *-*-* } 0 }
> -! { dg-bogus " version" "" { target *-*-* } 0 }
> -! { dg-bogus " alias" "" { target *-*-* } 0 }
> +! { dg-bogus " version\[^\n\r]* alias" "" { target *-*-* } 0 }
>  ! { dg-final { cleanup-tree-dump "vect" } }
> --- gcc/testsuite/g++.dg/vect/pr33426-ivdep.cc.jj	2013-11-12 11:31:20.000000000 +0100
> +++ gcc/testsuite/g++.dg/vect/pr33426-ivdep.cc	2014-01-17 08:40:08.534286245 +0100
> @@ -14,6 +14,5 @@ void foo(int n, int *a, int *b, int *c,
>  }
>  
>  /* { dg-message "loop vectorized" "" { target *-*-* } 0 } */
> -/* { dg-bogus " version" "" { target *-*-* } 0 } */
> -/* { dg-bogus " alias" "" { target *-*-* } 0 } */
> +/* { dg-bogus " version\[^\n\r]* alias" "" { target *-*-* } 0 } */
>  /* { dg-final { cleanup-tree-dump "vect" } } */
> --- gcc/testsuite/g++.dg/vect/pr33426-ivdep-2.cc.jj	2013-11-12 11:31:20.000000000 +0100
> +++ gcc/testsuite/g++.dg/vect/pr33426-ivdep-2.cc	2014-01-17 08:40:23.557207616 +0100
> @@ -29,8 +29,7 @@ void bar(int n, int *a, int *b, int *c)
>  }
>  
>  /* { dg-message "loop vectorized" "" { target *-*-* } 0 } */
> -/* { dg-bogus " version" "" { target *-*-* } 0 } */
> -/* { dg-bogus " alias" "" { target *-*-* } 0 } */
> +/* { dg-bogus " version\[^\n\r]* alias" "" { target *-*-* } 0 } */
>  /* { dg-final { cleanup-tree-dump "vect" } } */
>  
>  /* { dg-final { scan-tree-dump-times "ANNOTATE_EXPR " 2 "original" } } */
> --- gcc/testsuite/g++.dg/vect/pr33426-ivdep-3.cc.jj	2013-11-12 11:31:20.000000000 +0100
> +++ gcc/testsuite/g++.dg/vect/pr33426-ivdep-3.cc	2014-01-17 08:40:31.833150629 +0100
> @@ -15,8 +15,7 @@ void foo(int *a) {
>  }
>  
>  /* { dg-message "loop vectorized" "" { target *-*-* } 0 } */
> -/* { dg-bogus " version" "" { target *-*-* } 0 } */
> -/* { dg-bogus " alias" "" { target *-*-* } 0 } */
> +/* { dg-bogus " version\[^\n\r]* alias" "" { target *-*-* } 0 } */
>  /* { dg-final { cleanup-tree-dump "vect" } } */
>  
>  /* { dg-final { scan-tree-dump-times "ANNOTATE_EXPR " 1 "original" } } */
> --- gcc/testsuite/g++.dg/vect/pr33426-ivdep-4.cc.jj	2013-11-12 11:31:20.000000000 +0100
> +++ gcc/testsuite/g++.dg/vect/pr33426-ivdep-4.cc	2014-01-17 08:40:56.073057959 +0100
> @@ -20,8 +20,7 @@ void foo(std::vector<int> *ar, int *b) {
>  }
>  
>  /* { dg-message "loop vectorized" "" { target *-*-* } 0 } */
> -/* FIXME:     dg-bogus " version" "" { target *-*-* } 0  */
> -/* FIXME:     dg-bogus " alias" "" { target *-*-* } 0  */
> +/* FIXME:     dg-bogus " version\[^\n\r]* alias" "" { target *-*-* } 0  */
>  /* { dg-final { cleanup-tree-dump "vect" } } */
>  
>  /* { dg-final { scan-tree-dump-times "ANNOTATE_EXPR " 1 "original" } } */
> 
> 	Jakub
> 
>

Patch

--- gcc/testsuite/gcc.dg/vect/vect-ivdep-1.c.jj	2013-11-12 11:31:19.000000000 +0100
+++ gcc/testsuite/gcc.dg/vect/vect-ivdep-1.c	2014-01-17 08:38:37.919749235 +0100
@@ -14,6 +14,5 @@  void foo(int n, int *a, int *b, int *c,
 }
 
 /* { dg-message "loop vectorized" "" { target *-*-* } 0 } */
-/* { dg-bogus " version" "" { target *-*-* } 0 } */
-/* { dg-bogus " alias" "" { target *-*-* } 0 } */
+/* { dg-bogus " version\[^\n\r]* alias" "" { target *-*-* } 0 } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
--- gcc/testsuite/gcc.dg/vect/vect-ivdep-2.c.jj	2013-11-12 11:31:19.000000000 +0100
+++ gcc/testsuite/gcc.dg/vect/vect-ivdep-2.c	2014-01-17 08:38:55.854652038 +0100
@@ -30,6 +30,5 @@  void bar(int n, int *a, int *b, int *c)
 
 
 /* { dg-message "loop vectorized" "" { target *-*-* } 0 } */
-/* { dg-bogus " version" "" { target *-*-* } 0 } */
-/* { dg-bogus " alias" "" { target *-*-* } 0 } */
+/* { dg-bogus " version\[^\n\r]* alias" "" { target *-*-* } 0 } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
--- gcc/testsuite/gfortran.dg/vect/vect-do-concurrent-1.f90.jj	2013-11-12 11:31:16.000000000 +0100
+++ gcc/testsuite/gfortran.dg/vect/vect-do-concurrent-1.f90	2014-01-17 08:41:58.744714758 +0100
@@ -12,6 +12,5 @@  subroutine test(n, a, b, c)
 end subroutine test
 
 ! { dg-message "loop vectorized" "" { target *-*-* } 0 }
-! { dg-bogus " version" "" { target *-*-* } 0 }
-! { dg-bogus " alias" "" { target *-*-* } 0 }
+! { dg-bogus " version\[^\n\r]* alias" "" { target *-*-* } 0 }
 ! { dg-final { cleanup-tree-dump "vect" } }
--- gcc/testsuite/g++.dg/vect/pr33426-ivdep.cc.jj	2013-11-12 11:31:20.000000000 +0100
+++ gcc/testsuite/g++.dg/vect/pr33426-ivdep.cc	2014-01-17 08:40:08.534286245 +0100
@@ -14,6 +14,5 @@  void foo(int n, int *a, int *b, int *c,
 }
 
 /* { dg-message "loop vectorized" "" { target *-*-* } 0 } */
-/* { dg-bogus " version" "" { target *-*-* } 0 } */
-/* { dg-bogus " alias" "" { target *-*-* } 0 } */
+/* { dg-bogus " version\[^\n\r]* alias" "" { target *-*-* } 0 } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
--- gcc/testsuite/g++.dg/vect/pr33426-ivdep-2.cc.jj	2013-11-12 11:31:20.000000000 +0100
+++ gcc/testsuite/g++.dg/vect/pr33426-ivdep-2.cc	2014-01-17 08:40:23.557207616 +0100
@@ -29,8 +29,7 @@  void bar(int n, int *a, int *b, int *c)
 }
 
 /* { dg-message "loop vectorized" "" { target *-*-* } 0 } */
-/* { dg-bogus " version" "" { target *-*-* } 0 } */
-/* { dg-bogus " alias" "" { target *-*-* } 0 } */
+/* { dg-bogus " version\[^\n\r]* alias" "" { target *-*-* } 0 } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
 
 /* { dg-final { scan-tree-dump-times "ANNOTATE_EXPR " 2 "original" } } */
--- gcc/testsuite/g++.dg/vect/pr33426-ivdep-3.cc.jj	2013-11-12 11:31:20.000000000 +0100
+++ gcc/testsuite/g++.dg/vect/pr33426-ivdep-3.cc	2014-01-17 08:40:31.833150629 +0100
@@ -15,8 +15,7 @@  void foo(int *a) {
 }
 
 /* { dg-message "loop vectorized" "" { target *-*-* } 0 } */
-/* { dg-bogus " version" "" { target *-*-* } 0 } */
-/* { dg-bogus " alias" "" { target *-*-* } 0 } */
+/* { dg-bogus " version\[^\n\r]* alias" "" { target *-*-* } 0 } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
 
 /* { dg-final { scan-tree-dump-times "ANNOTATE_EXPR " 1 "original" } } */
--- gcc/testsuite/g++.dg/vect/pr33426-ivdep-4.cc.jj	2013-11-12 11:31:20.000000000 +0100
+++ gcc/testsuite/g++.dg/vect/pr33426-ivdep-4.cc	2014-01-17 08:40:56.073057959 +0100
@@ -20,8 +20,7 @@  void foo(std::vector<int> *ar, int *b) {
 }
 
 /* { dg-message "loop vectorized" "" { target *-*-* } 0 } */
-/* FIXME:     dg-bogus " version" "" { target *-*-* } 0  */
-/* FIXME:     dg-bogus " alias" "" { target *-*-* } 0  */
+/* FIXME:     dg-bogus " version\[^\n\r]* alias" "" { target *-*-* } 0  */
 /* { dg-final { cleanup-tree-dump "vect" } } */
 
 /* { dg-final { scan-tree-dump-times "ANNOTATE_EXPR " 1 "original" } } */