http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49963
--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-08-03 20:29:51 UTC --- Created attachment 24909 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24909 Draft patch I'm attaching a patch which tries to implement what Joseph suggests (thanks!). Essentially, I'm replacing all uses of abs_hwi outside hwint.c itself, besides three in tree-ssa-math-opts.c which seem correct anyway: the argument is an HOST_WIDE_INT / 2 or / 3 and the result is passed to a function taking a plain HOST_WIDE_INT. Type-wise the patch makes a lot of sense to me. Maybe submitter could test it? I'm sanity checking it on x86_64.