This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/44838] [4.6 regression] RTL loop unrolling causes FAIL: gcc.dg/pr39794.c
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Jul 2010 11:06:06 -0000
- Subject: [Bug rtl-optimization/44838] [4.6 regression] RTL loop unrolling causes FAIL: gcc.dg/pr39794.c
- References: <bug-44838-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #24 from rguenth at gcc dot gnu dot org 2010-07-07 11:06 -------
In
...
*p_1 = x;
y = *(p_1 + 1);
...
I can say that *p_1 does not alias *(p_1 + 1) independent on what code
is around. If it would be
BB3:
# p_1 = PHI <p_0, p_2(3)>
*p_1 = x;
y = *(p_1 + 1);
p_2 = p_1 + 1;
goto BB3;
that would be still correct (I can exchange those two statements).
For cross loop-iteration dependence after unrolling you would see
accesses based on different pointer SSA name bases.
Now on RTL we are not in SSA form and so yes, this change might be
a bit fishy (I, too, just discovered this side-effect and I assumed
passes would already to something here).
A way around this is to either adjust or clear MEM_OFFSET.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44838