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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to