Similar to DAGCombiner::visitRotate.
rotr x, 0 -> x rotl x, 0 -> x
This makes rotl_bitwidth_cst in postlegalizercombiner-rotate.mir reduce down to a COPY. Modify the checkline to make sure that only rotate_out_of_range runs there.
| Paths 
 |  Differential  D109264  
[GlobalISel] Add G_ROTL and G_ROTR to right_identity_zero ClosedPublic Authored by paquette on Sep 3 2021, 6:04 PM. 
Details Summary Similar to DAGCombiner::visitRotate. rotr x, 0 -> x rotl x, 0 -> x This makes rotl_bitwidth_cst in postlegalizercombiner-rotate.mir reduce down to a COPY. Modify the checkline to make sure that only rotate_out_of_range runs there. 
Diff Detail 
 Event TimelineComment Actions LGTM 
 This revision is now accepted and ready to land.Sep 3 2021, 6:40 PM Closed by commit rGac4896e2f372: [GlobalISel] Add G_ROTL and G_ROTR to right_identity_zero (authored by paquette).  ·  Explain WhySep 8 2021, 10:09 AM This revision was automatically updated to reflect the committed changes. 
Revision Contents 
 
Diff 371385 llvm/include/llvm/Target/GlobalISel/Combine.td
 llvm/test/CodeGen/AArch64/GlobalISel/postlegalizercombiner-rotate.mir
 llvm/test/CodeGen/AArch64/GlobalISel/prelegalizercombiner-trivial-arith.mir
 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
extra ...