[Bug lto/55118] Missed forward propagation of addresses
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55118 Richard Biener changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #3 from Richard Biener --- We lower both cases now in laddress (after object-size folding and after inlining...). So "fixed" but not really for inlining.
[Bug lto/55118] Missed forward propagation of addresses
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55118 --- Comment #2 from Richard Biener 2012-10-30 11:11:35 UTC --- We can't really do much here without breaking type-based alias analysis and data dependence analysis (which depends on seeing only array-refs when they were present in the original source). Which means that it is eventually worth considering to lower the address forms some more (even the rare case we combine them with dereferences in forwprop is suspicious). Thus, lower : # i_66 = PHI _12 = &MEM[(const struct Domain *)_10 + 32B].D.119657.domain_m[i_66].D.114927; _13 = &MEM[(struct Domain *)this_1(D) + 8B].D.119657.domain_m[i_66].D.114927; _14 = MEM[(const Element_t[2] &)_12]; MEM[(Element_t[2] &)_13][0] = _14; _15 = MEM[(const Element_t[2] &)_12 + 4]; MEM[(Element_t[2] &)_13][1] = _15; i_16 = i_66 + 1; if (i_16 != 3) goto ; to sth like tem = i_66 * 4; tem = tem + 32; _12 = _10 + tem; nothing for 4.8 though. And it will badly interact with __builtin_object_size again.
[Bug lto/55118] Missed forward propagation of addresses
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55118 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2012-10-29 Blocks|54776 | AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org |gnu.org | Ever Confirmed|0 |1 --- Comment #1 from Richard Biener 2012-10-29 15:37:53 UTC --- I will investigate what we can do. I ripped out the old propagation stuff because we miscompiled things. The first case cannot be simplified without "lowering" &expr_1(D)->left_m to expr_1(D) which will cause issues with __builtin_object_size handling. The 2nd case is because we cannot express dereferencing _5 with TBAA type Element_t[2] when trying to "inline-expand" it's address. That is, MEM[(const Element_t[2] &) &MEM[(const struct Domain *)&D.660972].D.123571.domain_m[i_4].D.118841 ]; does not simplify because of the variable-offset address. The only case we can simplify it is if D.118841 has type Element_t[2] but this is usually not the case as far as I remember. I'll still look into the details.