[PATCH] D97582: [LegalizeVectorTypes] Improve SplitVecRes_INSERT_SUBVECTOR to handle subvector being in the high half of the split or not at element 0 of the low half.
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 27 02:47:27 PST 2021
RKSimon added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:1265
+ // If we know the index is in the first half, and we know the subvector
+ // doesn't cross the/ boundary between the halves, we can avoid spilling the
+ // vector, and insert into the lower half of the split vector directly.
----------------
typo /
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:1269
unsigned IdxVal = cast<ConstantSDNode>(Idx)->getZExtValue();
- if ((IdxVal == 0) && (IdxVal + SubElems <= VecElems / 2)) {
+ if (IdxVal >= 0 && (IdxVal + SubElems <= VecElems / 2)) {
EVT LoVT, HiVT;
----------------
Should we be using LoVT.getVectorNumElements() to compute the boundary?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97582/new/
https://reviews.llvm.org/D97582
More information about the llvm-commits
mailing list