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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2024-11-08
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
          Component|c                           |middle-end
           Assignee|unassigned at gcc dot gnu.org      |pinskia at gcc dot 
gnu.org

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
      /* Two consecutive rotates adding up to the some integer
         multiple of the precision of the type can be ignored.  */
      if (code == RROTATE_EXPR && TREE_CODE (arg1) == INTEGER_CST
          && TREE_CODE (arg0) == RROTATE_EXPR
          && TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST
          && wi::umod_trunc (wi::to_wide (arg1)
                             + wi::to_wide (TREE_OPERAND (arg0, 1)),
                             prec) == 0)
        return fold_convert_loc (loc, type, TREE_OPERAND (arg0, 0));

This is all old code too.

I suspect it should be using wi::to_widest instead.

Let me try that.

Plus I suspect this should be moved to match too.

Reply via email to