[RISCV] Select signed and unsigned bitfield extracts for XTHeadBb
authorPhilipp Tomsich <philipp.tomsich@vrull.eu>
Fri, 17 Feb 2023 20:11:51 +0000 (21:11 +0100)
committerPhilipp Tomsich <philipp.tomsich@vrull.eu>
Fri, 17 Feb 2023 20:46:26 +0000 (21:46 +0100)
commit10b7cd660c73f704ad8610828e80b33c241451df
treeddae260637131ac54a9e26d1e13b0b35c2814e9d
parent2f88c07cf820cff829dec5906d298fc7147af8dd
[RISCV] Select signed and unsigned bitfield extracts for XTHeadBb

The XTHeadBb extension hab both signed and unsigned bitfield
extraction instructions (TH.EXT and TH.EXTU, respectively) which have
previously only been supported for sign extension on byte, halfword,
and word-boundaries.

This adds the infrastructure to use TH.EXT and TH.EXTU for arbitrary
bitfield extraction.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D144229
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.h
llvm/lib/Target/RISCV/RISCVInstrInfoXTHead.td
llvm/test/CodeGen/RISCV/bitextract-mac.ll
llvm/test/CodeGen/RISCV/rotl-rotr.ll
llvm/test/CodeGen/RISCV/rv32xtheadbb.ll
llvm/test/CodeGen/RISCV/rv64xtheadbb.ll