[Bug tree-optimization/90917] 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:58:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90917
--- Comment #1 from Dávid Bolvanský <david.bolvansky at gmail dot com> ---
char f(void) {
char* s = ... ;
if (strcmp(global_s, s) == 0) return global_s[0];
return '-';
}
------>
char f2(void) {
char* s = ... ;
if (strcmp(global_s, s) == 0) return s[0];
return '-';
}
More information about the Gcc-bugs
mailing list