[RISCV] Support LUI+ADDIW in doPeepholeLoadStoreADDI.
authorCraig Topper <craig.topper@sifive.com>
Sat, 4 Jun 2022 00:58:22 +0000 (17:58 -0700)
committerCraig Topper <craig.topper@sifive.com>
Sat, 4 Jun 2022 01:06:56 +0000 (18:06 -0700)
commitcc3bd4353358858ae3146edc63c7e99242a19516
tree5da1dabcb3197ed8fef64980128080780d4bc4cd
parent9878facfd01cdfaab171b26850e609e78ba68b0e
[RISCV] Support LUI+ADDIW in doPeepholeLoadStoreADDI.

This fixes an inconsistency between RV32 and RV64. Still considering
trying to do this peephole during isel, but wanted to fix the
inconsistency first.

Reviewed By: reames

Differential Revision: https://reviews.llvm.org/D126986
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
llvm/test/CodeGen/RISCV/fold-addi-loadstore.ll