This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/32698] [4.3 regression] inefficient pointer expression
- 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: 20 Jul 2007 17:22:05 -0000
- Subject: [Bug tree-optimization/32698] [4.3 regression] inefficient pointer expression
- References: <bug-32698-14001@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #20 from rguenth at gcc dot gnu dot org 2007-07-20 17:22 -------
Whoops ;) I missed that.
I have a counter-example that is better with the patch in the same way yours
is worse with it.
void f(unsigned int *p, unsigned int a)
{
p[0] = a * 4 + 4;
p[1] = a * 8 + 8;
p[2] = a * 12 + 12;
}
As I said, the fold canonicalization is just canonicalization, the code
generation has to be fixed elsewhere.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32698