@@ -1989,7 +1989,10 @@ TypeInfo ASTContext::getTypeInfoImpl(const Type *T) const {
19891989 // Adjust the alignment for fixed-length SVE predicates.
19901990 Align = 16;
19911991 else if (VT->getVectorKind() == VectorKind::RVVFixedLengthData ||
1992- VT->getVectorKind() == VectorKind::RVVFixedLengthMask)
1992+ VT->getVectorKind() == VectorKind::RVVFixedLengthMask ||
1993+ VT->getVectorKind() == VectorKind::RVVFixedLengthMask_1 ||
1994+ VT->getVectorKind() == VectorKind::RVVFixedLengthMask_2 ||
1995+ VT->getVectorKind() == VectorKind::RVVFixedLengthMask_4)
19931996 // Adjust the alignment for fixed-length RVV vectors.
19941997 Align = std::min<unsigned>(64, Width);
19951998 break;
@@ -9922,7 +9925,13 @@ bool ASTContext::areCompatibleVectorTypes(QualType FirstVec,
99229925 First->getVectorKind() != VectorKind::RVVFixedLengthData &&
99239926 Second->getVectorKind() != VectorKind::RVVFixedLengthData &&
99249927 First->getVectorKind() != VectorKind::RVVFixedLengthMask &&
9925- Second->getVectorKind() != VectorKind::RVVFixedLengthMask)
9928+ Second->getVectorKind() != VectorKind::RVVFixedLengthMask &&
9929+ First->getVectorKind() != VectorKind::RVVFixedLengthMask_1 &&
9930+ Second->getVectorKind() != VectorKind::RVVFixedLengthMask_1 &&
9931+ First->getVectorKind() != VectorKind::RVVFixedLengthMask_2 &&
9932+ Second->getVectorKind() != VectorKind::RVVFixedLengthMask_2 &&
9933+ First->getVectorKind() != VectorKind::RVVFixedLengthMask_4 &&
9934+ Second->getVectorKind() != VectorKind::RVVFixedLengthMask_4)
99269935 return true;
99279936
99289937 return false;
@@ -10040,7 +10049,25 @@ bool ASTContext::areCompatibleRVVTypes(QualType FirstType,
1004010049 BuiltinVectorTypeInfo Info = getBuiltinVectorTypeInfo(BT);
1004110050 return FirstType->isRVVVLSBuiltinType() &&
1004210051 Info.ElementType == BoolTy &&
10043- getTypeSize(SecondType) == getRVVTypeSize(*this, BT);
10052+ getTypeSize(SecondType) == ((getRVVTypeSize(*this, BT)));
10053+ }
10054+ if (VT->getVectorKind() == VectorKind::RVVFixedLengthMask_1) {
10055+ BuiltinVectorTypeInfo Info = getBuiltinVectorTypeInfo(BT);
10056+ return FirstType->isRVVVLSBuiltinType() &&
10057+ Info.ElementType == BoolTy &&
10058+ getTypeSize(SecondType) == ((getRVVTypeSize(*this, BT) * 8));
10059+ }
10060+ if (VT->getVectorKind() == VectorKind::RVVFixedLengthMask_2) {
10061+ BuiltinVectorTypeInfo Info = getBuiltinVectorTypeInfo(BT);
10062+ return FirstType->isRVVVLSBuiltinType() &&
10063+ Info.ElementType == BoolTy &&
10064+ getTypeSize(SecondType) == ((getRVVTypeSize(*this, BT)) * 4);
10065+ }
10066+ if (VT->getVectorKind() == VectorKind::RVVFixedLengthMask_4) {
10067+ BuiltinVectorTypeInfo Info = getBuiltinVectorTypeInfo(BT);
10068+ return FirstType->isRVVVLSBuiltinType() &&
10069+ Info.ElementType == BoolTy &&
10070+ getTypeSize(SecondType) == ((getRVVTypeSize(*this, BT)) * 2);
1004410071 }
1004510072 if (VT->getVectorKind() == VectorKind::RVVFixedLengthData ||
1004610073 VT->getVectorKind() == VectorKind::Generic)
0 commit comments