OSDN Git Service

PR tree-optimization/23073
authordorit <dorit@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 27 Jul 2005 15:19:45 +0000 (15:19 +0000)
committerdorit <dorit@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 27 Jul 2005 15:19:45 +0000 (15:19 +0000)
        * tree-vect-analyze.c (vect_analyze_data_refs_alignment): Call
        vect_print_dump_info before fprintf.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102431 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/nodump-pr23073.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect.exp
gcc/tree-vect-analyze.c

index c6e2ad5..0f5218b 100644 (file)
@@ -1,3 +1,9 @@
+2005-07-27  Dorit Nuzman  <dorit@il.ibm.com>
+
+       PR tree-optimization/23073
+       * tree-vect-analyze.c (vect_analyze_data_refs_alignment): Call 
+       vect_print_dump_info before fprintf.
+
 2005-07-27  Zdenek Dvorak  <dvorakz@suse.cz>
 
        PR tree-optimize/22348
index 0e3760d..cffece4 100644 (file)
@@ -1,3 +1,9 @@
+2005-07-27  Dorit Nuzman  <dorit@il.ibm.com>
+
+       PR tree-optimization/23073
+       * gcc.dg/vect/nodump-pr23073.c: New test.
+       * gcc.dg/vect/vect.exp: Allow running some tests without dump flags.
+
 2005-07-27  Zdenek Dvorak  <dvorakz@suse.cz>
 
        PR tree-optimize/22348
diff --git a/gcc/testsuite/gcc.dg/vect/nodump-pr23073.c b/gcc/testsuite/gcc.dg/vect/nodump-pr23073.c
new file mode 100644 (file)
index 0000000..d132799
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
+
+extern struct {
+  int o[2];
+  int p[2];
+} d;
+
+void C()
+{
+  int i;
+
+  for( i=0; i<2; ++i )
+    {
+      d.o[i] = 0;
+      d.p[i] = 0;
+    }
+  return;
+}
index 07b7e94..ccfe054 100644 (file)
@@ -23,8 +23,7 @@ load_lib gcc-dg.exp
 set DEFAULT_VECTCFLAGS ""
 
 # These flags are used for all targets.
-lappend DEFAULT_VECTCFLAGS "-O2" "-ftree-vectorize" \
-  "-ftree-vectorizer-verbose=4" "-fdump-tree-vect-stats"
+lappend DEFAULT_VECTCFLAGS "-O2" "-ftree-vectorize"
 
 # If the target system supports vector instructions, the default action
 # for a test is 'run', otherwise it's 'compile'.  Save current default.
@@ -75,6 +74,12 @@ if [istarget "powerpc*-*-*"] {
 # Initialize `dg'.
 dg-init
 
+# Tests that should be run without generating dump info
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/nodump-*.\[cS\]]]  \
+       "" $DEFAULT_VECTCFLAGS
+
+lappend DEFAULT_VECTCFLAGS "-ftree-vectorizer-verbose=4" "-fdump-tree-vect-stats"
+
 # Main loop.
 dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/pr*.\[cS\]]]  \
        "" $DEFAULT_VECTCFLAGS
index 45deb5c..6786161 100644 (file)
@@ -1056,13 +1056,16 @@ vect_analyze_data_refs_alignment (loop_vec_info loop_vinfo)
       supportable_dr_alignment = vect_supportable_dr_alignment (dr);
       if (!supportable_dr_alignment)
        {
-            if (DR_IS_READ (dr))
-              fprintf (vect_dump,
-                       "not vectorized: unsupported unaligned load.");
-            else
-              fprintf (vect_dump,
-                       "not vectorized: unsupported unaligned store.");
-           return false;
+         if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+           {
+             if (DR_IS_READ (dr))
+               fprintf (vect_dump,
+                        "not vectorized: unsupported unaligned load.");
+             else
+               fprintf (vect_dump,
+                        "not vectorized: unsupported unaligned store.");
+           }
+         return false;
        }
       if (supportable_dr_alignment != dr_aligned 
          && (vect_print_dump_info (REPORT_ALIGNMENT)))