[Bug tree-optimization/90917] New: Propagate constants into loads if dominated by str(n)cmp/memcmp
david.bolvansky at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Jun 18 16:49:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90917
Bug ID: 90917
Summary: Propagate constants into loads if dominated by
str(n)cmp/memcmp
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: david.bolvansky at gmail dot com
Target Milestone: ---
Motivation:
char f(char* s) {
if (strcmp(s, "test") == 0) return s[0];
return '-';
}
--->
char f2(char* s) {
if (strcmp(s, "test") == 0) return 't';
return '-';
}
More information about the Gcc-bugs
mailing list