This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/40254] [4.5 Regression] SPEC2006 403.gcc miscompares
- From: "irar at il dot ibm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 May 2009 09:59:37 -0000
- Subject: [Bug tree-optimization/40254] [4.5 Regression] SPEC2006 403.gcc miscompares
- References: <bug-40254-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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