[PATCH] D150665: [RISCV] Handle addimm chains in SelectAddrRegImm
Yingwei Zheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 17 23:41:33 PDT 2023
dtcxzyw added a comment.
In D150665#4351984 <https://reviews.llvm.org/D150665#4351984>, @craig.topper wrote:
> In D150665#4351914 <https://reviews.llvm.org/D150665#4351914>, @dtcxzyw wrote:
>
>> In D150665#4350578 <https://reviews.llvm.org/D150665#4350578>, @craig.topper wrote:
>>
>>> I feel like this should be handled where the chain was formed or in DAG combine. The whole reason the chain exists is to provide a common base. If the common base isn't right we should fix that.
>>
>> I cannot find code about forming chains in `RISCVISelLowering.cpp` and `RISCVISelDAGToDAG.cpp`. Should I implement some virtual member functions of class `TargetLowering`?
>
> I think the splitting is done by CodeGenPrepare::splitLargeGEPOffsets()
I think we can select a better offset by calling a new virtual function like `TLI->selectBaseOffset()` instead of just using GEP with the smallest offset.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150665/new/
https://reviews.llvm.org/D150665
More information about the llvm-commits
mailing list