https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116651
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- >From bug 109442 comment #36 > I believe strlen_pass::handle_builtin_memcmp should eventually move to > forwprop (fold_stmt may not inspect immediate uses). That would help this particular case. yes I agree. There was a few other related `== 0` optimizations I want to add. e.g. strlen is one of them.