https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64622
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- This is what LLVM translates it to: long __strcspn_c1 (__const char *__s, int __reject) { register long __result = -1; do { ++__result; } while (__s[__result] != '\0' && __s[__result] != __reject); return __result; } I wonder how they do it though in a reasonable way.