This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/64622] convoluted loop codegen for __strcspn_c1


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]