[PATCH] D92762: [clang][AArch64][SVE] Avoid going through memory for coerced VLST arguments
Cullen Rhodes via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 18 07:50:29 PST 2020
c-rhodes added inline comments.
================
Comment at: clang/lib/CodeGen/CGCall.cpp:2671-2673
+ // See if this is a VLST coerced to a VLAT at the function boundary and
+ // the types match up. If so, use llvm.experimental.vector.extract to
+ // perform the conversion.
----------------
this is slightly confusing since the coercion done in TargetInfo is from fixed -> scalable so VLSTs are represented as scalable vectors in functions args/return, yet this is casting back to fixed in the function prolog using `llvm.experimental.vector.extract` like you mention in the commit message, could this comment clarify that?
================
Comment at: clang/lib/CodeGen/CGCall.cpp:2674
+ // perform the conversion.
+ if (Ty->getAs<VectorType>()) {
+ auto *Coerced = Fn->getArg(FirstIRArg);
----------------
Do we want to check `VT->getVectorKind() == VectorType::SveFixedLengthDataVector` and `isa<llvm::ScalableVectorType>(Coerced->getType());`?
================
Comment at: clang/lib/CodeGen/CGCall.cpp:2681
+ VecTyFrom->getElementType() == VecTyTo->getElementType()) {
+ llvm::Value *Zero = llvm::Constant::getNullValue(this->CGM.Int64Ty);
+
----------------
`this->` can be dropped?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92762/new/
https://reviews.llvm.org/D92762
More information about the cfe-commits
mailing list