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

--- Comment #15 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(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; 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