This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/64622] convoluted loop codegen for __strcspn_c1
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 16 Jan 2015 03:23:04 +0000
- Subject: [Bug tree-optimization/64622] convoluted loop codegen for __strcspn_c1
- Auto-submitted: auto-generated
- References: <bug-64622-4 at http dot gcc dot gnu dot org/bugzilla/>
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.