[PATCH] D147347: [RISCV] Use tail agnostic policy more often when lowering insert_subvector
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 31 21:40:40 PDT 2023
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:6589
unsigned Policy = RISCVII::TAIL_UNDISTURBED_MASK_UNDISTURBED;
- if (VecVT.isFixedLengthVector() &&
- OrigIdx + 1 == VecVT.getVectorNumElements())
+ if (VecVT.isFixedLengthVector() && EndIndex >= VecVT.getVectorNumElements())
Policy = RISCVII::TAIL_AGNOSTIC;
----------------
luke wrote:
> craig.topper wrote:
> > Can EndIndex ever be > than VecVT.getVectorNumElements()?
> Would cases like `insert_subvector a:v4i8, b:v2i8, 3:i32` reach here? Not sure if this is legal, but I thought EndIndex here would be 2+3=5
I think the insertion index must be a multiple of the known minimum length of the subvector.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147347/new/
https://reviews.llvm.org/D147347
More information about the llvm-commits
mailing list