Recommit "[RISCV] Use selectShiftMaskXLen ComplexPattern for isel of rotates."
authorCraig Topper <craig.topper@sifive.com>
Tue, 24 May 2022 16:41:04 +0000 (09:41 -0700)
committerCraig Topper <craig.topper@sifive.com>
Tue, 24 May 2022 16:41:04 +0000 (09:41 -0700)
commit415b9f595d4d2fae947f86b239777ec54c3824dc
treec91229746d8c485178a0b219921edfddd6394736
parentcddeb78e8d5b7b924c920fb702d3d883b2661b12
Recommit "[RISCV] Use selectShiftMaskXLen ComplexPattern for isel of rotates."

This reverts commit dfe513ae1bb6e788ead93b850d80d77d54cf29d3.

Tests have been changed to avoid the type legalization bug being
fixed in D126036.

Original commit message:
This will remove masks on the shift amount. We usually get this with
SimplifyDemandedBits in DAGCombine, but that's restricted to cases
where the AND has a single use. selectShiftMaskXLen does not have
that restriction.
llvm/lib/Target/RISCV/RISCVInstrInfoZb.td
llvm/test/CodeGen/RISCV/rotl-rotr.ll