This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/40254] [4.5 Regression] SPEC2006 403.gcc miscompares



------- Comment #5 from irar at il dot ibm dot com  2009-05-27 09:59 -------
I'll test this patch tomorrow:

Index: tree-data-ref.c
===================================================================
--- tree-data-ref.c     (revision 147903)
+++ tree-data-ref.c     (working copy)
@@ -718,17 +725,26 @@ dr_analyze_innermost (struct data_refere
       base_iv.no_overflow = true;
     }

-  if (!poffset || !in_loop)
+  if (!poffset)
     {
       offset_iv.base = ssize_int (0);
       offset_iv.step = ssize_int (0);
     }
-  else if (!simple_iv (loop, loop_containing_stmt (stmt),
-                      poffset, &offset_iv, false))
+  else
     {
-      if (dump_file && (dump_flags & TDF_DETAILS))
-       fprintf (dump_file, "failed: evolution of offset is not affine.\n");
-      return false;
+      if (!in_loop)
+        {
+          offset_iv.base = poffset;
+          offset_iv.step = ssize_int (0);
+        }
+      else if (!simple_iv (loop, loop_containing_stmt (stmt),
+                          poffset, &offset_iv, false))
+        {
+          if (dump_file && (dump_flags & TDF_DETAILS))
+            fprintf (dump_file, "failed: evolution of offset is not"
+                                " affine.\n");
+          return false;
+        }
     }

   init = ssize_int (pbitpos / BITS_PER_UNIT);


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40254


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]