[RISCV] Add matching of codegen patterns to RISCV Bit Manipulation Zbs asm instructions
authorlewis-revill <lewis.revill@embecosm.com>
Wed, 15 Jul 2020 10:57:29 +0000 (11:57 +0100)
committerlewis-revill <lewis.revill@embecosm.com>
Wed, 15 Jul 2020 11:19:34 +0000 (12:19 +0100)
commitd4be33374c07ea9a9362892876aa76b227298181
tree9ec08d9bfde59b930e092ba1d3b12f45a7de2864
parent6144f0a1e52e7f5439a67267ca65f2d72c21aaa6
[RISCV] Add matching of codegen patterns to RISCV Bit Manipulation Zbs 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 single-bit subset (zbs 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/D79874
llvm/lib/Target/RISCV/RISCVInstrInfoB.td
llvm/test/CodeGen/RISCV/rv32Zbs.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/rv64Zbs.ll [new file with mode: 0644]