[Bug tree-optimization/64601] Missed PRE on std::vector move assignment
glisse at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jan 15 22:37:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64601
--- Comment #3 from Marc Glisse <glisse at gcc dot gnu.org> ---
Actually there is no need for inlining.
struct A { int i; };
void f(struct A *a){ *&a->i=0; }
void g(struct A *a){ int*p=&a->i;*p=0; }
The main difference seems to be that the first one gets through fold-const.c
while the second is handled by tree-ssa-forwprop.c.
More information about the Gcc-bugs
mailing list