[RISCV] Lower GREVI and GORCI as custom nodes
authorFraser Cormack <fraser@codeplay.com>
Wed, 11 Nov 2020 13:41:55 +0000 (13:41 +0000)
committerFraser Cormack <fraser@codeplay.com>
Thu, 19 Nov 2020 18:11:42 +0000 (18:11 +0000)
commit1ac9b548310c22ee558f04dd49d08ace0ccfb568
treed9854287a7a959584fa00e946882085864e298c4
parent5b7bd89b3597c0175f99db1bbf9062ccbea85883
[RISCV] Lower GREVI and GORCI as custom nodes

This moves the recognition of GREVI and GORCI from TableGen patterns
into a DAGCombine. This is done primarily to match "deeper" patterns in
the future, like (grevi (grevi x, 1) 2) -> (grevi x, 3).

TableGen is not best suited to matching patterns such as these as the compile
time of the DAG matchers quickly gets out of hand due to the expansion of
commutative permutations.

Reviewed By: craig.topper

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