[RISCV] Add RISCVISD::ROLW/RORW use those for custom legalizing i32 rotl/rotr on...
authorCraig Topper <craig.topper@sifive.com>
Fri, 20 Nov 2020 18:11:34 +0000 (10:11 -0800)
committerCraig Topper <craig.topper@sifive.com>
Fri, 20 Nov 2020 18:25:47 +0000 (10:25 -0800)
commit78767b7f8e8a31d0941a572ecab0918f6fcc8024
tree4caeffd64d42836dac437d01e34f501c2aaec0c5
parent0341029bb414d346edcceeeabaf4c5bb3312c38c
[RISCV] Add RISCVISD::ROLW/RORW use those for custom legalizing i32 rotl/rotr on RV64IZbb.

This should result in better utilization of RORIW since we
don't need to look for a SIGN_EXTEND_INREG that may not exist.

Also remove rotl/rotr isel matching to GREVI and just prefer RORI.
This is to keep consistency so we don't have to match ROLW/RORW
to GREVIW as well. I imagine RORI/RORIW performance will be the
same or better than GREVI.

Differential Revision: https://reviews.llvm.org/D91449
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.h
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.h
llvm/lib/Target/RISCV/RISCVInstrInfoB.td
llvm/test/CodeGen/RISCV/rv32Zbp.ll
llvm/test/CodeGen/RISCV/rv64Zbbp.ll
llvm/test/CodeGen/RISCV/rv64Zbp.ll