Re: [PATCH] Fix up extract_muldiv for NEGATE_EXPR (PR tree-optimization/56250)

2013-02-08 Thread Richard Biener
On Fri, 8 Feb 2013, Jakub Jelinek wrote: > Hi! > > As the testcase shows, treating (-something_unsigned) / c as > -(something_unsigned / c) is wrong for unsigned types, seems to be > fine for signed types even for -fwrapv and for multiplication > instead of / or % looks fine to me too. > > Boots

[PATCH] Fix up extract_muldiv for NEGATE_EXPR (PR tree-optimization/56250)

2013-02-08 Thread Jakub Jelinek
Hi! As the testcase shows, treating (-something_unsigned) / c as -(something_unsigned / c) is wrong for unsigned types, seems to be fine for signed types even for -fwrapv and for multiplication instead of / or % looks fine to me too. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for t