[PATCH] D111633: [SelectionDAG] Fix getVectorSubVecPointer for scalable subvectors.
Sander de Smalen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 12 05:23:14 PDT 2021
sdesmalen added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:7873
"Sub-vector must be a fixed vector with matching element type");
Index = clampDynamicVectorIndex(DAG, Index, VecVT, dl,
SubVecVT.getVectorNumElements());
----------------
david-arm wrote:
> Hi @sdesmalen, it's just a thought, but while you're in this area is it also worth clamping the index for scalable vectors too? The comment above is incorrect, because we do explicitly clamp the index in other places for scalable vectors.
I don't think any clamping is required, because when both the subvector and the vector being inserted into are scalable, we know at compiletime whether the vector index will exceed the size of the input vector.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111633/new/
https://reviews.llvm.org/D111633
More information about the llvm-commits
mailing list