[Bug c/46186] Clang creates code running 1600 times faster than gcc's
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Oct 26 21:00:00 GMT 2010
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46186
--- Comment #20 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-10-26 21:00:11 UTC ---
If I translate the assembly back to C, it seems it is performing part of the
arithmetics in TImode:
unsigned long f (unsigned long a, unsigned long b)
{
if (a >= b)
return 0;
else
return (a + 1) * (b - 1 - a) + a + (unsigned long)(((unsigned __int128) (b
- 1 - a) * (b - 2 - a)) >> 1);
}
More information about the Gcc-bugs
mailing list