[Bug tree-optimization/47579] STL size() == 0 does unnecessary shift

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Feb 1 22:54:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47579

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-02-01 22:54:19 UTC ---
I think v.size() should be simply optimized to work on char * pointer
differences.  Recognizing the optimization opportunity requires to see
dereferences of the pointers to deduce their alignment.



More information about the Gcc-bugs mailing list