[GlobalISel] Add G_ROTL and G_ROTR to right_identity_zero
authorJessica Paquette <jpaquette@apple.com>
Sat, 4 Sep 2021 00:55:13 +0000 (17:55 -0700)
committerJessica Paquette <jpaquette@apple.com>
Wed, 8 Sep 2021 17:09:02 +0000 (10:09 -0700)
commitac4896e2f37296ef47aa6f03723d275de23180f7
treebd348fb43ecda6784185cd4dcddc3e37c5ca0a98
parentaca14c8cf169bcd1b51f8074c422959cc19b6779
[GlobalISel] Add G_ROTL and G_ROTR to right_identity_zero

Similar to `DAGCombiner::visitRotate`.

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.

Differential Revision: https://reviews.llvm.org/D109264
llvm/include/llvm/Target/GlobalISel/Combine.td
llvm/test/CodeGen/AArch64/GlobalISel/postlegalizercombiner-rotate.mir
llvm/test/CodeGen/AArch64/GlobalISel/prelegalizercombiner-trivial-arith.mir