================ @@ -3083,6 +3083,19 @@ ScalarExprEmitter::VisitUnaryExprOrTypeTraitExpr( E->getTypeOfArgument()->getPointeeType())) .getQuantity(); return llvm::ConstantInt::get(CGF.SizeTy, Alignment); + } else if (E->getKind() == UETT_VectorElements) { + // For scalable vectors, we don't know the size at compile time. We can use + // @llvm.vscale to calculate it at runtime. + if (E->getTypeOfArgument()->isSizelessVectorType()) { + auto *VecTy = dyn_cast<llvm::ScalableVectorType>( + ConvertType(E->getTypeOfArgument())); + uint64_t NumUnscaledElements = VecTy->getMinNumElements(); ---------------- erichkeane wrote:
I'm not particularly familiar with the sizeless vector type here, I would have expected the argument here to be an unknown value/expression, right? Or is VScale doing something I'm unfamiliar with? But it too doesn't seem to take the vector type as an argument. https://github.com/llvm/llvm-project/pull/69010 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits