https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61734
--- Comment #12 from Ilya Enkovich <enkovich.gnu at gmail dot com> --- Before your last fix both 32bit and 64bit versions of .original look similar except a condition. We have (a - b > 0) for 64 bit and (a > b) for 32bit. 64bit version (before and after the patch) { sum = ((int) a - (int) b > 0 ? (long unsigned int) ((int) a - (int) b) : (long unsigned int) ((int) b - (int) a)) + sum; return sum; } 32bit version (before the patch): { sum = ((int) a > (int) b ? (long unsigned int) ((int) a - (int) b) : (long unsigned int) ((int) b - (int) a)) + sum; return sum; } It is not clear why such difference exists though.