[PATCH] D146872: [1/11][IR] Permit load/store/alloca for struct of the same scalable vector type
Zixuan Wu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun May 21 20:53:28 PDT 2023
zixuan-wu added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp:160
+ (isa<StructType>(Ty) &&
+ cast<StructType>(Ty)->containsScalableVectorType())) {
MF->getFrameInfo().setStackID(FrameIndex,
----------------
eopXD wrote:
> nikic wrote:
> > Use `isScalableTy()`?
> Changing this to checking `Ty->isScalableTy()` results in changes the code generation of `llvm/test/CodeGen/AArch64/sme-aarch64-svcount.ll`. The change makes sense to me, but the code generation is worse here, @sdesmalen may you confirm if this is reasonable?
> Changing this to checking `Ty->isScalableTy()` results in changes the code generation of `llvm/test/CodeGen/AArch64/sme-aarch64-svcount.ll`. The change makes sense to me, but the code generation is worse here, @sdesmalen may you confirm if this is reasonable?
Hi. As Ty->isScalableTy() contains target scalable type, it extends the semantic. So it's not only for scalable vector type. I think we can pass the ty as argument to distinguish them in target TFI, then getStackIDForScalableVectors would be better to be named 'getStackIDForScalableTy'
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146872/new/
https://reviews.llvm.org/D146872
More information about the llvm-commits
mailing list