This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/64450] New: Optimize 0>=p-q to q>=p for char*p,*q;
- From: "gcc-bugzilla at contacts dot eelis.net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 30 Dec 2014 20:58:10 +0000
- Subject: [Bug c++/64450] New: Optimize 0>=p-q to q>=p for char*p,*q;
- Auto-submitted: auto-generated
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.