[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 07:59:59 PDT 2021
sdesmalen added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:7876
+ } else
+ Index =
+ DAG.getNode(ISD::MUL, dl, IdxVT, Index,
----------------
CarolineConcatto wrote:
> Can you do something like this:
>
> ```
>
> Index = DAG.getVScale(DL, IdxVT, APInt(IdxVT.getSizeInBits(), Index.getConstantOperandVal(0)));
> ```
> ?
> Insead of multiply the index by a scalable vector of size 1?
I'm not sure if you can always know for sure that Index is a constant value so that's why I used an explicit multiply with vscale.
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