On Wed, Jul 13, 2011 at 11:18 AM, Ilya Enkovich <enkovich....@gmail.com> wrote: > 2011/7/13 Jakub Jelinek <ja...@redhat.com>: >> >> I disagree. Widening would result in worse code in most cases, as you need >> to sign extend all the operands. On the other side, I doubt you can >> actually usefully use the undefinedness of signed overflow for a series of >> 3 or more operands of the associative operation. >> >> Jakub >> > > Sounds reasonable. Type casting to unsigned should be a better solution here.
Well, the solution of course lies in the no-undefined-overflow branch where we have separate tree codes for arithmetic with/without undefined overflow. Richard. > Ilya >