================ @@ -4180,8 +4180,10 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, // If the base is a vector type, then we are forming a vector element lvalue // with this subscript. - if (E->getBase()->getType()->isVectorType() && - !isa<ExtVectorElementExpr>(E->getBase())) { + if (QualType BaseTy = E->getBase()->getType(); + (BaseTy->isVectorType() && !isa<ExtVectorElementExpr>(E->getBase())) || + (BaseTy->isBuiltinType() && + BaseTy->getAs<BuiltinType>()->isSveVLSBuiltinType())) { ---------------- efriedma-quic wrote:
In that case, it might make sense to introduce a helper Type::isSubscriptableVectorType() helper to types, so we can easily find all the places that care about this. https://github.com/llvm/llvm-project/pull/91965 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits