http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49963
--- Comment #6 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-08-08 08:28:46 UTC --- (In reply to comment #5) > Created attachment 24909 [details] > 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. That works for me, i.e. gcc.c-torture/execute/divconst-2.c passes with your patch.