diff options
author | Ira Rosen <irar@il.ibm.com> | 2009-05-28 09:02:53 +0000 |
---|---|---|
committer | Ira Rosen <irar@gcc.gnu.org> | 2009-05-28 09:02:53 +0000 |
commit | 24adb18fce3b0263d959b11f52baeaa54dcdb8e9 (patch) | |
tree | a99db9e2ac7ceb41f1fe537971ad4d7160246508 /gcc/tree-data-ref.c | |
parent | 2c5bfdf70b616ace5c3f5322299ccc9729e08384 (diff) | |
download | gcc-24adb18fce3b0263d959b11f52baeaa54dcdb8e9.zip gcc-24adb18fce3b0263d959b11f52baeaa54dcdb8e9.tar.gz gcc-24adb18fce3b0263d959b11f52baeaa54dcdb8e9.tar.bz2 |
re PR tree-optimization/40254 (SPEC2006 403.gcc miscompares)
PR tree-optimization/40254
* tree-data-ref.c (dr_analyze_innermost): Take POFFSET into account
in analysis of basic blocks.
From-SVN: r147945
Diffstat (limited to 'gcc/tree-data-ref.c')
-rw-r--r-- | gcc/tree-data-ref.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c index dc79e8a..2181f46 100644 --- a/gcc/tree-data-ref.c +++ b/gcc/tree-data-ref.c @@ -718,17 +718,26 @@ dr_analyze_innermost (struct data_reference *dr) 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); |