[PATCH] D124657: [AMDGPU][ISEL] Directly custom lower INSERT_SUBVECTOR instead of via INSERT_VECTOR_ELT
Mahesha S via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 29 01:41:19 PDT 2022
hsmhsm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:5801
+ // instead of again taking it through INSERT_VECTOR_ELT.
+ Vec = InsertVecElt(Vec, Elt, CurIdx, SL, DAG);
+ } else {
----------------
foad wrote:
> I don't understand this. CurIdx is a ConstantSDNode here, so InsertVecElt will not do anything useful - it just returns SDValue().
Hmm, I did not realize it.
But, I was told that returning SDValue() means treat it as legal.
And, hence, no default expansion takes place which otherwise would introduce stack access?
I myself do not understand it - I need to further explore it in detail.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124657/new/
https://reviews.llvm.org/D124657
More information about the llvm-commits
mailing list