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); }