[Bug c++/64450] New: Optimize 0>=p-q to q>=p for char*p,*q;
gcc-bugzilla at contacts dot eelis.net
gcc-bugzilla@gcc.gnu.org
Tue Dec 30 20:58:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64450
Bug ID: 64450
Summary: Optimize 0>=p-q to q>=p for char*p,*q;
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc-bugzilla at contacts dot eelis.net
Created attachment 34365
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34365&action=edit
Testcase
It was noticed that Boost's iterator_facade incurred a performance penalty
(while it should ideally be zero-overhead), which results from the fact that
GCC does not optimize 0>=p-q to q>=p for char*p,*q;. See attachment.
This probably applies to > and < and <= as well.
More information about the Gcc-bugs
mailing list