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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2023-05-19
     Ever confirmed|0                           |1
          Component|middle-end                  |tree-optimization

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

(simplify
 (rrotate (bit_and @0 INTEGER_CST@1) INTEGER_CST@2)
 (if (@1 == (type)(~0) >> (typebits-@2))
  (lshift @0 { typebits - @2; }))

(simplify
 (lrotate (bit_and @0 INTEGER_CST@1) INTEGER_CST@2)
 (if (@1 == (type)(~0) >> (@2))
  (lshift @0 { @2; }))

There could be more dealing with the result being logical shift right.

Reply via email to