This is an archive of the discontinued LLVM Phabricator instance.

[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