[RISCV] Combine (GORCI (GORCI x, C2), C1) -> (GORCI x, C1|C2).
authorCraig Topper <craig.topper@sifive.com>
Mon, 30 Nov 2020 16:33:10 +0000 (08:33 -0800)
committerCraig Topper <craig.topper@sifive.com>
Mon, 30 Nov 2020 16:42:46 +0000 (08:42 -0800)
commitbfc4f29f46b4961c0532cf734f5d15015b4f7120
tree97bde799ec0437d11ec574ea64e1a35aae34447d
parent9eb2c0113dfe2c1054e524122ca0e17ad552bb01
[RISCV] Combine (GORCI (GORCI x, C2), C1) -> (GORCI x, C1|C2).

Unlike GREVI, GORCI stages can't be undone, but they are
redundant if done more than once.

Differential Revision: https://reviews.llvm.org/D92295
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/test/CodeGen/RISCV/rv32Zbp.ll
llvm/test/CodeGen/RISCV/rv64Zbp.ll