This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/52171] New: memcmp/strcmp/strncmp can be optimized when the result is tested for [in]equality with 0
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 08 Feb 2012 12:37:44 +0000
- Subject: [Bug tree-optimization/52171] New: memcmp/strcmp/strncmp can be optimized when the result is tested for [in]equality with 0
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52171
Bug #: 52171
Summary: memcmp/strcmp/strncmp can be optimized when the result
is tested for [in]equality with 0
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: rguenth@gcc.gnu.org
Blocks: 43052
On GIMPLE we should expand memcmp/strcmp/strncmp to inline integral compares
if the result is only tested against equality with 0.
See PR43052 where we hint at that these may be the only profitable cases
to inline for memcmp at least.