public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] testsuite (checked in) fix errors from gfortran vect tests
@ 2005-03-31  0:31 Janis Johnson
  2005-03-31 11:33 ` [PATCH] testsuite (checked in) fix errors from gfortran vect tests [+ testcase fix] Dorit Naishlos
  0 siblings, 1 reply; 4+ messages in thread
From: Janis Johnson @ 2005-03-31  0:31 UTC (permalink / raw)
  To: gcc-patches

This patch fixes the ERRORs from the gfortran vect tests.  Those tests
use gfortran-dg-runtest, which cycles through a list of optimization
options using DejaGnu support that appends the compilation flags to the
test name.  This patch strips the options from the names.

Tested on powerpc64-linux, checked in on mainline.

2005-03-30  Janis Johnson  <janis187@us.ibm.com>

	* lib/scantree.exp (scan-tree-dump, scan-tree-dump-times,
	scan-tree-dump-not, scan-tree-dump-dem, scan-tree-dump-dem-not):
	Strip options from test name.

--- gcc/testsuite/lib/scantree.exp.orig	2005-03-30 13:49:43.350996704 -0800
+++ gcc/testsuite/lib/scantree.exp	2005-03-30 15:55:53.733950520 -0800
@@ -49,7 +49,8 @@ proc scan-tree-dump { args } {
     upvar 2 name testcase
 
     # This must match the rule in gcc-dg.exp.
-    set output_file "[glob [file tail $testcase].t??.[lindex $args 1]]"
+    set src [file tail [lindex $testcase 0]]
+    set output_file "[glob $src.t??.[lindex $args 1]]"
 
     set fd [open $output_file r]
     set text [read $fd]
@@ -91,7 +92,8 @@ proc scan-tree-dump-times { args } {
     upvar 2 name testcase
 
     # This must match the rule in gcc-dg.exp.
-    set output_file "[glob [file tail $testcase].t??.[lindex $args 2]]"
+    set src [file tail [lindex $testcase 0]]
+    set output_file "[glob $src.t??.[lindex $args 2]]"
 
     set fd [open $output_file r]
     set text [read $fd]
@@ -128,7 +130,8 @@ proc scan-tree-dump-not { args } {
     }
 
     upvar 2 name testcase
-    set output_file "[glob [file tail $testcase].t??.[lindex $args 1]]"
+    set src [file tail [lindex $testcase 0]]
+    set output_file "[glob $src.t??.[lindex $args 1]]"
 
     set fd [open $output_file r]
     set text [read $fd]
@@ -179,7 +182,8 @@ proc scan-tree-dump-dem { args } {
     }
 
     upvar 2 name testcase
-    set output_file "[glob [file tail $testcase].t??.[lindex $args 1]]"
+    set src [file tail [lindex $testcase 0]]
+    set output_file "[glob $src.t??.[lindex $args 1]]"
 
     set fd [open "| $cxxfilt < $output_file" r]
     set text [read $fd]
@@ -229,7 +233,8 @@ proc scan-tree-dump-dem-not { args } {
     }
 
     upvar 2 name testcase
-    set output_file "[glob [file tail $testcase].t??.[lindex $args 1]]"
+    set src [file tail [lindex $testcase 0]]
+    set output_file "[glob $src.t??.[lindex $args 1]]"
 
     set fd [open "| $cxxfilt < $output_file" r]
     set text [read $fd]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] testsuite (checked in) fix errors from gfortran vect tests [+ testcase fix]
  2005-03-31  0:31 [PATCH] testsuite (checked in) fix errors from gfortran vect tests Janis Johnson
@ 2005-03-31 11:33 ` Dorit Naishlos
  2005-03-31 21:46   ` Janis Johnson
  0 siblings, 1 reply; 4+ messages in thread
From: Dorit Naishlos @ 2005-03-31 11:33 UTC (permalink / raw)
  To: Janis Johnson; +Cc: gcc-patches





thanks a lot, Janis.

now that it's possible to run these tests with Framework version 1.4.4, I
was able to test it also on a powerpc64-linux platform, and discovered that
in lp64 mode one of the tests fails to vectorize a loop (passes for lp32).

I'll open a missed optimization PR for that (it's probably a duplicate of
PR 18403). In the meantime, ok to commit the following patch?

Changelog:

      * gfortran.dg/vect/vect-5.f90: xfail for lp64.

Index: vect-5.f90
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gfortran.dg/vect/vect-5.f90,v
retrieving revision 1.1
diff -u -3 -p -r1.1 vect-5.f90
--- vect-5.f90  29 Mar 2005 16:10:22 -0000      1.1
+++ vect-5.f90  31 Mar 2005 09:21:50 -0000
@@ -35,6 +35,8 @@
         stop
         end

-! { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { xfail
vect_no_align } } }
-! { dg-final { scan-tree-dump-times "Alignment of access forced using
peeling" 1 "vect" { xfail vect_no_align } } }
-! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2
"vect" { xfail vect_no_align } } }
+! { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { xfail
{ vect_no_align || lp64 } } } }
+! { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target
lp64 } } }
+! { dg-final { scan-tree-dump-times "Alignment of access forced using
peeling" 1 "vect" { xfail { vect_no_align || lp64 } } } }
+! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2
"vect" { xfail { vect_no_align || lp64 } } } }
+! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1
"vect" { target lp64} } }

thanks,
dorit


gcc-patches-owner@gcc.gnu.org wrote on 31/03/2005 02:29:43:

> This patch fixes the ERRORs from the gfortran vect tests.  Those tests
> use gfortran-dg-runtest, which cycles through a list of optimization
> options using DejaGnu support that appends the compilation flags to the
> test name.  This patch strips the options from the names.
>
> Tested on powerpc64-linux, checked in on mainline.
>
> 2005-03-30  Janis Johnson  <janis187@us.ibm.com>
>
>    * lib/scantree.exp (scan-tree-dump, scan-tree-dump-times,
>    scan-tree-dump-not, scan-tree-dump-dem, scan-tree-dump-dem-not):
>    Strip options from test name.
>
> --- gcc/testsuite/lib/scantree.exp.orig   2005-03-30 13:49:43.350996704
-0800
> +++ gcc/testsuite/lib/scantree.exp   2005-03-30 15:55:53.733950520 -0800
> @@ -49,7 +49,8 @@ proc scan-tree-dump { args } {
>      upvar 2 name testcase
>
>      # This must match the rule in gcc-dg.exp.
> -    set output_file "[glob [file tail $testcase].t??.[lindex $args 1]]"
> +    set src [file tail [lindex $testcase 0]]
> +    set output_file "[glob $src.t??.[lindex $args 1]]"
>
>      set fd [open $output_file r]
>      set text [read $fd]
> @@ -91,7 +92,8 @@ proc scan-tree-dump-times { args } {
>      upvar 2 name testcase
>
>      # This must match the rule in gcc-dg.exp.
> -    set output_file "[glob [file tail $testcase].t??.[lindex $args 2]]"
> +    set src [file tail [lindex $testcase 0]]
> +    set output_file "[glob $src.t??.[lindex $args 2]]"
>
>      set fd [open $output_file r]
>      set text [read $fd]
> @@ -128,7 +130,8 @@ proc scan-tree-dump-not { args } {
>      }
>
>      upvar 2 name testcase
> -    set output_file "[glob [file tail $testcase].t??.[lindex $args 1]]"
> +    set src [file tail [lindex $testcase 0]]
> +    set output_file "[glob $src.t??.[lindex $args 1]]"
>
>      set fd [open $output_file r]
>      set text [read $fd]
> @@ -179,7 +182,8 @@ proc scan-tree-dump-dem { args } {
>      }
>
>      upvar 2 name testcase
> -    set output_file "[glob [file tail $testcase].t??.[lindex $args 1]]"
> +    set src [file tail [lindex $testcase 0]]
> +    set output_file "[glob $src.t??.[lindex $args 1]]"
>
>      set fd [open "| $cxxfilt < $output_file" r]
>      set text [read $fd]
> @@ -229,7 +233,8 @@ proc scan-tree-dump-dem-not { args } {
>      }
>
>      upvar 2 name testcase
> -    set output_file "[glob [file tail $testcase].t??.[lindex $args 1]]"
> +    set src [file tail [lindex $testcase 0]]
> +    set output_file "[glob $src.t??.[lindex $args 1]]"
>
>      set fd [open "| $cxxfilt < $output_file" r]
>      set text [read $fd]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] testsuite (checked in) fix errors from gfortran vect tests [+ testcase fix]
  2005-03-31 11:33 ` [PATCH] testsuite (checked in) fix errors from gfortran vect tests [+ testcase fix] Dorit Naishlos
@ 2005-03-31 21:46   ` Janis Johnson
  2005-04-05  8:09     ` Dorit Naishlos
  0 siblings, 1 reply; 4+ messages in thread
From: Janis Johnson @ 2005-03-31 21:46 UTC (permalink / raw)
  To: Dorit Naishlos; +Cc: Janis Johnson, gcc-patches

On Thu, Mar 31, 2005 at 11:40:56AM +0200, Dorit Naishlos wrote:
> 
> I'll open a missed optimization PR for that (it's probably a duplicate of
> PR 18403). In the meantime, ok to commit the following patch?
> 
> Changelog:
> 
>       * gfortran.dg/vect/vect-5.f90: xfail for lp64.

Whoever approves the autovectorization patches can approve the changes
to those tests.  This seems obvious to me, though.

Janis

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] testsuite (checked in) fix errors from gfortran vect tests [+ testcase fix]
  2005-03-31 21:46   ` Janis Johnson
@ 2005-04-05  8:09     ` Dorit Naishlos
  0 siblings, 0 replies; 4+ messages in thread
From: Dorit Naishlos @ 2005-04-05  8:09 UTC (permalink / raw)
  To: Janis Johnson; +Cc: gcc-patches





> > Changelog:
> >
> >       * gfortran.dg/vect/vect-5.f90: xfail for lp64.
>
> Whoever approves the autovectorization patches can approve the changes
> to those tests.  This seems obvious to me, though.

ok, I'll go ahead and commit the following patch. Slightly changed from the
patch I sent before: (a) we expect to vectorize two loops, unless it's lp64
for which (b) we expect to vectorize only one loop. however both assertions
are only true for target that support misalignment, which I neglected to
include in the previous patch. In this patch I'm only adding xfail on lp64
for check (a), and I don't try to check for (b) cause that requires
combining logical operators - see comment in the patch - which we can't do,
so we'd need to introduce a new target-key-word or some hackery in vect.exp
- non of which is complicated, just may require a little more discussion
and not related to fixing the current testcase failure.

thanks,
dorit


Index: vect-5.f90
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gfortran.dg/vect/vect-5.f90,v
retrieving revision 1.1
diff -u -3 -p -r1.1 vect-5.f90
--- vect-5.f90  29 Mar 2005 16:10:22 -0000      1.1
+++ vect-5.f90  5 Apr 2005 07:53:14 -0000
@@ -35,6 +35,14 @@
         stop
         end

-! { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { xfail
vect_no_align } } }
-! { dg-final { scan-tree-dump-times "Alignment of access forced using
peeling" 1 "vect" { xfail vect_no_align } } }
-! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2
"vect" { xfail vect_no_align } } }
+! { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { xfail
{ vect_no_align || lp64 } } } }
+! { dg-final { scan-tree-dump-times "Alignment of access forced using
peeling" 1 "vect" { xfail { vect_no_align || lp64 } } } }
+! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2
"vect" { xfail { vect_no_align || lp64 } } } }
+
+! We also expect to vectorize one loop for lp64 targets that support
+! misaligned access:
+!   scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { lp64 &&
!vect_no_align } }
+!   scan-tree-dump-times "Alignment of access forced using peeling" 1
"vect" { target { lp64 && !vect_no_align } }
+!   scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" {
target { lp64 && !vect_no_align } }
+! but we currently can't combine logical operators. (Could define
+! a keyword for "not_vect_no_align" if desired).



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-04-05  8:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-31  0:31 [PATCH] testsuite (checked in) fix errors from gfortran vect tests Janis Johnson
2005-03-31 11:33 ` [PATCH] testsuite (checked in) fix errors from gfortran vect tests [+ testcase fix] Dorit Naishlos
2005-03-31 21:46   ` Janis Johnson
2005-04-05  8:09     ` Dorit Naishlos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).