Re: [patch] Small enhancement to associate_plusminus

2014-05-22 Thread Eric Botcazou
> I'm a little worried that introducing PLUS_EXPR_CODE_P and friends > invites too easy (not well thought) uses of it - they are distinct enough > that we have very few "common" code-paths given the constraints on > op2 of POINTER_PLUS_EXPR. "grep -A1 -B1 POINTER_PLUS_EXPR *.c" convinced me of the

Re: [patch] Small enhancement to associate_plusminus

2014-05-22 Thread Richard Biener
On Wed, May 21, 2014 at 9:45 PM, Eric Botcazou wrote: > Hi, > > one of the transformations performed by associate_plusminus is: > > /* Second match patterns that allow contracting a plus-minus pair > irrespective of overflow issues. > > [...] > (T)(P + A) - (T)P -> (T)A > > but i

[patch] Small enhancement to associate_plusminus

2014-05-21 Thread Eric Botcazou
Hi, one of the transformations performed by associate_plusminus is: /* Second match patterns that allow contracting a plus-minus pair irrespective of overflow issues. [...] (T)(P + A) - (T)P -> (T)A but it is actually applied only to POINTER_PLUS_EXPR and pointer types: