------- 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