[PATCH] D140638: [Codegen][LegalizeIntegerTypes] New legalization strategy for scalar shifts: shift through stack
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 3 17:13:33 PST 2023
efriedma added a comment.
I won't insist on implementing everything in one patch. I was going to say we need a bailout for targets that don't have unaligned loads... but looking at llvm/test/CodeGen/RISCV/shifts.ll, I guess the previous codegen is terrible enough that it's an improvement even if we expand unaligned loads to byte loads. So I guess that's fine.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:4160
+ // And spill it into the stack slot.
+ Ch = DAG.getStore(Ch, dl, Init, StackPtr, MachinePointerInfo());
+
----------------
MachinePointerInfo::getUnknownStack instead of MachinePointerInfo()? Or actually, DAGTypeLegalizer::SplitVecRes_INSERT_SUBVECTOR does the following:
```
auto FrameIndex = cast<FrameIndexSDNode>(StackPtr.getNode())->getIndex();
auto PtrInfo = MachinePointerInfo::getFixedStack(MF, FrameIndex);
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140638/new/
https://reviews.llvm.org/D140638
More information about the llvm-commits
mailing list