[RISCV] Add matching of codegen patterns to RISCV Bit Manipulation Zbt asm instructions
authorlewis-revill <lewis.revill@embecosm.com>
Wed, 15 Jul 2020 10:59:47 +0000 (11:59 +0100)
committerlewis-revill <lewis.revill@embecosm.com>
Wed, 15 Jul 2020 11:19:34 +0000 (12:19 +0100)
commitc9c955ada8e65205312f2bc41b46eefa0e98b36c
tree9c04f405516aa10b7c6315fe5b1c531246546b4a
parentd4be33374c07ea9a9362892876aa76b227298181
[RISCV] Add matching of codegen patterns to RISCV Bit Manipulation Zbt asm instructions

This patch provides optimization of bit manipulation operations by
enabling the +experimental-b target feature.
It adds matching of single block patterns of instructions to specific
bit-manip instructions from the ternary subset (zbt subextension) of the
experimental B extension of RISC-V.
It adds also the correspondent codegen tests.

This patch is based on Claire Wolf's proposal for the bit manipulation
extension of RISCV:
https://github.com/riscv/riscv-bitmanip/blob/master/bitmanip-0.92.pdf

Differential Revision: https://reviews.llvm.org/D79875
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.h
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVInstrInfoB.td
llvm/test/CodeGen/RISCV/rv32Zbt.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/rv64Zbt.ll [new file with mode: 0644]