[PATCH] D126986: [RISCV] Support LUI+ADDIW in doPeepholeLoadStoreADDI.
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 3 12:42:20 PDT 2022
reames added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp:2248
+ Offset += cast<ConstantSDNode>(Base.getOperand(1))->getSExtValue();
+ if (!isInt<32>(Offset))
+ return false;
----------------
Correct me if I'm wrong here, but isn't this the same as proving we could replace the ADDIW with an ADDI? If so, should that be done somewhere else generically?
================
Comment at: llvm/test/CodeGen/RISCV/fold-addi-loadstore.ll:321
+
+define dso_local i32 @load_const_medium() nounwind {
+; RV32I-LABEL: load_const_medium:
----------------
Can you precommit these please? I need to see the current code to wrap my head around the change,
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126986/new/
https://reviews.llvm.org/D126986
More information about the llvm-commits
mailing list