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

--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #9)
> Note for rotate it is as simple as:
> (for cmp (eq ne)
>  (simplify
>   (cmp (rotate @0 INTEGER_CST@1) INTEGER_CST@2)
>   (cmp @0 (rotate @2 @1))))
> 
> Let me see if that is already there or not and test that one out.

Well it is already done (and I messed up the above which should have been
invrotote anyways):

  /* (X >>r C1) cmp C2 may simplify to X cmp C3. */
  (simplify
   (cmp (rotate @0 INTEGER_CST@1) INTEGER_CST@2)
   (cmp @0 { const_binop (invrot, TREE_TYPE (@0), @2, @1); }))

So it is just lshift and rshift that need to be implemented.

Reply via email to