https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99919

--- Comment #16 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #15)
> (In reply to Jeffrey A. Law from comment #14)
> > So with a hackish match.pd pattern which recognizes these kinds of idioms:
> > 
> > 
> >   _1 = BIT_FIELD_REF <b, 8, 0>;
> >   _2 = _1 & 1;
> > ...
> > 
> > It doesn't work as-is because something in gimple-match*.cc is requiring @1
> > to be an SSA_NAME and rejects PARM_DECL.
> > 
> > Not really chasing this further right now, but there is a potential path
> > forward.  I'll also note that this transformation would likely help the
> > targets that have single bit extraction/manipulation like RISC-V and others.
> 
> 
> Right match only deals with ssa names;

Rightfully so, because it will move the load to the position of _2 w/o
verifying aliasing.  Loads (or stores) cannot be matched with match.pd.

> This could be added to forwprop like
> what is done for COMPLEX_EXPR recombing:
> 
>               /* Rewrite stores of a single-use complex build expression
>                  to component-wise stores.  */

Reply via email to