public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [vectorizer testsuite] [patch] fix alignment checks in vectorizer testcases
@ 2007-08-07  8:29 Dorit Nuzman
  0 siblings, 0 replies; only message in thread
From: Dorit Nuzman @ 2007-08-07  8:29 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 2109 bytes --]


Hi,

This patch fixes the vectorizer testsuite failures at -m64 on darwin,
reported in:
http://gcc.gnu.org/ml/gcc/2007-08/msg00052.html

The failures are because of this patch:
http://gcc.gnu.org/ml/gcc-cvs/2007-07/msg00447.html
http://gcc.gnu.org/ml/gcc-patches/2007-07/msg00082.html
...that, for 64bit darwin, tells the vectorizer that data cannot be assumed
to be naturally aligned, which in turn means that we cannot use loop
peeling to force data alignment on 64bit darwin. So testcases that expect
peeling to happen need to be updated accordingly.

Thanks to Jack Howarth for testing the patch on powerpc-apple-darwin9
(both -m32 and -m64).
I tested it on powerp64-linux (both -m32 and -m64) and i386-linux (only
-m32).
Thanks to Ira for testing on x86_64.

I will commit this patch to mainline later today

dorit

        * gcc.dg/vect/vect-28.c: Fix test to not expect peeling on
        !vector_alignment_reachable targets.
        * gcc.dg/vect/vect-33.c: Likewise.
        * gcc.dg/vect/vect-42.c: Likewise.
        * gcc.dg/vect/vect-44.c: Likewise.
        * gcc.dg/vect/vect-50.c: Likewise.
        * gcc.dg/vect/vect-70.c: Likewise.
        * gcc.dg/vect/vect-71.c: Likewise.
        * gcc.dg/vect/vect-87.c: Likewise.
        * gcc.dg/vect/vect-88.c: Likewise.
        * gcc.dg/vect/vect-91.c: Likewise.
        * gcc.dg/vect/vect-93.c: Likewise.
        * gcc.dg/vect/vect-96.c: Likewise.
        * gcc.dg/vect/no-section-anchors-69.c: Likewise.
        * gcc.dg/vect/section-anchors-69.c: Likewise.
        * gcc.dg/vect/pr25413.c: Likewise.
        * gcc.dg/vect/costmodel/ppc/costmodel-33.c: Likewise.
        * gcc.dg/vect/costmodel/ppc/costmodel-76b.c: Likewise.
        * gfortran.dg/vect-2.f90: Likewise.
        * gfortran.dg/vect-3.f90: Likewise.
        * gfortran.dg/vect-4.f90: Likewise.
        * gfortran.dg/vect-5.f90: Likewise.
        * lib/target-supports.exp
(check_effective_target_natural_alignment):
        Return false for darwin.
        (check_effective_target_vector_alignment_reachable_for_double):
New.

(See attached file: reachable_alignment_vecttestfixes.txt)

[-- Attachment #2: reachable_alignment_vecttestfixes.txt --]
[-- Type: text/plain, Size: 23844 bytes --]

Index: gcc.dg/vect/vect-50.c
===================================================================
--- gcc.dg/vect/vect-50.c	(revision 126889)
+++ gcc.dg/vect/vect-50.c	(working copy)
@@ -61,6 +61,7 @@
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "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 "Alignment of access forced using peeling" 1 "vect" { xfail { vect_no_align || {! vector_alignment_reachable} } } } } */
 /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 3 "vect" { target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { {! vector_alignment_reachable} && {! vect_no_align} } } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc.dg/vect/vect-33.c
===================================================================
--- gcc.dg/vect/vect-33.c	(revision 126889)
+++ gcc.dg/vect/vect-33.c	(working copy)
@@ -38,5 +38,6 @@
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect"  } } */
 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target vector_alignment_reachable } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { ! vector_alignment_reachable } } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc.dg/vect/no-section-anchors-vect-69.c
===================================================================
--- gcc.dg/vect/no-section-anchors-vect-69.c	(revision 126889)
+++ gcc.dg/vect/no-section-anchors-vect-69.c	(working copy)
@@ -37,7 +37,7 @@
 {  
   int i,j;
 
-  /* 1. unaligned */
+  /* 1. unaligned (known misalignment) */
   for (i = 0; i < N; i++)
     {
       tmp1[2].a.n[1][2][i] = 5;
@@ -82,7 +82,7 @@
 	}
     }
 
-  /* 4. unaligned */
+  /* 4. unaligned (unknown misalignment) */
   for (i = 0; i < N-4; i++)
     {
       for (j = 0; j < N-4; j++)
@@ -113,5 +113,7 @@
 
 /* { dg-final { scan-tree-dump-times "vectorized 4 loops" 1 "vect" } } */
 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail {! vector_alignment_reachable} } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target {! vector_alignment_reachable} } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target {! vector_alignment_reachable} } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc.dg/vect/vect-42.c
===================================================================
--- gcc.dg/vect/vect-42.c	(revision 126889)
+++ gcc.dg/vect/vect-42.c	(working copy)
@@ -55,7 +55,7 @@
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/*  { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target 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 "Alignment of access forced using peeling" 1 "vect" { xfail vect_no_align } } } */
+/*  { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { vect_no_align || { ! vector_alignment_reachable } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align || { ! vector_alignment_reachable } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail {vect_no_align || { ! vector_alignment_reachable } } } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc.dg/vect/vect-93.c
===================================================================
--- gcc.dg/vect/vect-93.c	(revision 126889)
+++ gcc.dg/vect/vect-93.c	(working copy)
@@ -67,12 +67,12 @@
 
 /* 2 loops vectorized in main1, 2 loops vectorized in main:
    the first loop in main requires vectorization of conversions,
-   the second loop in main requires vectorization of misaliged load.  */
+   the second loop in main requires vectorization of misaligned load.  */
 
 /* main && main1 together: */
 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 2 "vect" { target powerpc*-*-* i?86-*-* x86_64-*-* } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { target vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 3 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { target { vect_no_align && {! vector_alignment_reachable} } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 3 "vect" { xfail { vect_no_align || {! vector_alignment_reachable} } } } } */
 
 /* in main1: */
 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target !powerpc*-*-* !i?86-*-* !x86_64-*-* } } } */
Index: gcc.dg/vect/costmodel/ppc/costmodel-vect-33.c
===================================================================
--- gcc.dg/vect/costmodel/ppc/costmodel-vect-33.c	(revision 126889)
+++ gcc.dg/vect/costmodel/ppc/costmodel-vect-33.c	(working copy)
@@ -35,5 +35,9 @@
   return main1 ();
 } 
 
-/* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" } } */
+/* Peeling to align the store is used. Overhead of peeling is too high.  */
+/* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" { target vector_alignment_reachable } } } */
+
+/* Versioning to align the store is used. Overhead of versioning is not too high.  */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target {! vector_alignment_reachable} } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c
===================================================================
--- gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c	(revision 126889)
+++ gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c	(working copy)
@@ -42,6 +42,10 @@
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" } } */
+/* Peeling to align the store is used. Overhead of peeling is too high.  */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target vector_alignment_reachable } } } */
+/* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" { target { vector_alignment_reachable && {! vect_no_align} } } } } */
+
+/* Versioning to align the store is used. Overhead of versioning is not too high.  */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_no_align || {! vector_alignment_reachable} } } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc.dg/vect/section-anchors-vect-69.c
===================================================================
--- gcc.dg/vect/section-anchors-vect-69.c	(revision 126889)
+++ gcc.dg/vect/section-anchors-vect-69.c	(working copy)
@@ -115,5 +115,6 @@
 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
 /* Alignment forced using versioning until the pass that increases alignment
   is extended to handle structs.  */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 4 "vect" { target vect_int } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 4 "vect" { target {vect_int && vector_alignment_reachable } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 4 "vect" { target {vect_int && {! vector_alignment_reachable} } } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc.dg/vect/vect-44.c
===================================================================
--- gcc.dg/vect/vect-44.c	(revision 126889)
+++ gcc.dg/vect/vect-44.c	(working copy)
@@ -65,6 +65,7 @@
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "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 "Alignment of access forced using peeling" 1 "vect" { xfail { vect_no_align || {! vector_alignment_reachable} } } } } */
 /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 3 "vect" { target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { {! vector_alignment_reachable} && {! vect_no_align} } } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc.dg/vect/vect-70.c
===================================================================
--- gcc.dg/vect/vect-70.c	(revision 126889)
+++ gcc.dg/vect/vect-70.c	(working copy)
@@ -63,5 +63,6 @@
           
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" {target vector_alignment_reachable } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" {target {! vector_alignment_reachable} } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc.dg/vect/vect-28.c
===================================================================
--- gcc.dg/vect/vect-28.c	(revision 126889)
+++ gcc.dg/vect/vect-28.c	(working copy)
@@ -39,5 +39,6 @@
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect"  } } */
 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target vector_alignment_reachable } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { ! vector_alignment_reachable } } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc.dg/vect/vect-87.c
===================================================================
--- gcc.dg/vect/vect-87.c	(revision 126889)
+++ gcc.dg/vect/vect-87.c	(working copy)
@@ -50,5 +50,6 @@
 /* Fails for targets that don't vectorize PLUS (e.g alpha).  */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" {target vector_alignment_reachable } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" {target {! vector_alignment_reachable} } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc.dg/vect/vect-71.c
===================================================================
--- gcc.dg/vect/vect-71.c	(revision 126889)
+++ gcc.dg/vect/vect-71.c	(working copy)
@@ -5,7 +5,7 @@
 
 #define N 16
 
-/* unaligned load.  */
+/* indirect access.  */
 
 int main1 ()
 {
Index: gcc.dg/vect/vect-96.c
===================================================================
--- gcc.dg/vect/vect-96.c	(revision 126889)
+++ gcc.dg/vect/vect-96.c	(working copy)
@@ -42,7 +42,7 @@
    For targets that don't support unaligned loads, version for the store.  */
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 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 "Alignment of access forced using versioning." 1 "vect" { target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { {! vect_no_align} && vector_alignment_reachable } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_no_align || {! vector_alignment_reachable} } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { vect_no_align || {! vector_alignment_reachable} } } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc.dg/vect/vect-88.c
===================================================================
--- gcc.dg/vect/vect-88.c	(revision 126889)
+++ gcc.dg/vect/vect-88.c	(working copy)
@@ -50,5 +50,6 @@
 /* Fails for targets that don't vectorize PLUS (e.g alpha).  */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" {target vector_alignment_reachable } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" {target {! vector_alignment_reachable} } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc.dg/vect/pr25413.c
===================================================================
--- gcc.dg/vect/pr25413.c	(revision 126889)
+++ gcc.dg/vect/pr25413.c	(working copy)
@@ -31,8 +31,8 @@
   return 0;
 } 
 
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vector_alignment_reachable } } } */
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { ! vector_alignment_reachable } } } } */
-/* { dg-final { scan-tree-dump-times "vector alignment may not be reachable" 1 "vect" { target { ! vector_alignment_reachable } } } } */
-/* { dg-final { scan-tree-dump-times "not vectorized: unsupported unaligned store" 1 "vect" { target { ! vector_alignment_reachable } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vector_alignment_reachable_for_double } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { ! vector_alignment_reachable_for_double } } } } */
+/* { dg-final { scan-tree-dump-times "vector alignment may not be reachable" 1 "vect" { target { ! vector_alignment_reachable_for_double } } } } */
+/* { dg-final { scan-tree-dump-times "not vectorized: unsupported unaligned store" 1 "vect" { target { ! vector_alignment_reachable_for_double } } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc.dg/vect/vect-91.c
===================================================================
--- gcc.dg/vect/vect-91.c	(revision 126889)
+++ gcc.dg/vect/vect-91.c	(working copy)
@@ -58,7 +58,7 @@
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 3 "vect" { xfail vect_no_int_add } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
 /* { dg-final { scan-tree-dump-times "accesses have the same alignment." 3 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 3 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 3 "vect" {target vector_alignment_reachable } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 3 "vect" {target {! vector_alignment_reachable} } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
Index: lib/target-supports.exp
===================================================================
--- lib/target-supports.exp	(revision 126889)
+++ lib/target-supports.exp	(working copy)
@@ -2042,9 +2042,10 @@
     if [info exists et_natural_alignment_saved] {
         verbose "check_effective_target_natural_alignment: using cached result" 2
     } else {
-        set et_natural_alignment_saved 0
-        if { [istarget spu-*-*] } {
-            set et_natural_alignment_saved 1
+	# FIXME: 32bit powerpc: guaranteed only if MASK_ALIGN_NATURAL/POWER.
+        set et_natural_alignment_saved 1
+        if { ([istarget *-*-darwin*] && [is-effective-target lp64]) } { 
+            set et_natural_alignment_saved 0
         }
     }
     verbose "check_effective_target_natural_alignment: returning $et_natural_alignment_saved" 2
@@ -2072,6 +2073,26 @@
     return $et_vector_alignment_reachable_saved
 }
 
+# Return 1 if vector alignment for soubles  is reachable, 0 otherwise.
+#
+# This won't change for different subtargets so cache the result.
+
+proc check_effective_target_vector_alignment_reachable_for_double { } {
+    global et_vector_alignment_reachable_for_double
+
+    if [info exists et_vector_alignment_reachable_for_double_saved] {
+        verbose "check_effective_target_vector_alignment_reachable_for_double: using cached result" 2
+    } else {
+        if { [check_effective_target_vect_aligned_arrays] } {
+            set et_vector_alignment_reachable_for_double_saved 1
+        } else {
+            set et_vector_alignment_reachable_for_double_saved 0
+        }
+    }
+    verbose "check_effective_target_vector_alignment_reachable_for_double: returning $et_vector_alignment_reachable_for_double_saved" 2
+    return $et_vector_alignment_reachable_for_double_saved
+}
+
 # Return 1 if the target supports vector conditional operations, 0 otherwise.
 
 proc check_effective_target_vect_condition { } {
Index: gfortran.dg/vect/vect-4.f90
===================================================================
--- gfortran.dg/vect/vect-4.f90	(revision 126889)
+++ gfortran.dg/vect/vect-4.f90	(working copy)
@@ -10,7 +10,8 @@
 END
 
 ! { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } 
-! { 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" 1 "vect" { xfail vect_no_align } } }
+! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_no_align || {! vector_alignment_reachable} } } } }
+! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align || {! vector_alignment_reachable} } } } }
+! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target {! vector_alignment_reachable} } } }
 ! { dg-final { scan-tree-dump-times "accesses have the same alignment." 1 "vect" } }
 ! { dg-final { cleanup-tree-dump "vect" } }
Index: gfortran.dg/vect/vect-5.f90
===================================================================
--- gfortran.dg/vect/vect-5.f90	(revision 126889)
+++ gfortran.dg/vect/vect-5.f90	(working copy)
@@ -36,16 +36,8 @@
         end
 
 ! { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect"  } }
-! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_no_align } } } }
+! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_no_align || {! vector_alignment_reachable} } } } }
 ! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align } } } }
-! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target { ilp32 && vect_no_align } } } }
-
-! 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). 
-
+! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target { vect_no_align } } } }
+! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target {! vector_alignment_reachable} } } }
 ! { dg-final { cleanup-tree-dump "vect" } }
Index: gfortran.dg/vect/vect-2.f90
===================================================================
--- gfortran.dg/vect/vect-2.f90	(revision 126889)
+++ gfortran.dg/vect/vect-2.f90	(working copy)
@@ -15,8 +15,8 @@
 ! support unaligned loads).
 
 ! { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" } }
-! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 3 "vect" { xfail vect_no_align } } }
-! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { target vect_no_align } } }
+! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 3 "vect" { xfail { vect_no_align || {! vector_alignment_reachable} } } } }
+! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { target { vect_no_align && {! vector_alignment_reachable} } } } }
 ! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail vect_no_align } } }
-! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 3 "vect" {target vect_no_align } } }
+! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 3 "vect" {target { vect_no_align || {! vector_alignment_reachable} } } } }
 ! { dg-final { cleanup-tree-dump "vect" } }
Index: gfortran.dg/vect/vect-3.f90
===================================================================
--- gfortran.dg/vect/vect-3.f90	(revision 126889)
+++ gfortran.dg/vect/vect-3.f90	(working copy)
@@ -6,6 +6,13 @@
 Y = Y + A * X
 END
 
-! fail to vectorize due to failure to compute number of iterations (PR tree-optimization/18527)
-! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail *-*-* } } } 
+! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 3 "vect" { target vect_no_align } } }
+! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { target vect_no_align } } } 
+
+! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { {! vect_no_align} && {! vector_alignment_reachable} } } } }
+! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target { {! vect_no_align} && {! vector_alignment_reachable} } } } }
+
+! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_no_align || {! vector_alignment_reachable} } } } }
+! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align || {! vector_alignment_reachable} } } } }
+
 ! { dg-final { cleanup-tree-dump "vect" } }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-08-07  8:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-07  8:29 [vectorizer testsuite] [patch] fix alignment checks in vectorizer testcases Dorit Nuzman

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).