Re: Fold BIT_FIELD_REF of a reference

2013-04-04 Thread Richard Biener
On Thu, Apr 4, 2013 at 12:11 PM, Marc Glisse wrote: > On Thu, 4 Apr 2013, Richard Biener wrote: > >> On Thu, Apr 4, 2013 at 10:53 AM, Marc Glisse wrote: >>> >>> On Thu, 4 Apr 2013, Richard Biener wrote: >>> >>> + if ((handled_component_p (arg0) || TREE_CODE (arg0) == >>> MEM_REF) >>>

Re: Fold BIT_FIELD_REF of a reference

2013-04-04 Thread Marc Glisse
On Thu, 4 Apr 2013, Richard Biener wrote: On Thu, Apr 4, 2013 at 10:53 AM, Marc Glisse wrote: On Thu, 4 Apr 2013, Richard Biener wrote: + if ((handled_component_p (arg0) || TREE_CODE (arg0) == MEM_REF) This check means the optimization is not performed for BIT_FIELD_REF[a, *, CST] w

Re: Fold BIT_FIELD_REF of a reference

2013-04-04 Thread Richard Biener
On Thu, Apr 4, 2013 at 10:53 AM, Marc Glisse wrote: > On Thu, 4 Apr 2013, Richard Biener wrote: > > + if ((handled_component_p (arg0) || TREE_CODE (arg0) == MEM_REF) This check means the optimization is not performed for BIT_FIELD_REF[a, *, CST] which I see no par

Re: Fold BIT_FIELD_REF of a reference

2013-04-04 Thread Marc Glisse
On Thu, 4 Apr 2013, Richard Biener wrote: + if ((handled_component_p (arg0) || TREE_CODE (arg0) == MEM_REF) This check means the optimization is not performed for BIT_FIELD_REF[a, *, CST] which I see no particularly good reason for. Er, are you trying to get rid of all BIT_FIELD_REFs?

Re: Fold BIT_FIELD_REF of a reference

2013-04-04 Thread Richard Biener
On Thu, Apr 4, 2013 at 9:23 AM, Marc Glisse wrote: > On Wed, 3 Apr 2013, Richard Biener wrote: > >> On Wed, Apr 3, 2013 at 4:15 PM, Marc Glisse wrote: >>> >>> Hello, >>> >>> I am not 100% convinced that it is always better to fold to a MEM_REF, >>> but >>> that's what the PR asks for. >>> >>> boo

Re: Fold BIT_FIELD_REF of a reference

2013-04-04 Thread Marc Glisse
On Wed, 3 Apr 2013, Richard Biener wrote: On Wed, Apr 3, 2013 at 4:15 PM, Marc Glisse wrote: Hello, I am not 100% convinced that it is always better to fold to a MEM_REF, but that's what the PR asks for. bootstrap+testsuite on x86_64-linux-gnu. 2013-04-03 Marc Glisse PR middle-e

Re: Fold BIT_FIELD_REF of a reference

2013-04-03 Thread Richard Biener
On Wed, Apr 3, 2013 at 4:15 PM, Marc Glisse wrote: > Hello, > > I am not 100% convinced that it is always better to fold to a MEM_REF, but > that's what the PR asks for. > > bootstrap+testsuite on x86_64-linux-gnu. > > 2013-04-03 Marc Glisse > > PR middle-end/52436 > gcc/ > * fo