@@ -5945,7 +5945,7 @@ Sema::CreateBuiltinArraySubscriptExpr(Expr *Base, SourceLocation LLoc,
5945
5945
if (Combined != MemberQuals)
5946
5946
ResultType = Context.getQualifiedType(ResultType, Combined);
5947
5947
} else if (LHSTy->isBuiltinType() &&
5948
- LHSTy->getAs<BuiltinType>()->isVLSTBuiltinType ()) {
5948
+ LHSTy->getAs<BuiltinType>()->isSveVLSBuiltinType ()) {
5949
5949
const BuiltinType *BTy = LHSTy->getAs<BuiltinType>();
5950
5950
if (BTy->isSVEBool())
5951
5951
return ExprError(Diag(LLoc, diag::err_subscript_svbool_t)
@@ -10934,7 +10934,7 @@ static bool tryGCCVectorConvertAndSplat(Sema &S, ExprResult *Scalar,
10934
10934
assert(!isa<ExtVectorType>(VT) &&
10935
10935
"ExtVectorTypes should not be handled here!");
10936
10936
VectorEltTy = VT->getElementType();
10937
- } else if (VectorTy->isVLSTBuiltinType ()) {
10937
+ } else if (VectorTy->isSveVLSBuiltinType ()) {
10938
10938
VectorEltTy =
10939
10939
VectorTy->castAs<BuiltinType>()->getSveEltType(S.getASTContext());
10940
10940
} else {
@@ -11297,25 +11297,25 @@ QualType Sema::CheckSizelessVectorOperands(ExprResult &LHS, ExprResult &RHS,
11297
11297
if (Context.hasSameType(LHSType, RHSType))
11298
11298
return LHSType;
11299
11299
11300
- if (LHSType->isVLSTBuiltinType () && !RHSType->isVLSTBuiltinType ()) {
11300
+ if (LHSType->isSveVLSBuiltinType () && !RHSType->isSveVLSBuiltinType ()) {
11301
11301
if (!tryGCCVectorConvertAndSplat(*this, &RHS, &LHS))
11302
11302
return LHSType;
11303
11303
}
11304
- if (RHSType->isVLSTBuiltinType () && !LHSType->isVLSTBuiltinType ()) {
11304
+ if (RHSType->isSveVLSBuiltinType () && !LHSType->isSveVLSBuiltinType ()) {
11305
11305
if (LHS.get()->isLValue() ||
11306
11306
!tryGCCVectorConvertAndSplat(*this, &LHS, &RHS))
11307
11307
return RHSType;
11308
11308
}
11309
11309
11310
- if ((!LHSType->isVLSTBuiltinType () && !LHSType->isRealType()) ||
11311
- (!RHSType->isVLSTBuiltinType () && !RHSType->isRealType())) {
11310
+ if ((!LHSType->isSveVLSBuiltinType () && !LHSType->isRealType()) ||
11311
+ (!RHSType->isSveVLSBuiltinType () && !RHSType->isRealType())) {
11312
11312
Diag(Loc, diag::err_typecheck_vector_not_convertable_non_scalar)
11313
11313
<< LHSType << RHSType << LHS.get()->getSourceRange()
11314
11314
<< RHS.get()->getSourceRange();
11315
11315
return QualType();
11316
11316
}
11317
11317
11318
- if (LHSType->isVLSTBuiltinType () && RHSType->isVLSTBuiltinType () &&
11318
+ if (LHSType->isSveVLSBuiltinType () && RHSType->isSveVLSBuiltinType () &&
11319
11319
Context.getBuiltinVectorTypeInfo(LHSBuiltinTy).EC !=
11320
11320
Context.getBuiltinVectorTypeInfo(RHSBuiltinTy).EC) {
11321
11321
Diag(Loc, diag::err_typecheck_vector_lengths_not_equal)
@@ -11324,11 +11324,11 @@ QualType Sema::CheckSizelessVectorOperands(ExprResult &LHS, ExprResult &RHS,
11324
11324
return QualType();
11325
11325
}
11326
11326
11327
- if (LHSType->isVLSTBuiltinType () || RHSType->isVLSTBuiltinType ()) {
11328
- QualType Scalar = LHSType->isVLSTBuiltinType () ? RHSType : LHSType;
11329
- QualType Vector = LHSType->isVLSTBuiltinType () ? LHSType : RHSType;
11327
+ if (LHSType->isSveVLSBuiltinType () || RHSType->isSveVLSBuiltinType ()) {
11328
+ QualType Scalar = LHSType->isSveVLSBuiltinType () ? RHSType : LHSType;
11329
+ QualType Vector = LHSType->isSveVLSBuiltinType () ? LHSType : RHSType;
11330
11330
bool ScalarOrVector =
11331
- LHSType->isVLSTBuiltinType () && RHSType->isVLSTBuiltinType ();
11331
+ LHSType->isSveVLSBuiltinType () && RHSType->isSveVLSBuiltinType ();
11332
11332
11333
11333
Diag(Loc, diag::err_typecheck_vector_not_convertable_implict_truncation)
11334
11334
<< ScalarOrVector << Scalar << Vector;
@@ -11454,7 +11454,7 @@ QualType Sema::CheckMultiplyDivideOperands(ExprResult &LHS, ExprResult &RHS,
11454
11454
/*AllowBoolConversions*/ false,
11455
11455
/*AllowBooleanOperation*/ false,
11456
11456
/*ReportInvalid*/ true);
11457
- if (LHSTy->isVLSTBuiltinType () || RHSTy->isVLSTBuiltinType ())
11457
+ if (LHSTy->isSveVLSBuiltinType () || RHSTy->isSveVLSBuiltinType ())
11458
11458
return CheckSizelessVectorOperands(LHS, RHS, Loc, IsCompAssign,
11459
11459
ACK_Arithmetic);
11460
11460
if (!IsDiv &&
@@ -11496,8 +11496,8 @@ QualType Sema::CheckRemainderOperands(
11496
11496
return InvalidOperands(Loc, LHS, RHS);
11497
11497
}
11498
11498
11499
- if (LHS.get()->getType()->isVLSTBuiltinType () ||
11500
- RHS.get()->getType()->isVLSTBuiltinType ()) {
11499
+ if (LHS.get()->getType()->isSveVLSBuiltinType () ||
11500
+ RHS.get()->getType()->isSveVLSBuiltinType ()) {
11501
11501
if (LHS.get()->getType()->hasIntegerRepresentation() &&
11502
11502
RHS.get()->getType()->hasIntegerRepresentation())
11503
11503
return CheckSizelessVectorOperands(LHS, RHS, Loc, IsCompAssign,
@@ -11815,8 +11815,8 @@ QualType Sema::CheckAdditionOperands(ExprResult &LHS, ExprResult &RHS,
11815
11815
return compType;
11816
11816
}
11817
11817
11818
- if (LHS.get()->getType()->isVLSTBuiltinType () ||
11819
- RHS.get()->getType()->isVLSTBuiltinType ()) {
11818
+ if (LHS.get()->getType()->isSveVLSBuiltinType () ||
11819
+ RHS.get()->getType()->isSveVLSBuiltinType ()) {
11820
11820
QualType compType =
11821
11821
CheckSizelessVectorOperands(LHS, RHS, Loc, CompLHSTy, ACK_Arithmetic);
11822
11822
if (CompLHSTy)
@@ -11930,8 +11930,8 @@ QualType Sema::CheckSubtractionOperands(ExprResult &LHS, ExprResult &RHS,
11930
11930
return compType;
11931
11931
}
11932
11932
11933
- if (LHS.get()->getType()->isVLSTBuiltinType () ||
11934
- RHS.get()->getType()->isVLSTBuiltinType ()) {
11933
+ if (LHS.get()->getType()->isSveVLSBuiltinType () ||
11934
+ RHS.get()->getType()->isSveVLSBuiltinType ()) {
11935
11935
QualType compType =
11936
11936
CheckSizelessVectorOperands(LHS, RHS, Loc, CompLHSTy, ACK_Arithmetic);
11937
11937
if (CompLHSTy)
@@ -12270,14 +12270,14 @@ static QualType checkSizelessVectorShift(Sema &S, ExprResult &LHS,
12270
12270
12271
12271
QualType LHSType = LHS.get()->getType();
12272
12272
const BuiltinType *LHSBuiltinTy = LHSType->castAs<BuiltinType>();
12273
- QualType LHSEleType = LHSType->isVLSTBuiltinType ()
12273
+ QualType LHSEleType = LHSType->isSveVLSBuiltinType ()
12274
12274
? LHSBuiltinTy->getSveEltType(S.getASTContext())
12275
12275
: LHSType;
12276
12276
12277
12277
// Note that RHS might not be a vector
12278
12278
QualType RHSType = RHS.get()->getType();
12279
12279
const BuiltinType *RHSBuiltinTy = RHSType->castAs<BuiltinType>();
12280
- QualType RHSEleType = RHSType->isVLSTBuiltinType ()
12280
+ QualType RHSEleType = RHSType->isSveVLSBuiltinType ()
12281
12281
? RHSBuiltinTy->getSveEltType(S.getASTContext())
12282
12282
: RHSType;
12283
12283
@@ -12300,7 +12300,7 @@ static QualType checkSizelessVectorShift(Sema &S, ExprResult &LHS,
12300
12300
return QualType();
12301
12301
}
12302
12302
12303
- if (LHSType->isVLSTBuiltinType () && RHSType->isVLSTBuiltinType () &&
12303
+ if (LHSType->isSveVLSBuiltinType () && RHSType->isSveVLSBuiltinType () &&
12304
12304
(S.Context.getBuiltinVectorTypeInfo(LHSBuiltinTy).EC !=
12305
12305
S.Context.getBuiltinVectorTypeInfo(RHSBuiltinTy).EC)) {
12306
12306
S.Diag(Loc, diag::err_typecheck_invalid_operands)
@@ -12309,8 +12309,8 @@ static QualType checkSizelessVectorShift(Sema &S, ExprResult &LHS,
12309
12309
return QualType();
12310
12310
}
12311
12311
12312
- if (!LHSType->isVLSTBuiltinType ()) {
12313
- assert(RHSType->isVLSTBuiltinType ());
12312
+ if (!LHSType->isSveVLSBuiltinType ()) {
12313
+ assert(RHSType->isSveVLSBuiltinType ());
12314
12314
if (IsCompAssign)
12315
12315
return RHSType;
12316
12316
if (LHSEleType != RHSEleType) {
@@ -12323,7 +12323,7 @@ static QualType checkSizelessVectorShift(Sema &S, ExprResult &LHS,
12323
12323
S.Context.getScalableVectorType(LHSEleType, VecSize.getKnownMinValue());
12324
12324
LHS = S.ImpCastExprToType(LHS.get(), VecTy, clang::CK_VectorSplat);
12325
12325
LHSType = VecTy;
12326
- } else if (RHSBuiltinTy && RHSBuiltinTy->isVLSTBuiltinType ()) {
12326
+ } else if (RHSBuiltinTy && RHSBuiltinTy->isSveVLSBuiltinType ()) {
12327
12327
if (S.Context.getTypeSize(RHSBuiltinTy) !=
12328
12328
S.Context.getTypeSize(LHSBuiltinTy)) {
12329
12329
S.Diag(Loc, diag::err_typecheck_vector_lengths_not_equal)
@@ -12369,8 +12369,8 @@ QualType Sema::CheckShiftOperands(ExprResult &LHS, ExprResult &RHS,
12369
12369
return checkVectorShift(*this, LHS, RHS, Loc, IsCompAssign);
12370
12370
}
12371
12371
12372
- if (LHS.get()->getType()->isVLSTBuiltinType () ||
12373
- RHS.get()->getType()->isVLSTBuiltinType ())
12372
+ if (LHS.get()->getType()->isSveVLSBuiltinType () ||
12373
+ RHS.get()->getType()->isSveVLSBuiltinType ())
12374
12374
return checkSizelessVectorShift(*this, LHS, RHS, Loc, IsCompAssign);
12375
12375
12376
12376
// Shifts don't perform usual arithmetic conversions, they just do integer
@@ -13059,8 +13059,8 @@ QualType Sema::CheckCompareOperands(ExprResult &LHS, ExprResult &RHS,
13059
13059
RHS.get()->getType()->isVectorType())
13060
13060
return CheckVectorCompareOperands(LHS, RHS, Loc, Opc);
13061
13061
13062
- if (LHS.get()->getType()->isVLSTBuiltinType () ||
13063
- RHS.get()->getType()->isVLSTBuiltinType ())
13062
+ if (LHS.get()->getType()->isSveVLSBuiltinType () ||
13063
+ RHS.get()->getType()->isSveVLSBuiltinType ())
13064
13064
return CheckSizelessVectorCompareOperands(LHS, RHS, Loc, Opc);
13065
13065
13066
13066
diagnoseLogicalNotOnLHSofCheck(*this, LHS, RHS, Loc, Opc);
@@ -13935,17 +13935,17 @@ inline QualType Sema::CheckBitwiseOperands(ExprResult &LHS, ExprResult &RHS,
13935
13935
return InvalidOperands(Loc, LHS, RHS);
13936
13936
}
13937
13937
13938
- if (LHS.get()->getType()->isVLSTBuiltinType () ||
13939
- RHS.get()->getType()->isVLSTBuiltinType ()) {
13938
+ if (LHS.get()->getType()->isSveVLSBuiltinType () ||
13939
+ RHS.get()->getType()->isSveVLSBuiltinType ()) {
13940
13940
if (LHS.get()->getType()->hasIntegerRepresentation() &&
13941
13941
RHS.get()->getType()->hasIntegerRepresentation())
13942
13942
return CheckSizelessVectorOperands(LHS, RHS, Loc, IsCompAssign,
13943
13943
ACK_BitwiseOp);
13944
13944
return InvalidOperands(Loc, LHS, RHS);
13945
13945
}
13946
13946
13947
- if (LHS.get()->getType()->isVLSTBuiltinType () ||
13948
- RHS.get()->getType()->isVLSTBuiltinType ()) {
13947
+ if (LHS.get()->getType()->isSveVLSBuiltinType () ||
13948
+ RHS.get()->getType()->isSveVLSBuiltinType ()) {
13949
13949
if (LHS.get()->getType()->hasIntegerRepresentation() &&
13950
13950
RHS.get()->getType()->hasIntegerRepresentation())
13951
13951
return CheckSizelessVectorOperands(LHS, RHS, Loc, IsCompAssign,
@@ -16309,7 +16309,7 @@ ExprResult Sema::CreateBuiltinUnaryOp(SourceLocation OpLoc,
16309
16309
resultType->castAs<VectorType>()->getVectorKind() !=
16310
16310
VectorType::AltiVecBool))
16311
16311
break;
16312
- else if (resultType->isVLSTBuiltinType ()) // SVE vectors allow + and -
16312
+ else if (resultType->isSveVLSBuiltinType ()) // SVE vectors allow + and -
16313
16313
break;
16314
16314
else if (getLangOpts().CPlusPlus && // C++ [expr.unary.op]p6
16315
16315
Opc == UO_Plus &&
0 commit comments