[Bug tree-optimization/96237] Failure to recognize and pattern composed of and+or after shift

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Jul 17 02:38:52 GMT 2021


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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |pinskia at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I am going to implement the match patterns needed.

Something like:
(for bitop (bit_and bit_ior)
 (simplify
  (cond @0 (bitop @1 integer_power2@2) @1)
  (bitop @1 (lshift @0 ({ log2(@2); }) ))))

Note log2 here is just psedu-code :).


More information about the Gcc-bugs mailing list