[llvm] 4d7510c - [RISCV] Remove untested code from SelectAddrRegRegScale. (#146185)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 27 21:55:14 PDT 2025
Author: Craig Topper
Date: 2025-06-27T21:55:11-07:00
New Revision: 4d7510c33525fe50be79239a1348260c39fa522e
URL: https://github.com/llvm/llvm-project/commit/4d7510c33525fe50be79239a1348260c39fa522e
DIFF: https://github.com/llvm/llvm-project/commit/4d7510c33525fe50be79239a1348260c39fa522e.diff
LOG: [RISCV] Remove untested code from SelectAddrRegRegScale. (#146185)
This code handled load/store addresses that are a SHL instruction. That
seems very unlikely to occur unless you're accessing an array that
starts at address 0. I'm not even sure if you can represent that in llvm
IR.
Added:
Modified:
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
index 4539efd591c8b..29eac6317080f 100644
--- a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
@@ -2824,10 +2824,6 @@ bool RISCVDAGToDAGISel::SelectAddrRegRegScale(SDValue Addr,
Base = Addr.getOperand(0);
return true;
}
- } else if (UnwrapShl(Addr, Index, Scale)) {
- EVT VT = Addr.getValueType();
- Base = CurDAG->getRegister(RISCV::X0, VT);
- return true;
}
return false;
More information about the llvm-commits
mailing list