This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/32183] [4.3 Regression] reassoc2 can more extra calculations into a loop
- From: "rakdver at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Jun 2007 23:34:03 -0000
- Subject: [Bug tree-optimization/32183] [4.3 Regression] reassoc2 can more extra calculations into a loop
- References: <bug-32183-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #25 from rakdver at gcc dot gnu dot org 2007-06-04 23:34 -------
> > Reassoc should be fixed, we should not consider workarounds like this.
>
> Either fix or remove reassoc2 works for me :)
One possible fix is attached; it prevents us from reassociating across loop
boundaries. This might be too conservative, though, preventing us from
optimizing e.g.
x = ...
y = ...
while(...)
{
a = ...
b = a + x;
while (...)
c = b + y;
}
So probably this restriction should be applied only in reassoc2 (or reassoc2
should be removed, if Daniel believes it is not useful).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32183