diff --git a/clang/include/clang/AST/Type.h b/clang/include/clang/AST/Type.h --- a/clang/include/clang/AST/Type.h +++ b/clang/include/clang/AST/Type.h @@ -2092,6 +2092,15 @@ /// 'riscv_rvv_vector_bits' type attribute as VectorType. QualType getRVVEltType(const ASTContext &Ctx) const; + /// Determines if this is a sizeless type supported by the VLST defined + /// attribute. + bool isVLSBuiltinType() const; + + /// Returns the representative type for the element of an SVE builtin type. + /// This is used to represent fixed-length SVE vectors created with the + /// 'arm_sve_vector_bits' type attribute as VectorType. + QualType getVLSEltType(const ASTContext &Ctx) const; + /// Types are partitioned into 3 broad categories (C99 6.2.5p1): /// object types, function types, and incomplete types. diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -8572,7 +8572,7 @@ bool LValueExprEvaluator::VisitArraySubscriptExpr(const ArraySubscriptExpr *E) { // FIXME: Deal with vectors as array subscript bases. if (E->getBase()->getType()->isVectorType() || - E->getBase()->getType()->isSveVLSBuiltinType()) + E->getBase()->getType()->isVLSBuiltinType()) return Error(E); APSInt Index; diff --git a/clang/lib/AST/Type.cpp b/clang/lib/AST/Type.cpp --- a/clang/lib/AST/Type.cpp +++ b/clang/lib/AST/Type.cpp @@ -2493,6 +2493,17 @@ return Ctx.getBuiltinVectorTypeInfo(BTy).ElementType; } +bool Type::isVLSBuiltinType() const { + return isSveVLSBuiltinType() || isRVVVLSBuiltinType(); +} + +QualType Type::getVLSEltType(const ASTContext &Ctx) const { + assert(isVLSBuiltinType() && "unsupported type!"); + + const BuiltinType *BTy = castAs(); + return Ctx.getBuiltinVectorTypeInfo(BTy).ElementType; +} + bool QualType::isPODType(const ASTContext &Context) const { // C++11 has a more relaxed definition of POD. if (Context.getLangOpts().CPlusPlus11) diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp --- a/clang/lib/CodeGen/CGExprScalar.cpp +++ b/clang/lib/CodeGen/CGExprScalar.cpp @@ -1798,7 +1798,7 @@ // careful, because the base of a vector subscript is occasionally an rvalue, // so we can't get it as an lvalue. if (!E->getBase()->getType()->isVectorType() && - !E->getBase()->getType()->isSveVLSBuiltinType()) + !E->getBase()->getType()->isVLSBuiltinType()) return EmitLoadOfLValue(E); // Handle the vector case. The base must be a vector, the index must be an @@ -4858,7 +4858,7 @@ } if (condExpr->getType()->isVectorType() || - condExpr->getType()->isSveVLSBuiltinType()) { + condExpr->getType()->isVLSBuiltinType()) { CGF.incrementProfileCounter(E); llvm::Value *CondV = CGF.EmitScalarExpr(condExpr); diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -14877,16 +14877,25 @@ const BuiltinType *SourceBT = dyn_cast(Source); const BuiltinType *TargetBT = dyn_cast(Target); - // Strip SVE vector types - if (SourceBT && SourceBT->isSveVLSBuiltinType()) { + // Strip SVE/RVV vector types + if (SourceBT && SourceBT->isVLSBuiltinType()) { // Need the original target type for vector type checks const Type *OriginalTarget = S.Context.getCanonicalType(T).getTypePtr(); // Handle conversion from scalable to fixed when msve-vector-bits is // specified - if (S.Context.areCompatibleSveTypes(QualType(OriginalTarget, 0), - QualType(Source, 0)) || - S.Context.areLaxCompatibleSveTypes(QualType(OriginalTarget, 0), - QualType(Source, 0))) + if (SourceBT->isSveVLSBuiltinType() && + (S.Context.areCompatibleSveTypes(QualType(OriginalTarget, 0), + QualType(Source, 0)) || + S.Context.areLaxCompatibleSveTypes(QualType(OriginalTarget, 0), + QualType(Source, 0)))) + return; + // Handle conversion from scalable to fixed when mrvv-vector-bits is + // specified + if (SourceBT->isRVVVLSBuiltinType() && + (S.Context.areCompatibleRVVTypes(QualType(OriginalTarget, 0), + QualType(Source, 0)) || + S.Context.areLaxCompatibleRVVTypes(QualType(OriginalTarget, 0), + QualType(Source, 0)))) return; // If the vector cast is cast between two vectors of the same size, it is @@ -14897,8 +14906,8 @@ Source = SourceBT->getSveEltType(S.Context).getTypePtr(); } - if (TargetBT && TargetBT->isSveVLSBuiltinType()) - Target = TargetBT->getSveEltType(S.Context).getTypePtr(); + if (TargetBT && TargetBT->isVLSBuiltinType()) + Target = TargetBT->getVLSEltType(S.Context).getTypePtr(); // If the source is floating point... if (SourceBT && SourceBT->isFloatingPoint()) { diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -5945,7 +5945,7 @@ if (Combined != MemberQuals) ResultType = Context.getQualifiedType(ResultType, Combined); } else if (LHSTy->isBuiltinType() && - LHSTy->getAs()->isSveVLSBuiltinType()) { + LHSTy->getAs()->isVLSBuiltinType()) { const BuiltinType *BTy = LHSTy->getAs(); if (BTy->isSVEBool()) return ExprError(Diag(LLoc, diag::err_subscript_svbool_t) @@ -5963,7 +5963,7 @@ if (VK != VK_PRValue) OK = OK_VectorComponent; - ResultType = BTy->getSveEltType(Context); + ResultType = BTy->getVLSEltType(Context); QualType BaseType = BaseExpr->getType(); Qualifiers BaseQuals = BaseType.getQualifiers(); @@ -10936,6 +10936,9 @@ } else if (VectorTy->isSveVLSBuiltinType()) { VectorEltTy = VectorTy->castAs()->getSveEltType(S.getASTContext()); + } else if (VectorTy->isRVVVLSBuiltinType()) { + VectorEltTy = + VectorTy->castAs()->getRVVEltType(S.getASTContext()); } else { llvm_unreachable("Only Fixed-Length and SVE Vector types are handled here"); } @@ -11296,25 +11299,25 @@ if (Context.hasSameType(LHSType, RHSType)) return LHSType; - if (LHSType->isSveVLSBuiltinType() && !RHSType->isSveVLSBuiltinType()) { + if (LHSType->isVLSBuiltinType() && !RHSType->isVLSBuiltinType()) { if (!tryGCCVectorConvertAndSplat(*this, &RHS, &LHS)) return LHSType; } - if (RHSType->isSveVLSBuiltinType() && !LHSType->isSveVLSBuiltinType()) { + if (RHSType->isVLSBuiltinType() && !LHSType->isVLSBuiltinType()) { if (LHS.get()->isLValue() || !tryGCCVectorConvertAndSplat(*this, &LHS, &RHS)) return RHSType; } - if ((!LHSType->isSveVLSBuiltinType() && !LHSType->isRealType()) || - (!RHSType->isSveVLSBuiltinType() && !RHSType->isRealType())) { + if ((!LHSType->isVLSBuiltinType() && !LHSType->isRealType()) || + (!RHSType->isVLSBuiltinType() && !RHSType->isRealType())) { Diag(Loc, diag::err_typecheck_vector_not_convertable_non_scalar) << LHSType << RHSType << LHS.get()->getSourceRange() << RHS.get()->getSourceRange(); return QualType(); } - if (LHSType->isSveVLSBuiltinType() && RHSType->isSveVLSBuiltinType() && + if (LHSType->isVLSBuiltinType() && RHSType->isVLSBuiltinType() && Context.getBuiltinVectorTypeInfo(LHSBuiltinTy).EC != Context.getBuiltinVectorTypeInfo(RHSBuiltinTy).EC) { Diag(Loc, diag::err_typecheck_vector_lengths_not_equal) @@ -11323,11 +11326,11 @@ return QualType(); } - if (LHSType->isSveVLSBuiltinType() || RHSType->isSveVLSBuiltinType()) { - QualType Scalar = LHSType->isSveVLSBuiltinType() ? RHSType : LHSType; - QualType Vector = LHSType->isSveVLSBuiltinType() ? LHSType : RHSType; + if (LHSType->isVLSBuiltinType() || RHSType->isVLSBuiltinType()) { + QualType Scalar = LHSType->isVLSBuiltinType() ? RHSType : LHSType; + QualType Vector = LHSType->isVLSBuiltinType() ? LHSType : RHSType; bool ScalarOrVector = - LHSType->isSveVLSBuiltinType() && RHSType->isSveVLSBuiltinType(); + LHSType->isVLSBuiltinType() && RHSType->isVLSBuiltinType(); Diag(Loc, diag::err_typecheck_vector_not_convertable_implict_truncation) << ScalarOrVector << Scalar << Vector; @@ -11453,7 +11456,7 @@ /*AllowBoolConversions*/ false, /*AllowBooleanOperation*/ false, /*ReportInvalid*/ true); - if (LHSTy->isSveVLSBuiltinType() || RHSTy->isSveVLSBuiltinType()) + if (LHSTy->isVLSBuiltinType() || RHSTy->isVLSBuiltinType()) return CheckSizelessVectorOperands(LHS, RHS, Loc, IsCompAssign, ACK_Arithmetic); if (!IsDiv && @@ -11495,8 +11498,8 @@ return InvalidOperands(Loc, LHS, RHS); } - if (LHS.get()->getType()->isSveVLSBuiltinType() || - RHS.get()->getType()->isSveVLSBuiltinType()) { + if (LHS.get()->getType()->isVLSBuiltinType() || + RHS.get()->getType()->isVLSBuiltinType()) { if (LHS.get()->getType()->hasIntegerRepresentation() && RHS.get()->getType()->hasIntegerRepresentation()) return CheckSizelessVectorOperands(LHS, RHS, Loc, IsCompAssign, @@ -11814,8 +11817,8 @@ return compType; } - if (LHS.get()->getType()->isSveVLSBuiltinType() || - RHS.get()->getType()->isSveVLSBuiltinType()) { + if (LHS.get()->getType()->isVLSBuiltinType() || + RHS.get()->getType()->isVLSBuiltinType()) { QualType compType = CheckSizelessVectorOperands(LHS, RHS, Loc, CompLHSTy, ACK_Arithmetic); if (CompLHSTy) @@ -11929,8 +11932,8 @@ return compType; } - if (LHS.get()->getType()->isSveVLSBuiltinType() || - RHS.get()->getType()->isSveVLSBuiltinType()) { + if (LHS.get()->getType()->isVLSBuiltinType() || + RHS.get()->getType()->isVLSBuiltinType()) { QualType compType = CheckSizelessVectorOperands(LHS, RHS, Loc, CompLHSTy, ACK_Arithmetic); if (CompLHSTy) @@ -12269,15 +12272,15 @@ QualType LHSType = LHS.get()->getType(); const BuiltinType *LHSBuiltinTy = LHSType->castAs(); - QualType LHSEleType = LHSType->isSveVLSBuiltinType() - ? LHSBuiltinTy->getSveEltType(S.getASTContext()) + QualType LHSEleType = LHSType->isVLSBuiltinType() + ? LHSBuiltinTy->getVLSEltType(S.getASTContext()) : LHSType; // Note that RHS might not be a vector QualType RHSType = RHS.get()->getType(); const BuiltinType *RHSBuiltinTy = RHSType->castAs(); - QualType RHSEleType = RHSType->isSveVLSBuiltinType() - ? RHSBuiltinTy->getSveEltType(S.getASTContext()) + QualType RHSEleType = RHSType->isVLSBuiltinType() + ? RHSBuiltinTy->getVLSEltType(S.getASTContext()) : RHSType; if ((LHSBuiltinTy && LHSBuiltinTy->isSVEBool()) || @@ -12299,7 +12302,7 @@ return QualType(); } - if (LHSType->isSveVLSBuiltinType() && RHSType->isSveVLSBuiltinType() && + if (LHSType->isVLSBuiltinType() && RHSType->isVLSBuiltinType() && (S.Context.getBuiltinVectorTypeInfo(LHSBuiltinTy).EC != S.Context.getBuiltinVectorTypeInfo(RHSBuiltinTy).EC)) { S.Diag(Loc, diag::err_typecheck_invalid_operands) @@ -12308,8 +12311,8 @@ return QualType(); } - if (!LHSType->isSveVLSBuiltinType()) { - assert(RHSType->isSveVLSBuiltinType()); + if (!LHSType->isVLSBuiltinType()) { + assert(RHSType->isVLSBuiltinType()); if (IsCompAssign) return RHSType; if (LHSEleType != RHSEleType) { @@ -12322,7 +12325,7 @@ S.Context.getScalableVectorType(LHSEleType, VecSize.getKnownMinValue()); LHS = S.ImpCastExprToType(LHS.get(), VecTy, clang::CK_VectorSplat); LHSType = VecTy; - } else if (RHSBuiltinTy && RHSBuiltinTy->isSveVLSBuiltinType()) { + } else if (RHSBuiltinTy && RHSBuiltinTy->isVLSBuiltinType()) { if (S.Context.getTypeSize(RHSBuiltinTy) != S.Context.getTypeSize(LHSBuiltinTy)) { S.Diag(Loc, diag::err_typecheck_vector_lengths_not_equal) @@ -12368,8 +12371,8 @@ return checkVectorShift(*this, LHS, RHS, Loc, IsCompAssign); } - if (LHS.get()->getType()->isSveVLSBuiltinType() || - RHS.get()->getType()->isSveVLSBuiltinType()) + if (LHS.get()->getType()->isVLSBuiltinType() || + RHS.get()->getType()->isVLSBuiltinType()) return checkSizelessVectorShift(*this, LHS, RHS, Loc, IsCompAssign); // Shifts don't perform usual arithmetic conversions, they just do integer @@ -13058,8 +13061,8 @@ RHS.get()->getType()->isVectorType()) return CheckVectorCompareOperands(LHS, RHS, Loc, Opc); - if (LHS.get()->getType()->isSveVLSBuiltinType() || - RHS.get()->getType()->isSveVLSBuiltinType()) + if (LHS.get()->getType()->isVLSBuiltinType() || + RHS.get()->getType()->isVLSBuiltinType()) return CheckSizelessVectorCompareOperands(LHS, RHS, Loc, Opc); diagnoseLogicalNotOnLHSofCheck(*this, LHS, RHS, Loc, Opc); @@ -13554,7 +13557,7 @@ const BuiltinType *VTy = V->castAs(); assert(VTy->isSizelessBuiltinType() && "expected sizeless type"); - const QualType ETy = V->getSveEltType(Context); + const QualType ETy = V->getVLSEltType(Context); const auto TypeSize = Context.getTypeSize(ETy); const QualType IntTy = Context.getIntTypeForBitwidth(TypeSize, true); @@ -13934,8 +13937,8 @@ return InvalidOperands(Loc, LHS, RHS); } - if (LHS.get()->getType()->isSveVLSBuiltinType() || - RHS.get()->getType()->isSveVLSBuiltinType()) { + if (LHS.get()->getType()->isVLSBuiltinType() || + RHS.get()->getType()->isVLSBuiltinType()) { if (LHS.get()->getType()->hasIntegerRepresentation() && RHS.get()->getType()->hasIntegerRepresentation()) return CheckSizelessVectorOperands(LHS, RHS, Loc, IsCompAssign, @@ -13943,8 +13946,8 @@ return InvalidOperands(Loc, LHS, RHS); } - if (LHS.get()->getType()->isSveVLSBuiltinType() || - RHS.get()->getType()->isSveVLSBuiltinType()) { + if (LHS.get()->getType()->isVLSBuiltinType() || + RHS.get()->getType()->isVLSBuiltinType()) { if (LHS.get()->getType()->hasIntegerRepresentation() && RHS.get()->getType()->hasIntegerRepresentation()) return CheckSizelessVectorOperands(LHS, RHS, Loc, IsCompAssign, @@ -16308,7 +16311,7 @@ resultType->castAs()->getVectorKind() != VectorType::AltiVecBool)) break; - else if (resultType->isSveVLSBuiltinType()) // SVE vectors allow + and - + else if (resultType->isVLSBuiltinType()) // SVE/RVV vectors allow + and - break; else if (getLangOpts().CPlusPlus && // C++ [expr.unary.op]p6 Opc == UO_Plus && diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp --- a/clang/lib/Sema/SemaExprCXX.cpp +++ b/clang/lib/Sema/SemaExprCXX.cpp @@ -6303,10 +6303,10 @@ static bool isValidSizelessVectorForConditionalCondition(ASTContext &Ctx, QualType CondTy) { - if (!CondTy->isSveVLSBuiltinType()) + if (!CondTy->isVLSBuiltinType()) return false; const QualType EltTy = - cast(CondTy.getCanonicalType())->getSveEltType(Ctx); + cast(CondTy.getCanonicalType())->getVLSEltType(Ctx); assert(!EltTy->isEnumeralType() && "Vectors cant be enum types"); return EltTy->isIntegralType(Ctx); } @@ -6409,16 +6409,16 @@ QualType CondType = Cond.get()->getType(); const auto *CondBT = CondType->castAs(); - QualType CondElementTy = CondBT->getSveEltType(Context); + QualType CondElementTy = CondBT->getVLSEltType(Context); llvm::ElementCount CondElementCount = Context.getBuiltinVectorTypeInfo(CondBT).EC; QualType LHSType = LHS.get()->getType(); const auto *LHSBT = - LHSType->isSveVLSBuiltinType() ? LHSType->getAs() : nullptr; + LHSType->isVLSBuiltinType() ? LHSType->getAs() : nullptr; QualType RHSType = RHS.get()->getType(); const auto *RHSBT = - RHSType->isSveVLSBuiltinType() ? RHSType->getAs() : nullptr; + RHSType->isVLSBuiltinType() ? RHSType->getAs() : nullptr; QualType ResultType; @@ -6460,10 +6460,10 @@ RHS = ImpCastExprToType(RHS.get(), ResultType, CK_VectorSplat); } - assert(!ResultType.isNull() && ResultType->isSveVLSBuiltinType() && + assert(!ResultType.isNull() && ResultType->isVLSBuiltinType() && "Result should have been a vector type"); auto *ResultBuiltinTy = ResultType->castAs(); - QualType ResultElementTy = ResultBuiltinTy->getSveEltType(Context); + QualType ResultElementTy = ResultBuiltinTy->getVLSEltType(Context); llvm::ElementCount ResultElementCount = Context.getBuiltinVectorTypeInfo(ResultBuiltinTy).EC; diff --git a/clang/test/CodeGen/riscv-rvv-vla-arith-ops.c b/clang/test/CodeGen/riscv-rvv-vla-arith-ops.c new file mode 100644 --- /dev/null +++ b/clang/test/CodeGen/riscv-rvv-vla-arith-ops.c @@ -0,0 +1,1528 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// RUN: %clang_cc1 -triple riscv64-none-linux-gnu -target-feature +zve64d \ +// RUN: -target-feature +f -target-feature +d -target-feature +zvfh \ +// RUN: -target-feature +zfh -disable-O0-optnone \ +// RUN: -mvscale-min=4 -mvscale-max=4 -emit-llvm -o - %s | \ +// RUN: opt -S -passes=sroa | FileCheck %s + +// REQUIRES: riscv-registered-target + +#include + +// ADDITION + +// CHECK-LABEL: @add_i8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[ADD:%.*]] = add [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[ADD]] +// +vint8m1_t add_i8(vint8m1_t a, vint8m1_t b) { + return a + b; +} + +// CHECK-LABEL: @add_i16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[ADD:%.*]] = add [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[ADD]] +// +vint16m1_t add_i16(vint16m1_t a, vint16m1_t b) { + return a + b; +} + +// CHECK-LABEL: @add_i32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[ADD:%.*]] = add [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[ADD]] +// +vint32m1_t add_i32(vint32m1_t a, vint32m1_t b) { + return a + b; +} + +// CHECK-LABEL: @add_i64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[ADD:%.*]] = add [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[ADD]] +// +vint64m1_t add_i64(vint64m1_t a, vint64m1_t b) { + return a + b; +} + +// CHECK-LABEL: @add_u8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[ADD:%.*]] = add [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[ADD]] +// +vuint8m1_t add_u8(vuint8m1_t a, vuint8m1_t b) { + return a + b; +} + +// CHECK-LABEL: @add_u16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[ADD:%.*]] = add [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[ADD]] +// +vuint16m1_t add_u16(vuint16m1_t a, vuint16m1_t b) { + return a + b; +} + +// CHECK-LABEL: @add_u32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[ADD:%.*]] = add [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[ADD]] +// +vuint32m1_t add_u32(vuint32m1_t a, vuint32m1_t b) { + return a + b; +} + +// CHECK-LABEL: @add_u64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[ADD:%.*]] = add [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[ADD]] +// +vuint64m1_t add_u64(vuint64m1_t a, vuint64m1_t b) { + return a + b; +} + +// CHECK-LABEL: @add_f16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[ADD:%.*]] = fadd [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[ADD]] +// +vfloat16m1_t add_f16(vfloat16m1_t a, vfloat16m1_t b) { + return a + b; +} + +// CHECK-LABEL: @add_f32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[ADD:%.*]] = fadd [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[ADD]] +// +vfloat32m1_t add_f32(vfloat32m1_t a, vfloat32m1_t b) { + return a + b; +} + +// CHECK-LABEL: @add_f64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[ADD:%.*]] = fadd [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[ADD]] +// +vfloat64m1_t add_f64(vfloat64m1_t a, vfloat64m1_t b) { + return a + b; +} + +// CHECK-LABEL: @add_inplace_i8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[ADD:%.*]] = add [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[ADD]] +// +vint8m1_t add_inplace_i8(vint8m1_t a, vint8m1_t b) { + return a += b; +} + +// CHECK-LABEL: @add_inplace_i16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[ADD:%.*]] = add [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[ADD]] +// +vint16m1_t add_inplace_i16(vint16m1_t a, vint16m1_t b) { + return a += b; +} + +// CHECK-LABEL: @add_inplace_i32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[ADD:%.*]] = add [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[ADD]] +// +vint32m1_t add_inplace_i32(vint32m1_t a, vint32m1_t b) { + return a += b; +} + +// CHECK-LABEL: @add_inplace_i64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[ADD:%.*]] = add [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[ADD]] +// +vint64m1_t add_inplace_i64(vint64m1_t a, vint64m1_t b) { + return a += b; +} + +// CHECK-LABEL: @add_inplace_u8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[ADD:%.*]] = add [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[ADD]] +// +vuint8m1_t add_inplace_u8(vuint8m1_t a, vuint8m1_t b) { + return a += b; +} + +// CHECK-LABEL: @add_inplace_u16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[ADD:%.*]] = add [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[ADD]] +// +vuint16m1_t add_inplace_u16(vuint16m1_t a, vuint16m1_t b) { + return a += b; +} + +// CHECK-LABEL: @add_inplace_u32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[ADD:%.*]] = add [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[ADD]] +// +vuint32m1_t add_inplace_u32(vuint32m1_t a, vuint32m1_t b) { + return a += b; +} + +// CHECK-LABEL: @add_inplace_u64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[ADD:%.*]] = add [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[ADD]] +// +vuint64m1_t add_inplace_u64(vuint64m1_t a, vuint64m1_t b) { + return a += b; +} + +// CHECK-LABEL: @add_inplace_f16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[ADD:%.*]] = fadd [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[ADD]] +// +vfloat16m1_t add_inplace_f16(vfloat16m1_t a, vfloat16m1_t b) { + return a += b; +} + +// CHECK-LABEL: @add_inplace_f32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[ADD:%.*]] = fadd [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[ADD]] +// +vfloat32m1_t add_inplace_f32(vfloat32m1_t a, vfloat32m1_t b) { + return a += b; +} + +// CHECK-LABEL: @add_inplace_f64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[ADD:%.*]] = fadd [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[ADD]] +// +vfloat64m1_t add_inplace_f64(vfloat64m1_t a, vfloat64m1_t b) { + return a += b; +} + +// CHECK-LABEL: @add_scalar_i8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i8 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[ADD:%.*]] = add [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[ADD]] +// +vint8m1_t add_scalar_i8(vint8m1_t a, int8_t b) { + return a + b; +} + +// CHECK-LABEL: @add_scalar_i16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i16 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[ADD:%.*]] = add [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[ADD]] +// +vint16m1_t add_scalar_i16(vint16m1_t a, int16_t b) { + return a + b; +} + +// CHECK-LABEL: @add_scalar_i32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i32 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[ADD:%.*]] = add [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[ADD]] +// +vint32m1_t add_scalar_i32(vint32m1_t a, int32_t b) { + return a + b; +} + +// CHECK-LABEL: @add_scalar_i64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i64 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[ADD:%.*]] = add [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[ADD]] +// +vint64m1_t add_scalar_i64(vint64m1_t a, int64_t b) { + return a + b; +} + +// CHECK-LABEL: @add_scalar_u8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i8 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[ADD:%.*]] = add [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[ADD]] +// +vuint8m1_t add_scalar_u8(vuint8m1_t a, uint8_t b) { + return a + b; +} + +// CHECK-LABEL: @add_scalar_u16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i16 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[ADD:%.*]] = add [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[ADD]] +// +vuint16m1_t add_scalar_u16(vuint16m1_t a, uint16_t b) { + return a + b; +} + +// CHECK-LABEL: @add_scalar_u32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i32 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[ADD:%.*]] = add [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[ADD]] +// +vuint32m1_t add_scalar_u32(vuint32m1_t a, uint32_t b) { + return a + b; +} + +// CHECK-LABEL: @add_scalar_u64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i64 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[ADD:%.*]] = add [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[ADD]] +// +vuint64m1_t add_scalar_u64(vuint64m1_t a, uint64_t b) { + return a + b; +} + +// CHECK-LABEL: @add_scalar_f16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, half [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[ADD:%.*]] = fadd [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[ADD]] +// +vfloat16m1_t add_scalar_f16(vfloat16m1_t a, _Float16 b) { + return a + b; +} + +// CHECK-LABEL: @add_scalar_f32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, float [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[ADD:%.*]] = fadd [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[ADD]] +// +vfloat32m1_t add_scalar_f32(vfloat32m1_t a, float b) { + return a + b; +} + +// CHECK-LABEL: @add_scalar_f64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, double [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[ADD:%.*]] = fadd [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[ADD]] +// +vfloat64m1_t add_scalar_f64(vfloat64m1_t a, double b) { + return a + b; +} + +// SUBTRACTION + +// CHECK-LABEL: @sub_i8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SUB:%.*]] = sub [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SUB]] +// +vint8m1_t sub_i8(vint8m1_t a, vint8m1_t b) { + return a - b; +} + +// CHECK-LABEL: @sub_i16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SUB:%.*]] = sub [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SUB]] +// +vint16m1_t sub_i16(vint16m1_t a, vint16m1_t b) { + return a - b; +} + +// CHECK-LABEL: @sub_i32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SUB:%.*]] = sub [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SUB]] +// +vint32m1_t sub_i32(vint32m1_t a, vint32m1_t b) { + return a - b; +} + +// CHECK-LABEL: @sub_i64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SUB:%.*]] = sub [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SUB]] +// +vint64m1_t sub_i64(vint64m1_t a, vint64m1_t b) { + return a - b; +} + +// CHECK-LABEL: @sub_u8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SUB:%.*]] = sub [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SUB]] +// +vuint8m1_t sub_u8(vuint8m1_t a, vuint8m1_t b) { + return a - b; +} + +// CHECK-LABEL: @sub_u16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SUB:%.*]] = sub [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SUB]] +// +vuint16m1_t sub_u16(vuint16m1_t a, vuint16m1_t b) { + return a - b; +} + +// CHECK-LABEL: @sub_u32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SUB:%.*]] = sub [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SUB]] +// +vuint32m1_t sub_u32(vuint32m1_t a, vuint32m1_t b) { + return a - b; +} + +// CHECK-LABEL: @sub_u64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SUB:%.*]] = sub [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SUB]] +// +vuint64m1_t sub_u64(vuint64m1_t a, vuint64m1_t b) { + return a - b; +} + +// CHECK-LABEL: @sub_f16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SUB:%.*]] = fsub [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SUB]] +// +vfloat16m1_t sub_f16(vfloat16m1_t a, vfloat16m1_t b) { + return a - b; +} + +// CHECK-LABEL: @sub_f32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SUB:%.*]] = fsub [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SUB]] +// +vfloat32m1_t sub_f32(vfloat32m1_t a, vfloat32m1_t b) { + return a - b; +} + +// CHECK-LABEL: @sub_f64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SUB:%.*]] = fsub [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SUB]] +// +vfloat64m1_t sub_f64(vfloat64m1_t a, vfloat64m1_t b) { + return a - b; +} + +// CHECK-LABEL: @sub_inplace_i8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SUB:%.*]] = sub [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SUB]] +// +vint8m1_t sub_inplace_i8(vint8m1_t a, vint8m1_t b) { + return a - b; +} + +// CHECK-LABEL: @sub_inplace_i16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SUB:%.*]] = sub [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SUB]] +// +vint16m1_t sub_inplace_i16(vint16m1_t a, vint16m1_t b) { + return a - b; +} + +// CHECK-LABEL: @sub_inplace_i32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SUB:%.*]] = sub [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SUB]] +// +vint32m1_t sub_inplace_i32(vint32m1_t a, vint32m1_t b) { + return a - b; +} + +// CHECK-LABEL: @sub_inplace_i64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SUB:%.*]] = sub [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SUB]] +// +vint64m1_t sub_inplace_i64(vint64m1_t a, vint64m1_t b) { + return a - b; +} + +// CHECK-LABEL: @sub_inplace_u8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SUB:%.*]] = sub [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SUB]] +// +vuint8m1_t sub_inplace_u8(vuint8m1_t a, vuint8m1_t b) { + return a - b; +} + +// CHECK-LABEL: @sub_inplace_u16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SUB:%.*]] = sub [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SUB]] +// +vuint16m1_t sub_inplace_u16(vuint16m1_t a, vuint16m1_t b) { + return a - b; +} + +// CHECK-LABEL: @sub_inplace_u32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SUB:%.*]] = sub [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SUB]] +// +vuint32m1_t sub_inplace_u32(vuint32m1_t a, vuint32m1_t b) { + return a - b; +} + +// CHECK-LABEL: @sub_inplace_u64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SUB:%.*]] = sub [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SUB]] +// +vuint64m1_t sub_inplace_u64(vuint64m1_t a, vuint64m1_t b) { + return a - b; +} + +// CHECK-LABEL: @sub_inplace_f16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SUB:%.*]] = fsub [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SUB]] +// +vfloat16m1_t sub_inplace_f16(vfloat16m1_t a, vfloat16m1_t b) { + return a - b; +} + +// CHECK-LABEL: @sub_inplace_f32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SUB:%.*]] = fsub [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SUB]] +// +vfloat32m1_t sub_inplace_f32(vfloat32m1_t a, vfloat32m1_t b) { + return a - b; +} + +// CHECK-LABEL: @sub_inplace_f64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SUB:%.*]] = fsub [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SUB]] +// +vfloat64m1_t sub_inplace_f64(vfloat64m1_t a, vfloat64m1_t b) { + return a - b; +} + +// CHECK-LABEL: @sub_scalar_i8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i8 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SUB:%.*]] = sub [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[SUB]] +// +vint8m1_t sub_scalar_i8(vint8m1_t a, int8_t b) { + return a - b; +} + +// CHECK-LABEL: @sub_scalar_i16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i16 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SUB:%.*]] = sub [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[SUB]] +// +vint16m1_t sub_scalar_i16(vint16m1_t a, int16_t b) { + return a - b; +} + +// CHECK-LABEL: @sub_scalar_i32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i32 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SUB:%.*]] = sub [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[SUB]] +// +vint32m1_t sub_scalar_i32(vint32m1_t a, int32_t b) { + return a - b; +} + +// CHECK-LABEL: @sub_scalar_i64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i64 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SUB:%.*]] = sub [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[SUB]] +// +vint64m1_t sub_scalar_i64(vint64m1_t a, int64_t b) { + return a - b; +} + +// CHECK-LABEL: @sub_scalar_u8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i8 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SUB:%.*]] = sub [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[SUB]] +// +vuint8m1_t sub_scalar_u8(vuint8m1_t a, uint8_t b) { + return a - b; +} + +// CHECK-LABEL: @sub_scalar_u16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i16 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SUB:%.*]] = sub [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[SUB]] +// +vuint16m1_t sub_scalar_u16(vuint16m1_t a, uint16_t b) { + return a - b; +} + +// CHECK-LABEL: @sub_scalar_u32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i32 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SUB:%.*]] = sub [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[SUB]] +// +vuint32m1_t sub_scalar_u32(vuint32m1_t a, uint32_t b) { + return a - b; +} + +// CHECK-LABEL: @sub_scalar_u64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i64 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SUB:%.*]] = sub [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[SUB]] +// +vuint64m1_t sub_scalar_u64(vuint64m1_t a, uint64_t b) { + return a - b; +} + +// CHECK-LABEL: @sub_scalar_f16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, half [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SUB:%.*]] = fsub [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[SUB]] +// +vfloat16m1_t sub_scalar_f16(vfloat16m1_t a, _Float16 b) { + return a - b; +} + +// CHECK-LABEL: @sub_scalar_f32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, float [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SUB:%.*]] = fsub [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[SUB]] +// +vfloat32m1_t sub_scalar_f32(vfloat32m1_t a, float b) { + return a - b; +} + +// CHECK-LABEL: @sub_scalar_f64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, double [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SUB:%.*]] = fsub [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[SUB]] +// +vfloat64m1_t sub_scalar_f64(vfloat64m1_t a, double b) { + return a - b; +} + +// MULTIPLICATION + +// CHECK-LABEL: @mul_i8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[MUL:%.*]] = mul [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[MUL]] +// +vint8m1_t mul_i8(vint8m1_t a, vint8m1_t b) { + return a * b; +} + +// CHECK-LABEL: @mul_i16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[MUL:%.*]] = mul [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[MUL]] +// +vint16m1_t mul_i16(vint16m1_t a, vint16m1_t b) { + return a * b; +} + +// CHECK-LABEL: @mul_i32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[MUL:%.*]] = mul [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[MUL]] +// +vint32m1_t mul_i32(vint32m1_t a, vint32m1_t b) { + return a * b; +} + +// CHECK-LABEL: @mul_i64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[MUL:%.*]] = mul [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[MUL]] +// +vint64m1_t mul_i64(vint64m1_t a, vint64m1_t b) { + return a * b; +} + +// CHECK-LABEL: @mul_u8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[MUL:%.*]] = mul [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[MUL]] +// +vuint8m1_t mul_u8(vuint8m1_t a, vuint8m1_t b) { + return a * b; +} + +// CHECK-LABEL: @mul_u16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[MUL:%.*]] = mul [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[MUL]] +// +vuint16m1_t mul_u16(vuint16m1_t a, vuint16m1_t b) { + return a * b; +} + +// CHECK-LABEL: @mul_u32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[MUL:%.*]] = mul [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[MUL]] +// +vuint32m1_t mul_u32(vuint32m1_t a, vuint32m1_t b) { + return a * b; +} + +// CHECK-LABEL: @mul_u64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[MUL:%.*]] = mul [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[MUL]] +// +vuint64m1_t mul_u64(vuint64m1_t a, vuint64m1_t b) { + return a * b; +} + +// CHECK-LABEL: @mul_f16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[MUL:%.*]] = fmul [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[MUL]] +// +vfloat16m1_t mul_f16(vfloat16m1_t a, vfloat16m1_t b) { + return a * b; +} + +// CHECK-LABEL: @mul_f32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[MUL:%.*]] = fmul [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[MUL]] +// +vfloat32m1_t mul_f32(vfloat32m1_t a, vfloat32m1_t b) { + return a * b; +} + +// CHECK-LABEL: @mul_f64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[MUL:%.*]] = fmul [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[MUL]] +// +vfloat64m1_t mul_f64(vfloat64m1_t a, vfloat64m1_t b) { + return a * b; +} + +// CHECK-LABEL: @mul_inplace_i8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[MUL:%.*]] = mul [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[MUL]] +// +vint8m1_t mul_inplace_i8(vint8m1_t a, vint8m1_t b) { + return a * b; +} + +// CHECK-LABEL: @mul_inplace_i16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[MUL:%.*]] = mul [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[MUL]] +// +vint16m1_t mul_inplace_i16(vint16m1_t a, vint16m1_t b) { + return a * b; +} + +// CHECK-LABEL: @mul_inplace_i32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[MUL:%.*]] = mul [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[MUL]] +// +vint32m1_t mul_inplace_i32(vint32m1_t a, vint32m1_t b) { + return a * b; +} + +// CHECK-LABEL: @mul_inplace_i64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[MUL:%.*]] = mul [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[MUL]] +// +vint64m1_t mul_inplace_i64(vint64m1_t a, vint64m1_t b) { + return a * b; +} + +// CHECK-LABEL: @mul_inplace_u8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[MUL:%.*]] = mul [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[MUL]] +// +vuint8m1_t mul_inplace_u8(vuint8m1_t a, vuint8m1_t b) { + return a * b; +} + +// CHECK-LABEL: @mul_inplace_u16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[MUL:%.*]] = mul [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[MUL]] +// +vuint16m1_t mul_inplace_u16(vuint16m1_t a, vuint16m1_t b) { + return a * b; +} + +// CHECK-LABEL: @mul_inplace_u32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[MUL:%.*]] = mul [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[MUL]] +// +vuint32m1_t mul_inplace_u32(vuint32m1_t a, vuint32m1_t b) { + return a * b; +} + +// CHECK-LABEL: @mul_inplace_u64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[MUL:%.*]] = mul [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[MUL]] +// +vuint64m1_t mul_inplace_u64(vuint64m1_t a, vuint64m1_t b) { + return a * b; +} + +// CHECK-LABEL: @mul_inplace_f16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[MUL:%.*]] = fmul [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[MUL]] +// +vfloat16m1_t mul_inplace_f16(vfloat16m1_t a, vfloat16m1_t b) { + return a * b; +} + +// CHECK-LABEL: @mul_inplace_f32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[MUL:%.*]] = fmul [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[MUL]] +// +vfloat32m1_t mul_inplace_f32(vfloat32m1_t a, vfloat32m1_t b) { + return a * b; +} + +// CHECK-LABEL: @mul_inplace_f64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[MUL:%.*]] = fmul [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[MUL]] +// +vfloat64m1_t mul_inplace_f64(vfloat64m1_t a, vfloat64m1_t b) { + return a * b; +} + +// CHECK-LABEL: @mul_scalar_i8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i8 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[MUL:%.*]] = mul [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[MUL]] +// +vint8m1_t mul_scalar_i8(vint8m1_t a, int8_t b) { + return a * b; +} + +// CHECK-LABEL: @mul_scalar_i16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i16 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[MUL:%.*]] = mul [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[MUL]] +// +vint16m1_t mul_scalar_i16(vint16m1_t a, int16_t b) { + return a * b; +} + +// CHECK-LABEL: @mul_scalar_i32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i32 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[MUL:%.*]] = mul [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[MUL]] +// +vint32m1_t mul_scalar_i32(vint32m1_t a, int32_t b) { + return a * b; +} + +// CHECK-LABEL: @mul_scalar_i64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i64 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[MUL:%.*]] = mul [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[MUL]] +// +vint64m1_t mul_scalar_i64(vint64m1_t a, int64_t b) { + return a * b; +} + +// CHECK-LABEL: @mul_scalar_u8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i8 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[MUL:%.*]] = mul [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[MUL]] +// +vuint8m1_t mul_scalar_u8(vuint8m1_t a, uint8_t b) { + return a * b; +} + +// CHECK-LABEL: @mul_scalar_u16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i16 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[MUL:%.*]] = mul [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[MUL]] +// +vuint16m1_t mul_scalar_u16(vuint16m1_t a, uint16_t b) { + return a * b; +} + +// CHECK-LABEL: @mul_scalar_u32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i32 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[MUL:%.*]] = mul [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[MUL]] +// +vuint32m1_t mul_scalar_u32(vuint32m1_t a, uint32_t b) { + return a * b; +} + +// CHECK-LABEL: @mul_scalar_u64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i64 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[MUL:%.*]] = mul [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[MUL]] +// +vuint64m1_t mul_scalar_u64(vuint64m1_t a, uint64_t b) { + return a * b; +} + +// CHECK-LABEL: @mul_scalar_f16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, half [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[MUL:%.*]] = fmul [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[MUL]] +// +vfloat16m1_t mul_scalar_f16(vfloat16m1_t a, _Float16 b) { + return a * b; +} + +// CHECK-LABEL: @mul_scalar_f32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, float [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[MUL:%.*]] = fmul [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[MUL]] +// +vfloat32m1_t mul_scalar_f32(vfloat32m1_t a, float b) { + return a * b; +} + +// CHECK-LABEL: @mul_scalar_f64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, double [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[MUL:%.*]] = fmul [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[MUL]] +// +vfloat64m1_t mul_scalar_f64(vfloat64m1_t a, double b) { + return a * b; +} + +// DIVISION + +// CHECK-LABEL: @div_i8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[DIV:%.*]] = sdiv [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[DIV]] +// +vint8m1_t div_i8(vint8m1_t a, vint8m1_t b) { + return a / b; +} + +// CHECK-LABEL: @div_i16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[DIV:%.*]] = sdiv [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[DIV]] +// +vint16m1_t div_i16(vint16m1_t a, vint16m1_t b) { + return a / b; +} + +// CHECK-LABEL: @div_i32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[DIV:%.*]] = sdiv [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[DIV]] +// +vint32m1_t div_i32(vint32m1_t a, vint32m1_t b) { + return a / b; +} + +// CHECK-LABEL: @div_i64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[DIV:%.*]] = sdiv [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[DIV]] +// +vint64m1_t div_i64(vint64m1_t a, vint64m1_t b) { + return a / b; +} + +// CHECK-LABEL: @div_u8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[DIV:%.*]] = sdiv [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[DIV]] +// +vuint8m1_t div_u8(vuint8m1_t a, vuint8m1_t b) { + return a / b; +} + +// CHECK-LABEL: @div_u16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[DIV:%.*]] = sdiv [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[DIV]] +// +vuint16m1_t div_u16(vuint16m1_t a, vuint16m1_t b) { + return a / b; +} + +// CHECK-LABEL: @div_u32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[DIV:%.*]] = sdiv [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[DIV]] +// +vuint32m1_t div_u32(vuint32m1_t a, vuint32m1_t b) { + return a / b; +} + +// CHECK-LABEL: @div_u64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[DIV:%.*]] = sdiv [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[DIV]] +// +vuint64m1_t div_u64(vuint64m1_t a, vuint64m1_t b) { + return a / b; +} + +// CHECK-LABEL: @div_f16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[DIV:%.*]] = fdiv [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[DIV]] +// +vfloat16m1_t div_f16(vfloat16m1_t a, vfloat16m1_t b) { + return a / b; +} + +// CHECK-LABEL: @div_f32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[DIV:%.*]] = fdiv [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[DIV]] +// +vfloat32m1_t div_f32(vfloat32m1_t a, vfloat32m1_t b) { + return a / b; +} + +// CHECK-LABEL: @div_f64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[DIV:%.*]] = fdiv [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[DIV]] +// +vfloat64m1_t div_f64(vfloat64m1_t a, vfloat64m1_t b) { + return a / b; +} + +// CHECK-LABEL: @div_inplace_i8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[DIV:%.*]] = sdiv [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[DIV]] +// +vint8m1_t div_inplace_i8(vint8m1_t a, vint8m1_t b) { + return a / b; +} + +// CHECK-LABEL: @div_inplace_i16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[DIV:%.*]] = sdiv [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[DIV]] +// +vint16m1_t div_inplace_i16(vint16m1_t a, vint16m1_t b) { + return a / b; +} + +// CHECK-LABEL: @div_inplace_i32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[DIV:%.*]] = sdiv [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[DIV]] +// +vint32m1_t div_inplace_i32(vint32m1_t a, vint32m1_t b) { + return a / b; +} + +// CHECK-LABEL: @div_inplace_i64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[DIV:%.*]] = sdiv [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[DIV]] +// +vint64m1_t div_inplace_i64(vint64m1_t a, vint64m1_t b) { + return a / b; +} + +// CHECK-LABEL: @div_inplace_u8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[DIV:%.*]] = sdiv [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[DIV]] +// +vuint8m1_t div_inplace_u8(vuint8m1_t a, vuint8m1_t b) { + return a / b; +} + +// CHECK-LABEL: @div_inplace_u16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[DIV:%.*]] = sdiv [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[DIV]] +// +vuint16m1_t div_inplace_u16(vuint16m1_t a, vuint16m1_t b) { + return a / b; +} + +// CHECK-LABEL: @div_inplace_u32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[DIV:%.*]] = sdiv [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[DIV]] +// +vuint32m1_t div_inplace_u32(vuint32m1_t a, vuint32m1_t b) { + return a / b; +} + +// CHECK-LABEL: @div_inplace_u64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[DIV:%.*]] = sdiv [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[DIV]] +// +vuint64m1_t div_inplace_u64(vuint64m1_t a, vuint64m1_t b) { + return a / b; +} + +// CHECK-LABEL: @div_inplace_f16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[DIV:%.*]] = fdiv [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[DIV]] +// +vfloat16m1_t div_inplace_f16(vfloat16m1_t a, vfloat16m1_t b) { + return a / b; +} + +// CHECK-LABEL: @div_inplace_f32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[DIV:%.*]] = fdiv [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[DIV]] +// +vfloat32m1_t div_inplace_f32(vfloat32m1_t a, vfloat32m1_t b) { + return a / b; +} + +// CHECK-LABEL: @div_inplace_f64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[DIV:%.*]] = fdiv [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[DIV]] +// +vfloat64m1_t div_inplace_f64(vfloat64m1_t a, vfloat64m1_t b) { + return a / b; +} + +// CHECK-LABEL: @div_scalar_i8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i8 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[DIV:%.*]] = sdiv [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[DIV]] +// +vint8m1_t div_scalar_i8(vint8m1_t a, int8_t b) { + return a / b; +} + +// CHECK-LABEL: @div_scalar_i16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i16 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[DIV:%.*]] = sdiv [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[DIV]] +// +vint16m1_t div_scalar_i16(vint16m1_t a, int16_t b) { + return a / b; +} + +// CHECK-LABEL: @div_scalar_i32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i32 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[DIV:%.*]] = sdiv [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[DIV]] +// +vint32m1_t div_scalar_i32(vint32m1_t a, int32_t b) { + return a / b; +} + +// CHECK-LABEL: @div_scalar_i64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i64 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[DIV:%.*]] = sdiv [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[DIV]] +// +vint64m1_t div_scalar_i64(vint64m1_t a, int64_t b) { + return a / b; +} + +// CHECK-LABEL: @div_scalar_u8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i8 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[DIV:%.*]] = sdiv [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[DIV]] +// +vuint8m1_t div_scalar_u8(vuint8m1_t a, uint8_t b) { + return a / b; +} + +// CHECK-LABEL: @div_scalar_u16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i16 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[DIV:%.*]] = sdiv [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[DIV]] +// +vuint16m1_t div_scalar_u16(vuint16m1_t a, uint16_t b) { + return a / b; +} + +// CHECK-LABEL: @div_scalar_u32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i32 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[DIV:%.*]] = sdiv [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[DIV]] +// +vuint32m1_t div_scalar_u32(vuint32m1_t a, uint32_t b) { + return a / b; +} + +// CHECK-LABEL: @div_scalar_u64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i64 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[DIV:%.*]] = sdiv [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[DIV]] +// +vuint64m1_t div_scalar_u64(vuint64m1_t a, uint64_t b) { + return a / b; +} + +// CHECK-LABEL: @div_scalar_f16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, half [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[DIV:%.*]] = fdiv [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[DIV]] +// +vfloat16m1_t div_scalar_f16(vfloat16m1_t a, _Float16 b) { + return a / b; +} + +// CHECK-LABEL: @div_scalar_f32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, float [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[DIV:%.*]] = fdiv [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[DIV]] +// +vfloat32m1_t div_scalar_f32(vfloat32m1_t a, float b) { + return a / b; +} + +// CHECK-LABEL: @div_scalar_f64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, double [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[DIV:%.*]] = fdiv [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[DIV]] +// +vfloat64m1_t div_scalar_f64(vfloat64m1_t a, double b) { + return a / b; +} + +// REMAINDER + +// CHECK-LABEL: @rem_i8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[REM:%.*]] = srem [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[REM]] +// +vint8m1_t rem_i8(vint8m1_t a, vint8m1_t b) { + return a % b; +} + +// CHECK-LABEL: @rem_i16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[REM:%.*]] = srem [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[REM]] +// +vint16m1_t rem_i16(vint16m1_t a, vint16m1_t b) { + return a % b; +} + +// CHECK-LABEL: @rem_i32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[REM:%.*]] = srem [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[REM]] +// +vint32m1_t rem_i32(vint32m1_t a, vint32m1_t b) { + return a % b; +} + +// CHECK-LABEL: @rem_i64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[REM:%.*]] = srem [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[REM]] +// +vint64m1_t rem_i64(vint64m1_t a, vint64m1_t b) { + return a % b; +} + +// CHECK-LABEL: @rem_u8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[REM:%.*]] = srem [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[REM]] +// +vuint8m1_t rem_u8(vuint8m1_t a, vuint8m1_t b) { + return a % b; +} + +// CHECK-LABEL: @rem_u16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[REM:%.*]] = srem [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[REM]] +// +vuint16m1_t rem_u16(vuint16m1_t a, vuint16m1_t b) { + return a % b; +} + +// CHECK-LABEL: @rem_u32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[REM:%.*]] = srem [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[REM]] +// +vuint32m1_t rem_u32(vuint32m1_t a, vuint32m1_t b) { + return a % b; +} + +// CHECK-LABEL: @rem_u64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[REM:%.*]] = srem [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[REM]] +// +vuint64m1_t rem_u64(vuint64m1_t a, vuint64m1_t b) { + return a % b; +} + +// CHECK-LABEL: @rem_inplace_i8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[REM:%.*]] = srem [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[REM]] +// +vint8m1_t rem_inplace_i8(vint8m1_t a, vint8m1_t b) { + return a % b; +} + +// CHECK-LABEL: @rem_inplace_i16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[REM:%.*]] = srem [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[REM]] +// +vint16m1_t rem_inplace_i16(vint16m1_t a, vint16m1_t b) { + return a % b; +} + +// CHECK-LABEL: @rem_inplace_i32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[REM:%.*]] = srem [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[REM]] +// +vint32m1_t rem_inplace_i32(vint32m1_t a, vint32m1_t b) { + return a % b; +} + +// CHECK-LABEL: @rem_inplace_i64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[REM:%.*]] = srem [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[REM]] +// +vint64m1_t rem_inplace_i64(vint64m1_t a, vint64m1_t b) { + return a % b; +} + +// CHECK-LABEL: @rem_inplace_u8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[REM:%.*]] = srem [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[REM]] +// +vuint8m1_t rem_inplace_u8(vuint8m1_t a, vuint8m1_t b) { + return a % b; +} + +// CHECK-LABEL: @rem_inplace_u16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[REM:%.*]] = srem [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[REM]] +// +vuint16m1_t rem_inplace_u16(vuint16m1_t a, vuint16m1_t b) { + return a % b; +} + +// CHECK-LABEL: @rem_inplace_u32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[REM:%.*]] = srem [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[REM]] +// +vuint32m1_t rem_inplace_u32(vuint32m1_t a, vuint32m1_t b) { + return a % b; +} + +// CHECK-LABEL: @rem_inplace_u64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[REM:%.*]] = srem [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[REM]] +// +vuint64m1_t rem_inplace_u64(vuint64m1_t a, vuint64m1_t b) { + return a % b; +} + +// CHECK-LABEL: @rem_scalar_i8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i8 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[REM:%.*]] = srem [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[REM]] +// +vint8m1_t rem_scalar_i8(vint8m1_t a, int8_t b) { + return a % b; +} + +// CHECK-LABEL: @rem_scalar_i16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i16 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[REM:%.*]] = srem [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[REM]] +// +vint16m1_t rem_scalar_i16(vint16m1_t a, int16_t b) { + return a % b; +} + +// CHECK-LABEL: @rem_scalar_i32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i32 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[REM:%.*]] = srem [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[REM]] +// +vint32m1_t rem_scalar_i32(vint32m1_t a, int32_t b) { + return a % b; +} + +// CHECK-LABEL: @rem_scalar_i64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i64 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[REM:%.*]] = srem [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[REM]] +// +vint64m1_t rem_scalar_i64(vint64m1_t a, int64_t b) { + return a % b; +} + +// CHECK-LABEL: @rem_scalar_u8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i8 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[REM:%.*]] = srem [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[REM]] +// +vuint8m1_t rem_scalar_u8(vuint8m1_t a, uint8_t b) { + return a % b; +} + +// CHECK-LABEL: @rem_scalar_u16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i16 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[REM:%.*]] = srem [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[REM]] +// +vuint16m1_t rem_scalar_u16(vuint16m1_t a, uint16_t b) { + return a % b; +} + +// CHECK-LABEL: @rem_scalar_u32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i32 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[REM:%.*]] = srem [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[REM]] +// +vuint32m1_t rem_scalar_u32(vuint32m1_t a, uint32_t b) { + return a % b; +} + +// CHECK-LABEL: @rem_scalar_u64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i64 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[REM:%.*]] = srem [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[REM]] +// +vuint64m1_t rem_scalar_u64(vuint64m1_t a, uint64_t b) { + return a % b; +} diff --git a/clang/test/CodeGen/riscv-rvv-vla-bitwise-ops.c b/clang/test/CodeGen/riscv-rvv-vla-bitwise-ops.c new file mode 100644 --- /dev/null +++ b/clang/test/CodeGen/riscv-rvv-vla-bitwise-ops.c @@ -0,0 +1,305 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// RUN: %clang_cc1 -triple riscv64-none-linux-gnu -target-feature +zve64d \ +// RUN: -target-feature +f -target-feature +d -disable-O0-optnone \ +// RUN: -mvscale-min=4 -mvscale-max=4 -emit-llvm -o - %s | \ +// RUN: opt -S -passes=sroa | FileCheck %s + +// REQUIRES: riscv-registered-target + +#include + +// AND + +// CHECK-LABEL: @and_i8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[AND:%.*]] = and [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[AND]] +// +vint8m1_t and_i8(vint8m1_t a, vint8m1_t b) { + return a & b; +} + +// CHECK-LABEL: @and_i16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[AND:%.*]] = and [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[AND]] +// +vint16m1_t and_i16(vint16m1_t a, vint16m1_t b) { + return a & b; +} + +// CHECK-LABEL: @and_i32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[AND:%.*]] = and [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[AND]] +// +vint32m1_t and_i32(vint32m1_t a, vint32m1_t b) { + return a & b; +} + +// CHECK-LABEL: @and_i64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[AND:%.*]] = and [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[AND]] +// +vint64m1_t and_i64(vint64m1_t a, vint64m1_t b) { + return a & b; +} + +// CHECK-LABEL: @and_u8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[AND:%.*]] = and [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[AND]] +// +vuint8m1_t and_u8(vuint8m1_t a, vuint8m1_t b) { + return a & b; +} + +// CHECK-LABEL: @and_u16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[AND:%.*]] = and [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[AND]] +// +vuint16m1_t and_u16(vuint16m1_t a, vuint16m1_t b) { + return a & b; +} + +// CHECK-LABEL: @and_u32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[AND:%.*]] = and [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[AND]] +// +vuint32m1_t and_u32(vuint32m1_t a, vuint32m1_t b) { + return a & b; +} + +// CHECK-LABEL: @and_u64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[AND:%.*]] = and [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[AND]] +// +vuint64m1_t and_u64(vuint64m1_t a, vuint64m1_t b) { + return a & b; +} + +// OR + +// CHECK-LABEL: @or_i8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[OR:%.*]] = or [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[OR]] +// +vint8m1_t or_i8(vint8m1_t a, vint8m1_t b) { + return a | b; +} + +// CHECK-LABEL: @or_i16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[OR:%.*]] = or [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[OR]] +// +vint16m1_t or_i16(vint16m1_t a, vint16m1_t b) { + return a | b; +} + +// CHECK-LABEL: @or_i32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[OR:%.*]] = or [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[OR]] +// +vint32m1_t or_i32(vint32m1_t a, vint32m1_t b) { + return a | b; +} + +// CHECK-LABEL: @or_i64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[OR:%.*]] = or [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[OR]] +// +vint64m1_t or_i64(vint64m1_t a, vint64m1_t b) { + return a | b; +} + +// CHECK-LABEL: @or_u8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[OR:%.*]] = or [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[OR]] +// +vuint8m1_t or_u8(vuint8m1_t a, vuint8m1_t b) { + return a | b; +} + +// CHECK-LABEL: @or_u16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[OR:%.*]] = or [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[OR]] +// +vuint16m1_t or_u16(vuint16m1_t a, vuint16m1_t b) { + return a | b; +} + +// CHECK-LABEL: @or_u32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[OR:%.*]] = or [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[OR]] +// +vuint32m1_t or_u32(vuint32m1_t a, vuint32m1_t b) { + return a | b; +} + +// CHECK-LABEL: @or_u64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[OR:%.*]] = or [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[OR]] +// +vuint64m1_t or_u64(vuint64m1_t a, vuint64m1_t b) { + return a | b; +} + +// XOR + +// CHECK-LABEL: @xor_i8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[XOR:%.*]] = xor [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[XOR]] +// +vint8m1_t xor_i8(vint8m1_t a, vint8m1_t b) { + return a ^ b; +} + +// CHECK-LABEL: @xor_i16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[XOR:%.*]] = xor [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[XOR]] +// +vint16m1_t xor_i16(vint16m1_t a, vint16m1_t b) { + return a ^ b; +} + +// CHECK-LABEL: @xor_i32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[XOR:%.*]] = xor [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[XOR]] +// +vint32m1_t xor_i32(vint32m1_t a, vint32m1_t b) { + return a ^ b; +} + +// CHECK-LABEL: @xor_i64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[XOR:%.*]] = xor [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[XOR]] +// +vint64m1_t xor_i64(vint64m1_t a, vint64m1_t b) { + return a ^ b; +} + +// CHECK-LABEL: @xor_u8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[XOR:%.*]] = xor [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[XOR]] +// +vuint8m1_t xor_u8(vuint8m1_t a, vuint8m1_t b) { + return a ^ b; +} + +// CHECK-LABEL: @xor_u16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[XOR:%.*]] = xor [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[XOR]] +// +vuint16m1_t xor_u16(vuint16m1_t a, vuint16m1_t b) { + return a ^ b; +} + +// CHECK-LABEL: @xor_u32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[XOR:%.*]] = xor [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[XOR]] +// +vuint32m1_t xor_u32(vuint32m1_t a, vuint32m1_t b) { + return a ^ b; +} + +// CHECK-LABEL: @xor_u64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[XOR:%.*]] = xor [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[XOR]] +// +vuint64m1_t xor_u64(vuint64m1_t a, vuint64m1_t b) { + return a ^ b; +} + +// NEG + +// CHECK-LABEL: @not_i8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[NOT:%.*]] = xor [[A:%.*]], shufflevector ( insertelement ( poison, i8 -1, i64 0), poison, zeroinitializer) +// CHECK-NEXT: ret [[NOT]] +// +vint8m1_t not_i8(vint8m1_t a) { + return ~a; +} + +// CHECK-LABEL: @not_i16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[NOT:%.*]] = xor [[A:%.*]], shufflevector ( insertelement ( poison, i16 -1, i64 0), poison, zeroinitializer) +// CHECK-NEXT: ret [[NOT]] +// +vint16m1_t not_i16(vint16m1_t a) { + return ~a; +} + +// CHECK-LABEL: @not_i32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[NOT:%.*]] = xor [[A:%.*]], shufflevector ( insertelement ( poison, i32 -1, i64 0), poison, zeroinitializer) +// CHECK-NEXT: ret [[NOT]] +// +vint32m1_t not_i32(vint32m1_t a) { + return ~a; +} + +// CHECK-LABEL: @not_i64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[NOT:%.*]] = xor [[A:%.*]], shufflevector ( insertelement ( poison, i64 -1, i64 0), poison, zeroinitializer) +// CHECK-NEXT: ret [[NOT]] +// +vint64m1_t not_i64(vint64m1_t a) { + return ~a; +} + +// CHECK-LABEL: @not_u8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[NOT:%.*]] = xor [[A:%.*]], shufflevector ( insertelement ( poison, i8 -1, i64 0), poison, zeroinitializer) +// CHECK-NEXT: ret [[NOT]] +// +vuint8m1_t not_u8(vuint8m1_t a) { + return ~a; +} + +// CHECK-LABEL: @not_u16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[NOT:%.*]] = xor [[A:%.*]], shufflevector ( insertelement ( poison, i16 -1, i64 0), poison, zeroinitializer) +// CHECK-NEXT: ret [[NOT]] +// +vuint16m1_t not_u16(vuint16m1_t a) { + return ~a; +} + +// CHECK-LABEL: @not_u32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[NOT:%.*]] = xor [[A:%.*]], shufflevector ( insertelement ( poison, i32 -1, i64 0), poison, zeroinitializer) +// CHECK-NEXT: ret [[NOT]] +// +vuint32m1_t not_u32(vuint32m1_t a) { + return ~a; +} + +// CHECK-LABEL: @not_u64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[NOT:%.*]] = xor [[A:%.*]], shufflevector ( insertelement ( poison, i64 -1, i64 0), poison, zeroinitializer) +// CHECK-NEXT: ret [[NOT]] +// +vuint64m1_t not_u64(vuint64m1_t a) { + return ~a; +} diff --git a/clang/test/CodeGen/riscv-rvv-vla-compare-ops.c b/clang/test/CodeGen/riscv-rvv-vla-compare-ops.c new file mode 100644 --- /dev/null +++ b/clang/test/CodeGen/riscv-rvv-vla-compare-ops.c @@ -0,0 +1,682 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// RUN: %clang_cc1 -triple riscv64-none-linux-gnu -target-feature +zve64d \ +// RUN: -target-feature +f -target-feature +d -target-feature +zvfh \ +// RUN: -target-feature +zfh -disable-O0-optnone \ +// RUN: -mvscale-min=4 -mvscale-max=4 -emit-llvm -o - %s | \ +// RUN: opt -S -passes=sroa | FileCheck %s + +// REQUIRES: riscv-registered-target + +#include + +// EQ + +// CHECK-LABEL: @eq_i8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp eq [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint8m1_t eq_i8(vint8m1_t a, vint8m1_t b) { + return a == b; +} + +// CHECK-LABEL: @eq_i16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp eq [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint16m1_t eq_i16(vint16m1_t a, vint16m1_t b) { + return a == b; +} + +// CHECK-LABEL: @eq_i32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp eq [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint32m1_t eq_i32(vint32m1_t a, vint32m1_t b) { + return a == b; +} + +// CHECK-LABEL: @eq_i64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp eq [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint64m1_t eq_i64(vint64m1_t a, vint64m1_t b) { + return a == b; +} + +// CHECK-LABEL: @eq_u8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp eq [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint8m1_t eq_u8(vuint8m1_t a, vuint8m1_t b) { + return a == b; +} + +// CHECK-LABEL: @eq_u16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp eq [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint16m1_t eq_u16(vuint16m1_t a, vuint16m1_t b) { + return a == b; +} + +// CHECK-LABEL: @eq_u32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp eq [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint32m1_t eq_u32(vuint32m1_t a, vuint32m1_t b) { + return a == b; +} + +// CHECK-LABEL: @eq_u64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp eq [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint64m1_t eq_u64(vuint64m1_t a, vuint64m1_t b) { + return a == b; +} + +// CHECK-LABEL: @eq_f16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = fcmp oeq [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint16m1_t eq_f16(vfloat16m1_t a, vfloat16m1_t b) { + return a == b; +} + +// CHECK-LABEL: @eq_f32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = fcmp oeq [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint32m1_t eq_f32(vfloat32m1_t a, vfloat32m1_t b) { + return a == b; +} + +// CHECK-LABEL: @eq_f64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = fcmp oeq [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint64m1_t eq_f64(vfloat64m1_t a, vfloat64m1_t b) { + return a == b; +} + +// NEQ + +// CHECK-LABEL: @neq_i8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ne [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint8m1_t neq_i8(vint8m1_t a, vint8m1_t b) { + return a != b; +} + +// CHECK-LABEL: @neq_i16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ne [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint16m1_t neq_i16(vint16m1_t a, vint16m1_t b) { + return a != b; +} + +// CHECK-LABEL: @neq_i32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ne [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint32m1_t neq_i32(vint32m1_t a, vint32m1_t b) { + return a != b; +} + +// CHECK-LABEL: @neq_i64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ne [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint64m1_t neq_i64(vint64m1_t a, vint64m1_t b) { + return a != b; +} + +// CHECK-LABEL: @neq_u8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ne [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint8m1_t neq_u8(vuint8m1_t a, vuint8m1_t b) { + return a != b; +} + +// CHECK-LABEL: @neq_u16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ne [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint16m1_t neq_u16(vuint16m1_t a, vuint16m1_t b) { + return a != b; +} + +// CHECK-LABEL: @neq_u32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ne [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint32m1_t neq_u32(vuint32m1_t a, vuint32m1_t b) { + return a != b; +} + +// CHECK-LABEL: @neq_u64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ne [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint64m1_t neq_u64(vuint64m1_t a, vuint64m1_t b) { + return a != b; +} + +// CHECK-LABEL: @neq_f16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = fcmp une [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint16m1_t neq_f16(vfloat16m1_t a, vfloat16m1_t b) { + return a != b; +} + +// CHECK-LABEL: @neq_f32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = fcmp une [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint32m1_t neq_f32(vfloat32m1_t a, vfloat32m1_t b) { + return a != b; +} + +// CHECK-LABEL: @neq_f64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = fcmp une [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint64m1_t neq_f64(vfloat64m1_t a, vfloat64m1_t b) { + return a != b; +} + +// LT + +// CHECK-LABEL: @lt_i8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ult [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint8m1_t lt_i8(vint8m1_t a, vint8m1_t b) { + return a < b; +} + +// CHECK-LABEL: @lt_i16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ult [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint16m1_t lt_i16(vint16m1_t a, vint16m1_t b) { + return a < b; +} + +// CHECK-LABEL: @lt_i32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ult [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint32m1_t lt_i32(vint32m1_t a, vint32m1_t b) { + return a < b; +} + +// CHECK-LABEL: @lt_i64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ult [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint64m1_t lt_i64(vint64m1_t a, vint64m1_t b) { + return a < b; +} + +// CHECK-LABEL: @lt_u8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ult [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint8m1_t lt_u8(vuint8m1_t a, vuint8m1_t b) { + return a < b; +} + +// CHECK-LABEL: @lt_u16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ult [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint16m1_t lt_u16(vuint16m1_t a, vuint16m1_t b) { + return a < b; +} + +// CHECK-LABEL: @lt_u32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ult [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint32m1_t lt_u32(vuint32m1_t a, vuint32m1_t b) { + return a < b; +} + +// CHECK-LABEL: @lt_u64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ult [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint64m1_t lt_u64(vuint64m1_t a, vuint64m1_t b) { + return a < b; +} + +// CHECK-LABEL: @lt_f16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = fcmp olt [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint16m1_t lt_f16(vfloat16m1_t a, vfloat16m1_t b) { + return a < b; +} + +// CHECK-LABEL: @lt_f32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = fcmp olt [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint32m1_t lt_f32(vfloat32m1_t a, vfloat32m1_t b) { + return a < b; +} + +// CHECK-LABEL: @lt_f64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = fcmp olt [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint64m1_t lt_f64(vfloat64m1_t a, vfloat64m1_t b) { + return a < b; +} + +// LEQ + +// CHECK-LABEL: @leq_i8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ule [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint8m1_t leq_i8(vint8m1_t a, vint8m1_t b) { + return a <= b; +} + +// CHECK-LABEL: @leq_i16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ule [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint16m1_t leq_i16(vint16m1_t a, vint16m1_t b) { + return a <= b; +} + +// CHECK-LABEL: @leq_i32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ule [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint32m1_t leq_i32(vint32m1_t a, vint32m1_t b) { + return a <= b; +} + +// CHECK-LABEL: @leq_i64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ule [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint64m1_t leq_i64(vint64m1_t a, vint64m1_t b) { + return a <= b; +} + +// CHECK-LABEL: @leq_u8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ule [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint8m1_t leq_u8(vuint8m1_t a, vuint8m1_t b) { + return a <= b; +} + +// CHECK-LABEL: @leq_u16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ule [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint16m1_t leq_u16(vuint16m1_t a, vuint16m1_t b) { + return a <= b; +} + +// CHECK-LABEL: @leq_u32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ule [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint32m1_t leq_u32(vuint32m1_t a, vuint32m1_t b) { + return a <= b; +} + +// CHECK-LABEL: @leq_u64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ule [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint64m1_t leq_u64(vuint64m1_t a, vuint64m1_t b) { + return a <= b; +} + +// CHECK-LABEL: @leq_f16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = fcmp ole [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint16m1_t leq_f16(vfloat16m1_t a, vfloat16m1_t b) { + return a <= b; +} + +// CHECK-LABEL: @leq_f32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = fcmp ole [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint32m1_t leq_f32(vfloat32m1_t a, vfloat32m1_t b) { + return a <= b; +} + +// CHECK-LABEL: @leq_f64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = fcmp ole [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint64m1_t leq_f64(vfloat64m1_t a, vfloat64m1_t b) { + return a <= b; +} + +// GT + +// CHECK-LABEL: @gt_i8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ugt [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint8m1_t gt_i8(vint8m1_t a, vint8m1_t b) { + return a > b; +} + +// CHECK-LABEL: @gt_i16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ugt [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint16m1_t gt_i16(vint16m1_t a, vint16m1_t b) { + return a > b; +} + +// CHECK-LABEL: @gt_i32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ugt [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint32m1_t gt_i32(vint32m1_t a, vint32m1_t b) { + return a > b; +} + +// CHECK-LABEL: @gt_i64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ugt [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint64m1_t gt_i64(vint64m1_t a, vint64m1_t b) { + return a > b; +} + +// CHECK-LABEL: @gt_u8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ugt [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint8m1_t gt_u8(vuint8m1_t a, vuint8m1_t b) { + return a > b; +} + +// CHECK-LABEL: @gt_u16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ugt [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint16m1_t gt_u16(vuint16m1_t a, vuint16m1_t b) { + return a > b; +} + +// CHECK-LABEL: @gt_u32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ugt [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint32m1_t gt_u32(vuint32m1_t a, vuint32m1_t b) { + return a > b; +} + +// CHECK-LABEL: @gt_u64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp ugt [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint64m1_t gt_u64(vuint64m1_t a, vuint64m1_t b) { + return a > b; +} + +// CHECK-LABEL: @gt_f16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = fcmp ogt [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint16m1_t gt_f16(vfloat16m1_t a, vfloat16m1_t b) { + return a > b; +} + +// CHECK-LABEL: @gt_f32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = fcmp ogt [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint32m1_t gt_f32(vfloat32m1_t a, vfloat32m1_t b) { + return a > b; +} + +// CHECK-LABEL: @gt_f64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = fcmp ogt [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint64m1_t gt_f64(vfloat64m1_t a, vfloat64m1_t b) { + return a > b; +} + +// GEQ + +// CHECK-LABEL: @geq_i8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp uge [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint8m1_t geq_i8(vint8m1_t a, vint8m1_t b) { + return a >= b; +} + +// CHECK-LABEL: @geq_i16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp uge [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint16m1_t geq_i16(vint16m1_t a, vint16m1_t b) { + return a >= b; +} + +// CHECK-LABEL: @geq_i32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp uge [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint32m1_t geq_i32(vint32m1_t a, vint32m1_t b) { + return a >= b; +} + +// CHECK-LABEL: @geq_i64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp uge [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint64m1_t geq_i64(vint64m1_t a, vint64m1_t b) { + return a >= b; +} + +// CHECK-LABEL: @geq_u8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp uge [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint8m1_t geq_u8(vuint8m1_t a, vuint8m1_t b) { + return a >= b; +} + +// CHECK-LABEL: @geq_u16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp uge [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint16m1_t geq_u16(vuint16m1_t a, vuint16m1_t b) { + return a >= b; +} + +// CHECK-LABEL: @geq_u32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp uge [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint32m1_t geq_u32(vuint32m1_t a, vuint32m1_t b) { + return a >= b; +} + +// CHECK-LABEL: @geq_u64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = icmp uge [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint64m1_t geq_u64(vuint64m1_t a, vuint64m1_t b) { + return a >= b; +} + +// CHECK-LABEL: @geq_f16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = fcmp oge [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint16m1_t geq_f16(vfloat16m1_t a, vfloat16m1_t b) { + return a >= b; +} + +// CHECK-LABEL: @geq_f32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = fcmp oge [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint32m1_t geq_f32(vfloat32m1_t a, vfloat32m1_t b) { + return a >= b; +} + +// CHECK-LABEL: @geq_f64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[CMP:%.*]] = fcmp oge [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = zext [[CMP]] to +// CHECK-NEXT: ret [[CONV]] +// +vint64m1_t geq_f64(vfloat64m1_t a, vfloat64m1_t b) { + return a >= b; +} diff --git a/clang/test/CodeGen/riscv-rvv-vla-shift-ops.c b/clang/test/CodeGen/riscv-rvv-vla-shift-ops.c new file mode 100644 --- /dev/null +++ b/clang/test/CodeGen/riscv-rvv-vla-shift-ops.c @@ -0,0 +1,505 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// RUN: %clang_cc1 -triple riscv64-none-linux-gnu -target-feature +zve64d \ +// RUN: -target-feature +f -target-feature +d -disable-O0-optnone \ +// RUN: -mvscale-min=4 -mvscale-max=4 -emit-llvm -o - %s | \ +// RUN: opt -S -passes=sroa | FileCheck %s + +// REQUIRES: riscv-registered-target + +#include + +// CHECK-LABEL: @lshift_i8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SHL:%.*]] = shl [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SHL]] +// +vint8m1_t lshift_i8(vint8m1_t a, vint8m1_t b) { + return a << b; +} + +// CHECK-LABEL: @rshift_i8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SHR:%.*]] = ashr [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SHR]] +// +vint8m1_t rshift_i8(vint8m1_t a, vint8m1_t b) { + return a >> b; +} + +// CHECK-LABEL: @lshift_u8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SHL:%.*]] = shl [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SHL]] +// +vuint8m1_t lshift_u8(vuint8m1_t a, vuint8m1_t b) { + return a << b; +} + +// CHECK-LABEL: @rshift_u8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SHR:%.*]] = ashr [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SHR]] +// +vuint8m1_t rshift_u8(vuint8m1_t a, vuint8m1_t b) { + return a >> b; +} + +// CHECK-LABEL: @lshift_i16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SHL:%.*]] = shl [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SHL]] +// +vint16m1_t lshift_i16(vint16m1_t a, vint16m1_t b) { + return a << b; +} + +// CHECK-LABEL: @rshift_i16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SHR:%.*]] = ashr [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SHR]] +// +vint16m1_t rshift_i16(vint16m1_t a, vint16m1_t b) { + return a >> b; +} + +// CHECK-LABEL: @lshift_u16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SHL:%.*]] = shl [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SHL]] +// +vuint16m1_t lshift_u16(vuint16m1_t a, vuint16m1_t b) { + return a << b; +} + +// CHECK-LABEL: @rshift_u16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SHR:%.*]] = ashr [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SHR]] +// +vuint16m1_t rshift_u16(vuint16m1_t a, vuint16m1_t b) { + return a >> b; +} + +// CHECK-LABEL: @lshift_i32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SHL:%.*]] = shl [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SHL]] +// +vint32m1_t lshift_i32(vint32m1_t a, vint32m1_t b) { + return a << b; +} + +// CHECK-LABEL: @rshift_i32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SHR:%.*]] = ashr [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SHR]] +// +vint32m1_t rshift_i32(vint32m1_t a, vint32m1_t b) { + return a >> b; +} + +// CHECK-LABEL: @lshift_u32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SHL:%.*]] = shl [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SHL]] +// +vuint32m1_t lshift_u32(vuint32m1_t a, vuint32m1_t b) { + return a << b; +} + +// CHECK-LABEL: @rshift_u32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SHR:%.*]] = ashr [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SHR]] +// +vuint32m1_t rshift_u32(vuint32m1_t a, vuint32m1_t b) { + return a >> b; +} + +// CHECK-LABEL: @lshift_i64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SHL:%.*]] = shl [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SHL]] +// +vint64m1_t lshift_i64(vint64m1_t a, vint64m1_t b) { + return a << b; +} + +// CHECK-LABEL: @rshift_i64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SHR:%.*]] = ashr [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SHR]] +// +vint64m1_t rshift_i64(vint64m1_t a, vint64m1_t b) { + return a >> b; +} + +// CHECK-LABEL: @lshift_u64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SHL:%.*]] = shl [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SHL]] +// +vuint64m1_t lshift_u64(vuint64m1_t a, vuint64m1_t b) { + return a << b; +} + +// CHECK-LABEL: @rshift_u64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SHR:%.*]] = ashr [[A:%.*]], [[B:%.*]] +// CHECK-NEXT: ret [[SHR]] +// +vuint64m1_t rshift_u64(vuint64m1_t a, vuint64m1_t b) { + return a >> b; +} + +// CHECK-LABEL: @lshift_i8_rsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i8 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHL:%.*]] = shl [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[SHL]] +// +vint8m1_t lshift_i8_rsplat(vint8m1_t a, int8_t b) { + return a << b; +} + +// CHECK-LABEL: @lshift_i8_lsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i8 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHL:%.*]] = shl [[SPLAT_SPLAT]], [[A:%.*]] +// CHECK-NEXT: ret [[SHL]] +// +vint8m1_t lshift_i8_lsplat(vint8m1_t a, int8_t b) { + return b << a; +} + +// CHECK-LABEL: @rshift_i8_rsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i8 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHR:%.*]] = ashr [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[SHR]] +// +vint8m1_t rshift_i8_rsplat(vint8m1_t a, int8_t b) { + return a >> b; +} + +// CHECK-LABEL: @rshift_i8_lsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i8 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHR:%.*]] = ashr [[SPLAT_SPLAT]], [[A:%.*]] +// CHECK-NEXT: ret [[SHR]] +// +vint8m1_t rshift_i8_lsplat(vint8m1_t a, int8_t b) { + return b >> a; +} + +// CHECK-LABEL: @lshift_u8_rsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i8 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHL:%.*]] = shl [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[SHL]] +// +vuint8m1_t lshift_u8_rsplat(vuint8m1_t a, uint8_t b) { + return a << b; +} + +// CHECK-LABEL: @lshift_u8_lsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i8 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHL:%.*]] = shl [[SPLAT_SPLAT]], [[A:%.*]] +// CHECK-NEXT: ret [[SHL]] +// +vuint8m1_t lshift_u8_lsplat(vuint8m1_t a, uint8_t b) { + return b << a; +} + +// CHECK-LABEL: @rshift_u8_rsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i8 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHR:%.*]] = ashr [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[SHR]] +// +vuint8m1_t rshift_u8_rsplat(vuint8m1_t a, uint8_t b) { + return a >> b; +} + +// CHECK-LABEL: @rshift_u8_lsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i8 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHR:%.*]] = ashr [[SPLAT_SPLAT]], [[A:%.*]] +// CHECK-NEXT: ret [[SHR]] +// +vuint8m1_t rshift_u8_lsplat(vuint8m1_t a, uint8_t b) { + return b >> a; +} + +// CHECK-LABEL: @lshift_i16_rsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i16 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHL:%.*]] = shl [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[SHL]] +// +vint16m1_t lshift_i16_rsplat(vint16m1_t a, int16_t b) { + return a << b; +} + +// CHECK-LABEL: @lshift_i16_lsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i16 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHL:%.*]] = shl [[SPLAT_SPLAT]], [[A:%.*]] +// CHECK-NEXT: ret [[SHL]] +// +vint16m1_t lshift_i16_lsplat(vint16m1_t a, int16_t b) { + return b << a; +} + +// CHECK-LABEL: @rshift_i16_rsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i16 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHR:%.*]] = ashr [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[SHR]] +// +vint16m1_t rshift_i16_rsplat(vint16m1_t a, int16_t b) { + return a >> b; +} + +// CHECK-LABEL: @rshift_i16_lsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i16 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHR:%.*]] = ashr [[SPLAT_SPLAT]], [[A:%.*]] +// CHECK-NEXT: ret [[SHR]] +// +vint16m1_t rshift_i16_lsplat(vint16m1_t a, int16_t b) { + return b >> a; +} + +// CHECK-LABEL: @lshift_u16_rsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i16 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHL:%.*]] = shl [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[SHL]] +// +vuint16m1_t lshift_u16_rsplat(vuint16m1_t a, uint16_t b) { + return a << b; +} + +// CHECK-LABEL: @lshift_u16_lsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i16 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHL:%.*]] = shl [[SPLAT_SPLAT]], [[A:%.*]] +// CHECK-NEXT: ret [[SHL]] +// +vuint16m1_t lshift_u16_lsplat(vuint16m1_t a, uint16_t b) { + return b << a; +} + +// CHECK-LABEL: @rshift_u16_rsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i16 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHR:%.*]] = ashr [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[SHR]] +// +vuint16m1_t rshift_u16_rsplat(vuint16m1_t a, uint16_t b) { + return a >> b; +} + +// CHECK-LABEL: @rshift_u16_lsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i16 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHR:%.*]] = ashr [[SPLAT_SPLAT]], [[A:%.*]] +// CHECK-NEXT: ret [[SHR]] +// +vuint16m1_t rshift_u16_lsplat(vuint16m1_t a, uint16_t b) { + return b >> a; +} + +// CHECK-LABEL: @lshift_i32_rsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i32 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHL:%.*]] = shl [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[SHL]] +// +vint32m1_t lshift_i32_rsplat(vint32m1_t a, int32_t b) { + return a << b; +} + +// CHECK-LABEL: @lshift_i32_lsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i32 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHL:%.*]] = shl [[SPLAT_SPLAT]], [[A:%.*]] +// CHECK-NEXT: ret [[SHL]] +// +vint32m1_t lshift_i32_lsplat(vint32m1_t a, int32_t b) { + return b << a; +} + +// CHECK-LABEL: @rshift_i32_rsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i32 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHR:%.*]] = ashr [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[SHR]] +// +vint32m1_t rshift_i32_rsplat(vint32m1_t a, int32_t b) { + return a >> b; +} + +// CHECK-LABEL: @rshift_i32_lsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i32 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHR:%.*]] = ashr [[SPLAT_SPLAT]], [[A:%.*]] +// CHECK-NEXT: ret [[SHR]] +// +vint32m1_t rshift_i32_lsplat(vint32m1_t a, int32_t b) { + return b >> a; +} + +// CHECK-LABEL: @lshift_u32_rsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i32 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHL:%.*]] = shl [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[SHL]] +// +vuint32m1_t lshift_u32_rsplat(vuint32m1_t a, uint32_t b) { + return a << b; +} + +// CHECK-LABEL: @lshift_u32_lsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i32 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHL:%.*]] = shl [[SPLAT_SPLAT]], [[A:%.*]] +// CHECK-NEXT: ret [[SHL]] +// +vuint32m1_t lshift_u32_lsplat(vuint32m1_t a, uint32_t b) { + return b << a; +} + +// CHECK-LABEL: @rshift_u32_rsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i32 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHR:%.*]] = ashr [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[SHR]] +// +vuint32m1_t rshift_u32_rsplat(vuint32m1_t a, uint32_t b) { + return a >> b; +} + +// CHECK-LABEL: @rshift_u32_lsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i32 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHR:%.*]] = ashr [[SPLAT_SPLAT]], [[A:%.*]] +// CHECK-NEXT: ret [[SHR]] +// +vuint32m1_t rshift_u32_lsplat(vuint32m1_t a, uint32_t b) { + return b >> a; +} + +// CHECK-LABEL: @lshift_i64_rsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i64 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHL:%.*]] = shl [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[SHL]] +// +vint64m1_t lshift_i64_rsplat(vint64m1_t a, int64_t b) { + return a << b; +} + +// CHECK-LABEL: @lshift_i64_lsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i64 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHL:%.*]] = shl [[SPLAT_SPLAT]], [[A:%.*]] +// CHECK-NEXT: ret [[SHL]] +// +vint64m1_t lshift_i64_lsplat(vint64m1_t a, int64_t b) { + return b << a; +} + +// CHECK-LABEL: @rshift_i64_rsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i64 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHR:%.*]] = ashr [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[SHR]] +// +vint64m1_t rshift_i64_rsplat(vint64m1_t a, int64_t b) { + return a >> b; +} + +// CHECK-LABEL: @rshift_i64_lsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i64 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHR:%.*]] = ashr [[SPLAT_SPLAT]], [[A:%.*]] +// CHECK-NEXT: ret [[SHR]] +// +vint64m1_t rshift_i64_lsplat(vint64m1_t a, int64_t b) { + return b >> a; +} + +// CHECK-LABEL: @lshift_u64_rsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i64 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHL:%.*]] = shl [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[SHL]] +// +vuint64m1_t lshift_u64_rsplat(vuint64m1_t a, uint64_t b) { + return a << b; +} + +// CHECK-LABEL: @lshift_u64_lsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i64 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHL:%.*]] = shl [[SPLAT_SPLAT]], [[A:%.*]] +// CHECK-NEXT: ret [[SHL]] +// +vuint64m1_t lshift_u64_lsplat(vuint64m1_t a, uint64_t b) { + return b << a; +} + +// CHECK-LABEL: @rshift_u64_rsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i64 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHR:%.*]] = ashr [[A:%.*]], [[SPLAT_SPLAT]] +// CHECK-NEXT: ret [[SHR]] +// +vuint64m1_t rshift_u64_rsplat(vuint64m1_t a, uint64_t b) { + return a >> b; +} + +// CHECK-LABEL: @rshift_u64_lsplat( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement poison, i64 [[B:%.*]], i64 0 +// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector [[SPLAT_SPLATINSERT]], poison, zeroinitializer +// CHECK-NEXT: [[SHR:%.*]] = ashr [[SPLAT_SPLAT]], [[A:%.*]] +// CHECK-NEXT: ret [[SHR]] +// +vuint64m1_t rshift_u64_lsplat(vuint64m1_t a, uint64_t b) { + return b >> a; +} diff --git a/clang/test/CodeGen/riscv-rvv-vla-subscript-ops.c b/clang/test/CodeGen/riscv-rvv-vla-subscript-ops.c new file mode 100644 --- /dev/null +++ b/clang/test/CodeGen/riscv-rvv-vla-subscript-ops.c @@ -0,0 +1,110 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// RUN: %clang_cc1 -triple riscv64-none-linux-gnu -target-feature +zve64d \ +// RUN: -target-feature +f -target-feature +d -target-feature +zvfh \ +// RUN: -target-feature +zfh -disable-O0-optnone \ +// RUN: -mvscale-min=4 -mvscale-max=4 -emit-llvm -o - %s | \ +// RUN: opt -S -passes=sroa | FileCheck %s + +// REQUIRES: riscv-registered-target + +#include + +// CHECK-LABEL: @subscript_int8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[VECEXT:%.*]] = extractelement [[A:%.*]], i64 [[B:%.*]] +// CHECK-NEXT: ret i8 [[VECEXT]] +// +int8_t subscript_int8(vint8m1_t a, size_t b) { + return a[b]; +} + +// CHECK-LABEL: @subscript_uint8( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[VECEXT:%.*]] = extractelement [[A:%.*]], i64 [[B:%.*]] +// CHECK-NEXT: ret i8 [[VECEXT]] +// +uint8_t subscript_uint8(vuint8m1_t a, size_t b) { + return a[b]; +} + +// CHECK-LABEL: @subscript_int16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[VECEXT:%.*]] = extractelement [[A:%.*]], i64 [[B:%.*]] +// CHECK-NEXT: ret i16 [[VECEXT]] +// +int16_t subscript_int16(vint16m1_t a, size_t b) { + return a[b]; +} + +// CHECK-LABEL: @subscript_uint16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[VECEXT:%.*]] = extractelement [[A:%.*]], i64 [[B:%.*]] +// CHECK-NEXT: ret i16 [[VECEXT]] +// +uint16_t subscript_uint16(vuint16m1_t a, size_t b) { + return a[b]; +} + +// CHECK-LABEL: @subscript_int32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[VECEXT:%.*]] = extractelement [[A:%.*]], i64 [[B:%.*]] +// CHECK-NEXT: ret i32 [[VECEXT]] +// +int32_t subscript_int32(vint32m1_t a, size_t b) { + return a[b]; +} + +// CHECK-LABEL: @subscript_uint32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[VECEXT:%.*]] = extractelement [[A:%.*]], i64 [[B:%.*]] +// CHECK-NEXT: ret i32 [[VECEXT]] +// +uint32_t subscript_uint32(vuint32m1_t a, size_t b) { + return a[b]; +} + +// CHECK-LABEL: @subscript_int64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[VECEXT:%.*]] = extractelement [[A:%.*]], i64 [[B:%.*]] +// CHECK-NEXT: ret i64 [[VECEXT]] +// +int64_t subscript_int64(vint64m1_t a, size_t b) { + return a[b]; +} + +// CHECK-LABEL: @subscript_uint64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[VECEXT:%.*]] = extractelement [[A:%.*]], i64 [[B:%.*]] +// CHECK-NEXT: ret i64 [[VECEXT]] +// +uint64_t subscript_uint64(vuint64m1_t a, size_t b) { + return a[b]; +} + +// CHECK-LABEL: @subscript_float16( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[VECEXT:%.*]] = extractelement [[A:%.*]], i64 [[B:%.*]] +// CHECK-NEXT: [[CONV:%.*]] = fpext half [[VECEXT]] to float +// CHECK-NEXT: ret float [[CONV]] +// +float subscript_float16(vfloat16m1_t a, size_t b) { + return a[b]; +} + +// CHECK-LABEL: @subscript_float32( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[VECEXT:%.*]] = extractelement [[A:%.*]], i64 [[B:%.*]] +// CHECK-NEXT: ret float [[VECEXT]] +// +float subscript_float32(vfloat32m1_t a, size_t b) { + return a[b]; +} + +// CHECK-LABEL: @subscript_float64( +// CHECK-NEXT: entry: +// CHECK-NEXT: [[VECEXT:%.*]] = extractelement [[A:%.*]], i64 [[B:%.*]] +// CHECK-NEXT: ret double [[VECEXT]] +// +double subscript_float64(vfloat64m1_t a, size_t b) { + return a[b]; +} diff --git a/clang/test/Sema/riscv-rvv-vector-arith-ops.c b/clang/test/Sema/riscv-rvv-vector-arith-ops.c new file mode 100644 --- /dev/null +++ b/clang/test/Sema/riscv-rvv-vector-arith-ops.c @@ -0,0 +1,702 @@ +// RUN: %clang_cc1 -triple riscv64 -target-feature +f -target-feature +d \ +// RUN: -target-feature +v -target-feature +zfh -target-feature +zvfh \ +// RUN: -disable-O0-optnone -o - -fsyntax-only %s -verify +// REQUIRES: riscv-registered-target + +#include + +struct S { + int x; +}; + +void add(vint8m8_t i8, vint16m4_t i16, vint32m2_t i32, vint64m1_t i64, + vuint8m8_t u8, vuint16m4_t u16, vuint32m2_t u32, vuint64m1_t u64, + vfloat16m4_t f16, vfloat32m2_t f32, vfloat64m1_t f64, + vbool1_t b, struct S s) { + (void)(i8 + b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i8 + i16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i8 + i32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i8 + i64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i8 + u16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i8 + u32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i8 + u64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i8 + f16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(i8 + f32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(i8 + f64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(u8 + b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u8 + i16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u8 + i32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u8 + i64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u8 + u16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u8 + u32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u8 + u64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u8 + f16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(u8 + f32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(u8 + f64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(i16 + b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i16 + i8); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i16 + i32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i16 + i64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i16 + u8); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i16 + u32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i16 + u64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i16 + f16); // expected-error{{cannot convert between vector type 'vfloat16m4_t' (aka '__rvv_float16m4_t') and vector type 'vint16m4_t' (aka '__rvv_int16m4_t') as implicit conversion would cause truncation}} + (void)(i16 + f32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(i16 + f64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(u16 + b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u16 + i8); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u16 + i32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u16 + i64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u16 + u8); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u16 + u32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u16 + u64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u16 + f16); // expected-error{{cannot convert between vector type 'vfloat16m4_t' (aka '__rvv_float16m4_t') and vector type 'vuint16m4_t' (aka '__rvv_uint16m4_t') as implicit conversion would cause truncation}} + (void)(u16 + f32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(u16 + f64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(i32 + b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i32 + i8); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i32 + i16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i32 + i64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i32 + u8); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i32 + u16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i32 + u64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i32 + f16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(i32 + f32); // expected-error{{cannot convert between vector type 'vfloat32m2_t' (aka '__rvv_float32m2_t') and vector type 'vint32m2_t' (aka '__rvv_int32m2_t') as implicit conversion would cause truncation}} + (void)(i32 + f64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(u32 + b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u32 + i8); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u32 + i16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u32 + i64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u32 + u8); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u32 + u16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u32 + u64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u32 + f16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(u32 + f32); // expected-error{{cannot convert between vector type 'vfloat32m2_t' (aka '__rvv_float32m2_t') and vector type 'vuint32m2_t' (aka '__rvv_uint32m2_t') as implicit conversion would cause truncation}} + (void)(u32 + f64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(i64 + b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i64 + i8); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i64 + i16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i64 + i32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i64 + u8); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i64 + u16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i64 + u32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i64 + f16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(i64 + f32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(i64 + f64); // expected-error{{cannot convert between vector type 'vfloat64m1_t' (aka '__rvv_float64m1_t') and vector type 'vint64m1_t' (aka '__rvv_int64m1_t') as implicit conversion would cause truncation}} + + (void)(u64 + b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u64 + i8); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u64 + i16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u64 + i32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u64 + u8); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u64 + u16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u64 + u32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u64 + f16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(u64 + f32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(u64 + f64); // expected-error{{cannot convert between vector type 'vfloat64m1_t' (aka '__rvv_float64m1_t') and vector type 'vuint64m1_t' (aka '__rvv_uint64m1_t') as implicit conversion would cause truncation}} + + (void)(f16 + b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(f16 + i8); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(f16 + i16); // expected-error{{cannot convert between vector type 'vint16m4_t' (aka '__rvv_int16m4_t') and vector type 'vfloat16m4_t' (aka '__rvv_float16m4_t') as implicit conversion would cause truncation}} + (void)(f16 + i32); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(f16 + i64); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(f16 + u8); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(f16 + u32); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(f16 + u64); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(f16 + f32); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(f16 + f64); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(f32 + b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(f32 + i8); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(f32 + i16); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(f32 + i32); // expected-error{{cannot convert between vector type 'vint32m2_t' (aka '__rvv_int32m2_t') and vector type 'vfloat32m2_t' (aka '__rvv_float32m2_t') as implicit conversion would cause truncation}} + (void)(f32 + i64); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(f32 + u8); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(f32 + u16); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(f32 + u64); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(f32 + f16); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(f32 + f64); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(f64 + b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(f64 + i8); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(f64 + i16); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(f64 + i32); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(f64 + i64); // expected-error{{cannot convert between vector type 'vint64m1_t' (aka '__rvv_int64m1_t') and vector type 'vfloat64m1_t' (aka '__rvv_float64m1_t') as implicit conversion would cause truncation}} + (void)(f64 + u8); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(f64 + u16); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(f64 + u32); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(f64 + f16); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(f64 + f32); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + + (void)(s + i8); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s + i16); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s + i32); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s + i64); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s + u16); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s + u32); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s + u64); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s + f16); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s + f32); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s + f64); // expected-error{{cannot convert between vector and non-scalar values}} +} + +void sub(vint8m8_t i8, vint16m4_t i16, vint32m2_t i32, vint64m1_t i64, + vuint8m8_t u8, vuint16m4_t u16, vuint32m2_t u32, vuint64m1_t u64, + vfloat16m4_t f16, vfloat32m2_t f32, vfloat64m1_t f64, + vbool1_t b, struct S s) { + (void)(i8 - b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i8 - i16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i8 - i32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i8 - i64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i8 - u16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i8 - u32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i8 - u64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i8 - f16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(i8 - f32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(i8 - f64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(u8 - b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u8 - i16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u8 - i32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u8 - i64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u8 - u16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u8 - u32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u8 - u64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u8 - f16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(u8 - f32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(u8 - f64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(i16 - b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i16 - i8); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i16 - i32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i16 - i64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i16 - u8); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i16 - u32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i16 - u64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i16 - f16); // expected-error{{cannot convert between vector type 'vfloat16m4_t' (aka '__rvv_float16m4_t') and vector type 'vint16m4_t' (aka '__rvv_int16m4_t') as implicit conversion would cause truncation}} + (void)(i16 - f32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(i16 - f64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(u16 - b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u16 - i8); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u16 - i32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u16 - i64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u16 - u8); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u16 - u32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u16 - u64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u16 - f16); // expected-error{{cannot convert between vector type 'vfloat16m4_t' (aka '__rvv_float16m4_t') and vector type 'vuint16m4_t' (aka '__rvv_uint16m4_t') as implicit conversion would cause truncation}} + (void)(u16 - f32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(u16 - f64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(i32 - b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i32 - i8); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i32 - i16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i32 - i64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i32 - u8); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i32 - u16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i32 - u64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i32 - f16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(i32 - f32); // expected-error{{cannot convert between vector type 'vfloat32m2_t' (aka '__rvv_float32m2_t') and vector type 'vint32m2_t' (aka '__rvv_int32m2_t') as implicit conversion would cause truncation}} + (void)(i32 - f64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(u32 - b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u32 - i8); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u32 - i16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u32 - i64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u32 - u8); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u32 - u16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u32 - u64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u32 - f16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(u32 - f32); // expected-error{{cannot convert between vector type 'vfloat32m2_t' (aka '__rvv_float32m2_t') and vector type 'vuint32m2_t' (aka '__rvv_uint32m2_t') as implicit conversion would cause truncation}} + (void)(u32 - f64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(i64 - b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i64 - i8); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i64 - i16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i64 - i32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i64 - u8); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i64 - u16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i64 - u32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i64 - f16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(i64 - f32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(i64 - f64); // expected-error{{cannot convert between vector type 'vfloat64m1_t' (aka '__rvv_float64m1_t') and vector type 'vint64m1_t' (aka '__rvv_int64m1_t') as implicit conversion would cause truncation}} + + (void)(u64 - b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u64 - i8); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u64 - i16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u64 - i32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u64 - u8); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u64 - u16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u64 - u32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u64 - f16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(u64 - f32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(u64 - f64); // expected-error{{cannot convert between vector type 'vfloat64m1_t' (aka '__rvv_float64m1_t') and vector type 'vuint64m1_t' (aka '__rvv_uint64m1_t') as implicit conversion would cause truncation}} + + (void)(f16 - b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(f16 - i8); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(f16 - i16); // expected-error{{cannot convert between vector type 'vint16m4_t' (aka '__rvv_int16m4_t') and vector type 'vfloat16m4_t' (aka '__rvv_float16m4_t') as implicit conversion would cause truncation}} + (void)(f16 - i32); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(f16 - i64); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(f16 - u8); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(f16 - u32); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(f16 - u64); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(f16 - f32); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(f16 - f64); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(f32 - b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(f32 - i8); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(f32 - i16); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(f32 - i32); // expected-error{{cannot convert between vector type 'vint32m2_t' (aka '__rvv_int32m2_t') and vector type 'vfloat32m2_t' (aka '__rvv_float32m2_t') as implicit conversion would cause truncation}} + (void)(f32 - i64); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(f32 - u8); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(f32 - u16); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(f32 - u64); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(f32 - f16); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(f32 - f64); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(f64 - b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(f64 - i8); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(f64 - i16); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(f64 - i32); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(f64 - i64); // expected-error{{cannot convert between vector type 'vint64m1_t' (aka '__rvv_int64m1_t') and vector type 'vfloat64m1_t' (aka '__rvv_float64m1_t') as implicit conversion would cause truncation}} + (void)(f64 - u8); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(f64 - u16); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(f64 - u32); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(f64 - f16); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(f64 - f32); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + + (void)(s - i8); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s - i16); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s - i32); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s - i64); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s - u16); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s - u32); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s - u64); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s - f16); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s - f32); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s - f64); // expected-error{{cannot convert between vector and non-scalar values}} +} + +void mul(vint8m8_t i8, vint16m4_t i16, vint32m2_t i32, vint64m1_t i64, + vuint8m8_t u8, vuint16m4_t u16, vuint32m2_t u32, vuint64m1_t u64, + vfloat16m4_t f16, vfloat32m2_t f32, vfloat64m1_t f64, + vbool1_t b, struct S s) { + (void)(i8 * b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i8 * i16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i8 * i32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i8 * i64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i8 * u16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i8 * u32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i8 * u64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i8 * f16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(i8 * f32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(i8 * f64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(u8 * b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u8 * i16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u8 * i32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u8 * i64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u8 * u16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u8 * u32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u8 * u64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u8 * f16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(u8 * f32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(u8 * f64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(i16 * b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i16 * i8); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i16 * i32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i16 * i64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i16 * u8); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i16 * u32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i16 * u64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i16 * f16); // expected-error{{cannot convert between vector type 'vfloat16m4_t' (aka '__rvv_float16m4_t') and vector type 'vint16m4_t' (aka '__rvv_int16m4_t') as implicit conversion would cause truncation}} + (void)(i16 * f32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(i16 * f64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(u16 * b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u16 * i8); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u16 * i32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u16 * i64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u16 * u8); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u16 * u32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u16 * u64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u16 * f16); // expected-error{{cannot convert between vector type 'vfloat16m4_t' (aka '__rvv_float16m4_t') and vector type 'vuint16m4_t' (aka '__rvv_uint16m4_t') as implicit conversion would cause truncation}} + (void)(u16 * f32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(u16 * f64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(i32 * b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i32 * i8); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i32 * i16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i32 * i64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i32 * u8); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i32 * u16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i32 * u64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i32 * f16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(i32 * f32); // expected-error{{cannot convert between vector type 'vfloat32m2_t' (aka '__rvv_float32m2_t') and vector type 'vint32m2_t' (aka '__rvv_int32m2_t') as implicit conversion would cause truncation}} + (void)(i32 * f64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(u32 * b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u32 * i8); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u32 * i16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u32 * i64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u32 * u8); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u32 * u16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u32 * u64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u32 * f16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(u32 * f32); // expected-error{{cannot convert between vector type 'vfloat32m2_t' (aka '__rvv_float32m2_t') and vector type 'vuint32m2_t' (aka '__rvv_uint32m2_t') as implicit conversion would cause truncation}} + (void)(u32 * f64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(i64 * b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i64 * i8); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i64 * i16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i64 * i32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i64 * u8); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i64 * u16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i64 * u32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i64 * f16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(i64 * f32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(i64 * f64); // expected-error{{cannot convert between vector type 'vfloat64m1_t' (aka '__rvv_float64m1_t') and vector type 'vint64m1_t' (aka '__rvv_int64m1_t') as implicit conversion would cause truncation}} + + (void)(u64 * b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u64 * i8); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u64 * i16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u64 * i32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u64 * u8); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u64 * u16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u64 * u32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u64 * f16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(u64 * f32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(u64 * f64); // expected-error{{cannot convert between vector type 'vfloat64m1_t' (aka '__rvv_float64m1_t') and vector type 'vuint64m1_t' (aka '__rvv_uint64m1_t') as implicit conversion would cause truncation}} + + (void)(f16 * b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(f16 * i8); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(f16 * i16); // expected-error{{cannot convert between vector type 'vint16m4_t' (aka '__rvv_int16m4_t') and vector type 'vfloat16m4_t' (aka '__rvv_float16m4_t') as implicit conversion would cause truncation}} + (void)(f16 * i32); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(f16 * i64); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(f16 * u8); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(f16 * u32); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(f16 * u64); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(f16 * f32); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(f16 * f64); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(f32 * b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(f32 * i8); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(f32 * i16); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(f32 * i32); // expected-error{{cannot convert between vector type 'vint32m2_t' (aka '__rvv_int32m2_t') and vector type 'vfloat32m2_t' (aka '__rvv_float32m2_t') as implicit conversion would cause truncation}} + (void)(f32 * i64); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(f32 * u8); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(f32 * u16); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(f32 * u64); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(f32 * f16); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(f32 * f64); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(f64 * b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(f64 * i8); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(f64 * i16); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(f64 * i32); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(f64 * i64); // expected-error{{cannot convert between vector type 'vint64m1_t' (aka '__rvv_int64m1_t') and vector type 'vfloat64m1_t' (aka '__rvv_float64m1_t') as implicit conversion would cause truncation}} + (void)(f64 * u8); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(f64 * u16); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(f64 * u32); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(f64 * f16); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(f64 * f32); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + + (void)(s * i8); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s * i16); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s * i32); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s * i64); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s * u16); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s * u32); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s * u64); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s * f16); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s * f32); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s * f64); // expected-error{{cannot convert between vector and non-scalar values}} +} + +void div(vint8m8_t i8, vint16m4_t i16, vint32m2_t i32, vint64m1_t i64, + vuint8m8_t u8, vuint16m4_t u16, vuint32m2_t u32, vuint64m1_t u64, + vfloat16m4_t f16, vfloat32m2_t f32, vfloat64m1_t f64, + vbool1_t b, struct S s) { + (void)(i8 / b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i8 / i16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i8 / i32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i8 / i64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i8 / u16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i8 / u32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i8 / u64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i8 / f16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(i8 / f32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(i8 / f64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(u8 / b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u8 / i16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u8 / i32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u8 / i64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u8 / u16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u8 / u32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u8 / u64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u8 / f16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(u8 / f32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(u8 / f64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(i16 / b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i16 / i8); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i16 / i32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i16 / i64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i16 / u8); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i16 / u32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i16 / u64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i16 / f16); // expected-error{{cannot convert between vector type 'vfloat16m4_t' (aka '__rvv_float16m4_t') and vector type 'vint16m4_t' (aka '__rvv_int16m4_t') as implicit conversion would cause truncation}} + (void)(i16 / f32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(i16 / f64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(u16 / b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u16 / i8); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u16 / i32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u16 / i64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u16 / u8); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u16 / u32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u16 / u64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u16 / f16); // expected-error{{cannot convert between vector type 'vfloat16m4_t' (aka '__rvv_float16m4_t') and vector type 'vuint16m4_t' (aka '__rvv_uint16m4_t') as implicit conversion would cause truncation}} + (void)(u16 / f32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(u16 / f64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(i32 / b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i32 / i8); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i32 / i16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i32 / i64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i32 / u8); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i32 / u16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i32 / u64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i32 / f16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(i32 / f32); // expected-error{{cannot convert between vector type 'vfloat32m2_t' (aka '__rvv_float32m2_t') and vector type 'vint32m2_t' (aka '__rvv_int32m2_t') as implicit conversion would cause truncation}} + (void)(i32 / f64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(u32 / b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u32 / i8); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u32 / i16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u32 / i64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u32 / u8); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u32 / u16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u32 / u64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u32 / f16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(u32 / f32); // expected-error{{cannot convert between vector type 'vfloat32m2_t' (aka '__rvv_float32m2_t') and vector type 'vuint32m2_t' (aka '__rvv_uint32m2_t') as implicit conversion would cause truncation}} + (void)(u32 / f64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(i64 / b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i64 / i8); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i64 / i16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i64 / i32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i64 / u8); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i64 / u16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i64 / u32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i64 / f16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(i64 / f32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(i64 / f64); // expected-error{{cannot convert between vector type 'vfloat64m1_t' (aka '__rvv_float64m1_t') and vector type 'vint64m1_t' (aka '__rvv_int64m1_t') as implicit conversion would cause truncation}} + + (void)(u64 / b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u64 / i8); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u64 / i16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u64 / i32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u64 / u8); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u64 / u16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u64 / u32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u64 / f16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(u64 / f32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(u64 / f64); // expected-error{{cannot convert between vector type 'vfloat64m1_t' (aka '__rvv_float64m1_t') and vector type 'vuint64m1_t' (aka '__rvv_uint64m1_t') as implicit conversion would cause truncation}} + + (void)(f16 / b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(f16 / i8); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(f16 / i16); // expected-error{{cannot convert between vector type 'vint16m4_t' (aka '__rvv_int16m4_t') and vector type 'vfloat16m4_t' (aka '__rvv_float16m4_t') as implicit conversion would cause truncation}} + (void)(f16 / i32); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(f16 / i64); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(f16 / u8); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(f16 / u32); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(f16 / u64); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(f16 / f32); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(f16 / f64); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(f32 / b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(f32 / i8); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(f32 / i16); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(f32 / i32); // expected-error{{cannot convert between vector type 'vint32m2_t' (aka '__rvv_int32m2_t') and vector type 'vfloat32m2_t' (aka '__rvv_float32m2_t') as implicit conversion would cause truncation}} + (void)(f32 / i64); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(f32 / u8); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(f32 / u16); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(f32 / u64); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(f32 / f16); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(f32 / f64); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(f64 / b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(f64 / i8); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(f64 / i16); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(f64 / i32); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(f64 / i64); // expected-error{{cannot convert between vector type 'vint64m1_t' (aka '__rvv_int64m1_t') and vector type 'vfloat64m1_t' (aka '__rvv_float64m1_t') as implicit conversion would cause truncation}} + (void)(f64 / u8); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(f64 / u16); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(f64 / u32); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(f64 / f16); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(f64 / f32); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + + (void)(s / i8); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s / i16); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s / i32); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s / i64); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s / u16); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s / u32); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s / u64); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s / f16); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s / f32); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(s / f64); // expected-error{{cannot convert between vector and non-scalar values}} +} + +void mod(vint8m8_t i8, vint16m4_t i16, vint32m2_t i32, vint64m1_t i64, + vuint8m8_t u8, vuint16m4_t u16, vuint32m2_t u32, vuint64m1_t u64, + vfloat16m4_t f16, vfloat32m2_t f32, vfloat64m1_t f64, + vbool1_t b, struct S s) { + (void)(i8 % b); // expected-error{{invalid operands to binary expression}} + (void)(i8 % i16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i8 % i32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i8 % i64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i8 % u16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i8 % u32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i8 % u64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i8 % f16); // expected-error{{invalid operands to binary expression}} + (void)(i8 % f32); // expected-error{{invalid operands to binary expression}} + (void)(i8 % f64); // expected-error{{invalid operands to binary expression}} + + (void)(u8 % b); // expected-error{{invalid operands to binary expression}} + (void)(u8 % i16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u8 % i32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u8 % i64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u8 % u16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u8 % u32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u8 % u64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u8 % f16); // expected-error{{invalid operands to binary expression}} + (void)(u8 % f32); // expected-error{{invalid operands to binary expression}} + (void)(u8 % f64); // expected-error{{invalid operands to binary expression}} + + (void)(i16 % b); // expected-error{{invalid operands to binary expression}} + (void)(i16 % i8); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i16 % i32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i16 % i64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i16 % u8); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i16 % u32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i16 % u64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i16 % f16); // expected-error{{invalid operands to binary expression}} + (void)(i16 % f32); // expected-error{{invalid operands to binary expression}} + (void)(i16 % f64); // expected-error{{invalid operands to binary expression}} + + (void)(u16 % b); // expected-error{{invalid operands to binary expression}} + (void)(u16 % i8); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u16 % i32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u16 % i64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u16 % u8); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u16 % u32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u16 % u64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u16 % f16); // expected-error{{invalid operands to binary expression}} + (void)(u16 % f32); // expected-error{{invalid operands to binary expression}} + (void)(u16 % f64); // expected-error{{invalid operands to binary expression}} + + (void)(i32 % b); // expected-error{{invalid operands to binary expression}} + (void)(i32 % i8); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i32 % i16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i32 % i64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i32 % u8); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i32 % u16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i32 % u64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i32 % f16); // expected-error{{invalid operands to binary expression}} + (void)(i32 % f32); // expected-error{{invalid operands to binary expression}} + (void)(i32 % f64); // expected-error{{invalid operands to binary expression}} + + (void)(u32 % b); // expected-error{{invalid operands to binary expression}} + (void)(u32 % i8); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u32 % i16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u32 % i64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u32 % u8); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u32 % u16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u32 % u64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u32 % f16); // expected-error{{invalid operands to binary expression}} + (void)(u32 % f32); // expected-error{{invalid operands to binary expression}} + (void)(u32 % f64); // expected-error{{invalid operands to binary expression}} + + (void)(i64 % b); // expected-error{{invalid operands to binary expression}} + (void)(i64 % i8); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i64 % i16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i64 % i32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i64 % u8); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i64 % u16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i64 % u32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i64 % f16); // expected-error{{invalid operands to binary expression}} + (void)(i64 % f32); // expected-error{{invalid operands to binary expression}} + (void)(i64 % f64); // expected-error{{invalid operands to binary expression}} + + (void)(u64 % b); // expected-error{{invalid operands to binary expression}} + (void)(u64 % i8); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u64 % i16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u64 % i32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u64 % u8); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u64 % u16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u64 % u32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u64 % f16); // expected-error{{invalid operands to binary expression}} + (void)(u64 % f32); // expected-error{{invalid operands to binary expression}} + (void)(u64 % f64); // expected-error{{invalid operands to binary expression}} + + (void)(f16 % b); // expected-error{{invalid operands to binary expression}} + (void)(f16 % i8); // expected-error{{invalid operands to binary expression}} + (void)(f16 % i16); // expected-error{{invalid operands to binary expression}} + (void)(f16 % i32); // expected-error{{invalid operands to binary expression}} + (void)(f16 % i64); // expected-error{{invalid operands to binary expression}} + (void)(f16 % u8); // expected-error{{invalid operands to binary expression}} + (void)(f16 % u32); // expected-error{{invalid operands to binary expression}} + (void)(f16 % u64); // expected-error{{invalid operands to binary expression}} + (void)(f16 % f32); // expected-error{{invalid operands to binary expression}} + (void)(f16 % f64); // expected-error{{invalid operands to binary expression}} + + (void)(f32 % b); // expected-error{{invalid operands to binary expression}} + (void)(f32 % i8); // expected-error{{invalid operands to binary expression}} + (void)(f32 % i16); // expected-error{{invalid operands to binary expression}} + (void)(f32 % i32); // expected-error{{invalid operands to binary expression}} + (void)(f32 % i64); // expected-error{{invalid operands to binary expression}} + (void)(f32 % u8); // expected-error{{invalid operands to binary expression}} + (void)(f32 % u16); // expected-error{{invalid operands to binary expression}} + (void)(f32 % u64); // expected-error{{invalid operands to binary expression}} + (void)(f32 % f16); // expected-error{{invalid operands to binary expression}} + (void)(f32 % f64); // expected-error{{invalid operands to binary expression}} + + (void)(f64 % b); // expected-error{{invalid operands to binary expression}} + (void)(f64 % i8); // expected-error{{invalid operands to binary expression}} + (void)(f64 % i16); // expected-error{{invalid operands to binary expression}} + (void)(f64 % i32); // expected-error{{invalid operands to binary expression}} + (void)(f64 % i64); // expected-error{{invalid operands to binary expression}} + (void)(f64 % u8); // expected-error{{invalid operands to binary expression}} + (void)(f64 % u16); // expected-error{{invalid operands to binary expression}} + (void)(f64 % u32); // expected-error{{invalid operands to binary expression}} + (void)(f64 % f16); // expected-error{{invalid operands to binary expression}} + (void)(f64 % f32); // expected-error{{invalid operands to binary expression}} + + (void)(s % i8); // expected-error{{invalid operands to binary expression}} + (void)(s % i16); // expected-error{{invalid operands to binary expression}} + (void)(s % i32); // expected-error{{invalid operands to binary expression}} + (void)(s % i64); // expected-error{{invalid operands to binary expression}} + (void)(s % u8); // expected-error{{invalid operands to binary expression}} + (void)(s % u16); // expected-error{{invalid operands to binary expression}} + (void)(s % u32); // expected-error{{invalid operands to binary expression}} + (void)(s % f16); // expected-error{{invalid operands to binary expression}} + (void)(s % f32); // expected-error{{invalid operands to binary expression}} +} + +vint8m8_t svi8(vint8m8_t a) { + return a + 256; // expected-error{{cannot convert between scalar type 'int' and vector type 'vint8m8_t' (aka '__rvv_int8m8_t') as implicit conversion would cause truncation}} +} + +vint8m8_t svi8_128(vint8m8_t a) { + return a + 128; // expected-warning{{implicit conversion from 'int' to 'vint8m8_t' (aka '__rvv_int8m8_t') changes value from 128 to -128}} +} diff --git a/clang/test/Sema/riscv-rvv-vector-bitwise-ops.c b/clang/test/Sema/riscv-rvv-vector-bitwise-ops.c new file mode 100644 --- /dev/null +++ b/clang/test/Sema/riscv-rvv-vector-bitwise-ops.c @@ -0,0 +1,395 @@ +// RUN: %clang_cc1 -triple riscv64 -target-feature +f -target-feature +d \ +// RUN: -target-feature +v -target-feature +zfh -target-feature +zvfh \ +// RUN: -disable-O0-optnone -o - -fsyntax-only %s -verify +// REQUIRES: riscv-registered-target + +#include + +void and (vint8m8_t i8, vint16m4_t i16, vint32m2_t i32, vint64m1_t i64, + vuint8m8_t u8, vuint16m4_t u16, vuint32m2_t u32, vuint64m1_t u64, + vfloat16m4_t f16, vfloat32m2_t f32, vfloat64m1_t f64, + vbool1_t b) { + (void)(i8 & b); // expected-error{{invalid operands to binary expression}} + (void)(i8 & i16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i8 & i32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i8 & i64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i8 & u16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i8 & u32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i8 & u64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i8 & f16); // expected-error{{invalid operands to binary expression}} + (void)(i8 & f32); // expected-error{{invalid operands to binary expression}} + (void)(i8 & f64); // expected-error{{invalid operands to binary expression}} + + (void)(u8 & b); // expected-error{{invalid operands to binary expression}} + (void)(u8 & i16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u8 & i32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u8 & i64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u8 & u16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u8 & u32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u8 & u64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u8 & f16); // expected-error{{invalid operands to binary expression}} + (void)(u8 & f32); // expected-error{{invalid operands to binary expression}} + (void)(u8 & f64); // expected-error{{invalid operands to binary expression}} + + (void)(i16 & b); // expected-error{{invalid operands to binary expression}} + (void)(i16 & i8); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i16 & i32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i16 & i64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i16 & u8); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i16 & u32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i16 & u64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i16 & f16); // expected-error{{invalid operands to binary expression}} + (void)(i16 & f32); // expected-error{{invalid operands to binary expression}} + (void)(i16 & f64); // expected-error{{invalid operands to binary expression}} + + (void)(u16 & b); // expected-error{{invalid operands to binary expression}} + (void)(u16 & i8); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u16 & i32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u16 & i64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u16 & u8); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u16 & u32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u16 & u64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u16 & f16); // expected-error{{invalid operands to binary expression}} + (void)(u16 & f32); // expected-error{{invalid operands to binary expression}} + (void)(u16 & f64); // expected-error{{invalid operands to binary expression}} + + (void)(i32 & b); // expected-error{{invalid operands to binary expression}} + (void)(i32 & i8); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i32 & i16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i32 & i64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i32 & u8); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i32 & u16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i32 & u64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i32 & f16); // expected-error{{invalid operands to binary expression}} + (void)(i32 & f32); // expected-error{{invalid operands to binary expression}} + (void)(i32 & f64); // expected-error{{invalid operands to binary expression}} + + (void)(u32 & b); // expected-error{{invalid operands to binary expression}} + (void)(u32 & i8); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u32 & i16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u32 & i64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u32 & u8); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u32 & u16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u32 & u64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u32 & f16); // expected-error{{invalid operands to binary expression}} + (void)(u32 & f32); // expected-error{{invalid operands to binary expression}} + (void)(u32 & f64); // expected-error{{invalid operands to binary expression}} + + (void)(i64 & b); // expected-error{{invalid operands to binary expression}} + (void)(i64 & i8); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i64 & i16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i64 & i32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i64 & u8); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i64 & u16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i64 & u32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i64 & f16); // expected-error{{invalid operands to binary expression}} + (void)(i64 & f32); // expected-error{{invalid operands to binary expression}} + (void)(i64 & f64); // expected-error{{invalid operands to binary expression}} + + (void)(u64 & b); // expected-error{{invalid operands to binary expression}} + (void)(u64 & i8); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u64 & i16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u64 & i32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u64 & u8); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u64 & u16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u64 & u32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u64 & f16); // expected-error{{invalid operands to binary expression}} + (void)(u64 & f32); // expected-error{{invalid operands to binary expression}} + (void)(u64 & f64); // expected-error{{invalid operands to binary expression}} + + (void)(f16 & b); // expected-error{{invalid operands to binary expression}} + (void)(f16 & i8); // expected-error{{invalid operands to binary expression}} + (void)(f16 & i16); // expected-error{{invalid operands to binary expression}} + (void)(f16 & i32); // expected-error{{invalid operands to binary expression}} + (void)(f16 & i64); // expected-error{{invalid operands to binary expression}} + (void)(f16 & u8); // expected-error{{invalid operands to binary expression}} + (void)(f16 & u32); // expected-error{{invalid operands to binary expression}} + (void)(f16 & u64); // expected-error{{invalid operands to binary expression}} + (void)(f16 & f32); // expected-error{{invalid operands to binary expression}} + (void)(f16 & f64); // expected-error{{invalid operands to binary expression}} + + (void)(f32 & b); // expected-error{{invalid operands to binary expression}} + (void)(f32 & i8); // expected-error{{invalid operands to binary expression}} + (void)(f32 & i16); // expected-error{{invalid operands to binary expression}} + (void)(f32 & i32); // expected-error{{invalid operands to binary expression}} + (void)(f32 & i64); // expected-error{{invalid operands to binary expression}} + (void)(f32 & u8); // expected-error{{invalid operands to binary expression}} + (void)(f32 & u16); // expected-error{{invalid operands to binary expression}} + (void)(f32 & u64); // expected-error{{invalid operands to binary expression}} + (void)(f32 & f16); // expected-error{{invalid operands to binary expression}} + (void)(f32 & f32); // expected-error{{invalid operands to binary expression}} + (void)(f32 & f64); // expected-error{{invalid operands to binary expression}} + + (void)(f64 & b); // expected-error{{invalid operands to binary expression}} + (void)(f64 & i8); // expected-error{{invalid operands to binary expression}} + (void)(f64 & i16); // expected-error{{invalid operands to binary expression}} + (void)(f64 & i32); // expected-error{{invalid operands to binary expression}} + (void)(f64 & i64); // expected-error{{invalid operands to binary expression}} + (void)(f64 & u8); // expected-error{{invalid operands to binary expression}} + (void)(f64 & u16); // expected-error{{invalid operands to binary expression}} + (void)(f64 & u32); // expected-error{{invalid operands to binary expression}} + (void)(f64 & f16); // expected-error{{invalid operands to binary expression}} + (void)(f64 & f32); // expected-error{{invalid operands to binary expression}} + (void)(f64 & f64); // expected-error{{invalid operands to binary expression}} +} + +void or (vint8m8_t i8, vint16m4_t i16, vint32m2_t i32, vint64m1_t i64, + vuint8m8_t u8, vuint16m4_t u16, vuint32m2_t u32, vuint64m1_t u64, + vfloat16m4_t f16, vfloat32m2_t f32, vfloat64m1_t f64, + vbool1_t b) { + (void)(i8 | b); // expected-error{{invalid operands to binary expression}} + (void)(i8 | i16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i8 | i32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i8 | i64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i8 | u16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i8 | u32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i8 | u64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i8 | f16); // expected-error{{invalid operands to binary expression}} + (void)(i8 | f32); // expected-error{{invalid operands to binary expression}} + (void)(i8 | f64); // expected-error{{invalid operands to binary expression}} + + (void)(u8 | b); // expected-error{{invalid operands to binary expression}} + (void)(u8 | i16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u8 | i32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u8 | i64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u8 | u16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u8 | u32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u8 | u64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u8 | f16); // expected-error{{invalid operands to binary expression}} + (void)(u8 | f32); // expected-error{{invalid operands to binary expression}} + (void)(u8 | f64); // expected-error{{invalid operands to binary expression}} + + (void)(i16 | b); // expected-error{{invalid operands to binary expression}} + (void)(i16 | i8); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i16 | i32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i16 | i64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i16 | u8); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i16 | u32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i16 | u64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i16 | f16); // expected-error{{invalid operands to binary expression}} + (void)(i16 | f32); // expected-error{{invalid operands to binary expression}} + (void)(i16 | f64); // expected-error{{invalid operands to binary expression}} + + (void)(u16 | b); // expected-error{{invalid operands to binary expression}} + (void)(u16 | i8); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u16 | i32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u16 | i64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u16 | u8); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u16 | u32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u16 | u64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u16 | f16); // expected-error{{invalid operands to binary expression}} + (void)(u16 | f32); // expected-error{{invalid operands to binary expression}} + (void)(u16 | f64); // expected-error{{invalid operands to binary expression}} + + (void)(i32 | b); // expected-error{{invalid operands to binary expression}} + (void)(i32 | i8); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i32 | i16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i32 | i64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i32 | u8); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i32 | u16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i32 | u64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i32 | f16); // expected-error{{invalid operands to binary expression}} + (void)(i32 | f32); // expected-error{{invalid operands to binary expression}} + (void)(i32 | f64); // expected-error{{invalid operands to binary expression}} + + (void)(u32 | b); // expected-error{{invalid operands to binary expression}} + (void)(u32 | i8); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u32 | i16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u32 | i64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u32 | u8); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u32 | u16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u32 | u64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u32 | f16); // expected-error{{invalid operands to binary expression}} + (void)(u32 | f32); // expected-error{{invalid operands to binary expression}} + (void)(u32 | f64); // expected-error{{invalid operands to binary expression}} + + (void)(i64 | b); // expected-error{{invalid operands to binary expression}} + (void)(i64 | i8); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i64 | i16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i64 | i32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i64 | u8); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i64 | u16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i64 | u32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i64 | f16); // expected-error{{invalid operands to binary expression}} + (void)(i64 | f32); // expected-error{{invalid operands to binary expression}} + (void)(i64 | f64); // expected-error{{invalid operands to binary expression}} + + (void)(u64 | b); // expected-error{{invalid operands to binary expression}} + (void)(u64 | i8); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u64 | i16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u64 | i32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u64 | u8); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u64 | u16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u64 | u32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u64 | f16); // expected-error{{invalid operands to binary expression}} + (void)(u64 | f32); // expected-error{{invalid operands to binary expression}} + (void)(u64 | f64); // expected-error{{invalid operands to binary expression}} + + (void)(f16 | b); // expected-error{{invalid operands to binary expression}} + (void)(f16 | i8); // expected-error{{invalid operands to binary expression}} + (void)(f16 | i16); // expected-error{{invalid operands to binary expression}} + (void)(f16 | i32); // expected-error{{invalid operands to binary expression}} + (void)(f16 | i64); // expected-error{{invalid operands to binary expression}} + (void)(f16 | u8); // expected-error{{invalid operands to binary expression}} + (void)(f16 | u32); // expected-error{{invalid operands to binary expression}} + (void)(f16 | u64); // expected-error{{invalid operands to binary expression}} + (void)(f16 | f16); // expected-error{{invalid operands to binary expression}} + (void)(f16 | f32); // expected-error{{invalid operands to binary expression}} + (void)(f16 | f64); // expected-error{{invalid operands to binary expression}} + + (void)(f32 | b); // expected-error{{invalid operands to binary expression}} + (void)(f32 | i8); // expected-error{{invalid operands to binary expression}} + (void)(f32 | i16); // expected-error{{invalid operands to binary expression}} + (void)(f32 | i32); // expected-error{{invalid operands to binary expression}} + (void)(f32 | i64); // expected-error{{invalid operands to binary expression}} + (void)(f32 | u8); // expected-error{{invalid operands to binary expression}} + (void)(f32 | u16); // expected-error{{invalid operands to binary expression}} + (void)(f32 | u64); // expected-error{{invalid operands to binary expression}} + (void)(f32 | f16); // expected-error{{invalid operands to binary expression}} + (void)(f32 | f32); // expected-error{{invalid operands to binary expression}} + (void)(f32 | f64); // expected-error{{invalid operands to binary expression}} + + (void)(f64 | b); // expected-error{{invalid operands to binary expression}} + (void)(f64 | i8); // expected-error{{invalid operands to binary expression}} + (void)(f64 | i16); // expected-error{{invalid operands to binary expression}} + (void)(f64 | i32); // expected-error{{invalid operands to binary expression}} + (void)(f64 | i64); // expected-error{{invalid operands to binary expression}} + (void)(f64 | u8); // expected-error{{invalid operands to binary expression}} + (void)(f64 | u16); // expected-error{{invalid operands to binary expression}} + (void)(f64 | u32); // expected-error{{invalid operands to binary expression}} + (void)(f64 | f16); // expected-error{{invalid operands to binary expression}} + (void)(f64 | f32); // expected-error{{invalid operands to binary expression}} + (void)(f64 | f64); // expected-error{{invalid operands to binary expression}} +} + +void xor (vint8m8_t i8, vint16m4_t i16, vint32m2_t i32, vint64m1_t i64, vuint8m8_t u8, vuint16m4_t u16, vuint32m2_t u32, vuint64m1_t u64, vfloat16m4_t f16, vfloat32m2_t f32, vfloat64m1_t f64, vbool1_t b) { + (void)(i8 ^ b); // expected-error{{invalid operands to binary expression}} + (void)(i8 ^ i16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i8 ^ i32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i8 ^ i64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i8 ^ u16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i8 ^ u32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i8 ^ u64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i8 ^ f16); // expected-error{{invalid operands to binary expression}} + (void)(i8 ^ f32); // expected-error{{invalid operands to binary expression}} + (void)(i8 ^ f64); // expected-error{{invalid operands to binary expression}} + + (void)(u8 ^ b); // expected-error{{invalid operands to binary expression}} + (void)(u8 ^ i16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u8 ^ i32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u8 ^ i64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u8 ^ u16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u8 ^ u32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u8 ^ u64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u8 ^ f16); // expected-error{{invalid operands to binary expression}} + (void)(u8 ^ f32); // expected-error{{invalid operands to binary expression}} + (void)(u8 ^ f64); // expected-error{{invalid operands to binary expression}} + + (void)(i16 ^ b); // expected-error{{invalid operands to binary expression}} + (void)(i16 ^ i8); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i16 ^ i32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i16 ^ i64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i16 ^ u8); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i16 ^ u32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i16 ^ u64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i16 ^ f16); // expected-error{{invalid operands to binary expression}} + (void)(i16 ^ f32); // expected-error{{invalid operands to binary expression}} + (void)(i16 ^ f64); // expected-error{{invalid operands to binary expression}} + + (void)(u16 ^ b); // expected-error{{invalid operands to binary expression}} + (void)(u16 ^ i8); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u16 ^ i32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u16 ^ i64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u16 ^ u8); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u16 ^ u32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u16 ^ u64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u16 ^ f16); // expected-error{{invalid operands to binary expression}} + (void)(u16 ^ f32); // expected-error{{invalid operands to binary expression}} + (void)(u16 ^ f64); // expected-error{{invalid operands to binary expression}} + + (void)(i32 ^ b); // expected-error{{invalid operands to binary expression}} + (void)(i32 ^ i8); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i32 ^ i16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i32 ^ i64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i32 ^ u8); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i32 ^ u16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i32 ^ u64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i32 ^ f16); // expected-error{{invalid operands to binary expression}} + (void)(i32 ^ f32); // expected-error{{invalid operands to binary expression}} + (void)(i32 ^ f64); // expected-error{{invalid operands to binary expression}} + + (void)(u32 ^ b); // expected-error{{invalid operands to binary expression}} + (void)(u32 ^ i8); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u32 ^ i16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u32 ^ i64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u32 ^ u8); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u32 ^ u16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u32 ^ u64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u32 ^ f16); // expected-error{{invalid operands to binary expression}} + (void)(u32 ^ f32); // expected-error{{invalid operands to binary expression}} + (void)(u32 ^ f64); // expected-error{{invalid operands to binary expression}} + + (void)(i64 ^ b); // expected-error{{invalid operands to binary expression}} + (void)(i64 ^ i8); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i64 ^ i16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i64 ^ i32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i64 ^ u8); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i64 ^ u16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i64 ^ u32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i64 ^ f16); // expected-error{{invalid operands to binary expression}} + (void)(i64 ^ f32); // expected-error{{invalid operands to binary expression}} + (void)(i64 ^ f64); // expected-error{{invalid operands to binary expression}} + + (void)(u64 ^ b); // expected-error{{invalid operands to binary expression}} + (void)(u64 ^ i8); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u64 ^ i16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u64 ^ i32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u64 ^ u8); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u64 ^ u16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u64 ^ u32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u64 ^ f16); // expected-error{{invalid operands to binary expression}} + (void)(u64 ^ f32); // expected-error{{invalid operands to binary expression}} + (void)(u64 ^ f64); // expected-error{{invalid operands to binary expression}} + + (void)(f16 ^ b); // expected-error{{invalid operands to binary expression}} + (void)(f16 ^ i8); // expected-error{{invalid operands to binary expression}} + (void)(f16 ^ i16); // expected-error{{invalid operands to binary expression}} + (void)(f16 ^ i32); // expected-error{{invalid operands to binary expression}} + (void)(f16 ^ i64); // expected-error{{invalid operands to binary expression}} + (void)(f16 ^ u8); // expected-error{{invalid operands to binary expression}} + (void)(f16 ^ u32); // expected-error{{invalid operands to binary expression}} + (void)(f16 ^ u64); // expected-error{{invalid operands to binary expression}} + (void)(f16 ^ f16); // expected-error{{invalid operands to binary expression}} + (void)(f16 ^ f32); // expected-error{{invalid operands to binary expression}} + (void)(f16 ^ f64); // expected-error{{invalid operands to binary expression}} + + (void)(f32 ^ b); // expected-error{{invalid operands to binary expression}} + (void)(f32 ^ i8); // expected-error{{invalid operands to binary expression}} + (void)(f32 ^ i16); // expected-error{{invalid operands to binary expression}} + (void)(f32 ^ i32); // expected-error{{invalid operands to binary expression}} + (void)(f32 ^ i64); // expected-error{{invalid operands to binary expression}} + (void)(f32 ^ u8); // expected-error{{invalid operands to binary expression}} + (void)(f32 ^ u16); // expected-error{{invalid operands to binary expression}} + (void)(f32 ^ u64); // expected-error{{invalid operands to binary expression}} + (void)(f32 ^ f16); // expected-error{{invalid operands to binary expression}} + (void)(f32 ^ f32); // expected-error{{invalid operands to binary expression}} + (void)(f32 ^ f64); // expected-error{{invalid operands to binary expression}} + + (void)(f64 ^ b); // expected-error{{invalid operands to binary expression}} + (void)(f64 ^ i8); // expected-error{{invalid operands to binary expression}} + (void)(f64 ^ i16); // expected-error{{invalid operands to binary expression}} + (void)(f64 ^ i32); // expected-error{{invalid operands to binary expression}} + (void)(f64 ^ i64); // expected-error{{invalid operands to binary expression}} + (void)(f64 ^ u8); // expected-error{{invalid operands to binary expression}} + (void)(f64 ^ u16); // expected-error{{invalid operands to binary expression}} + (void)(f64 ^ u32); // expected-error{{invalid operands to binary expression}} + (void)(f64 ^ f16); // expected-error{{invalid operands to binary expression}} + (void)(f64 ^ f32); // expected-error{{invalid operands to binary expression}} + (void)(f64 ^ f64); // expected-error{{invalid operands to binary expression}} +} + + void not(vfloat16m4_t f16, vfloat32m2_t f32, vfloat32m2_t f64) { + (void)(~f16); // expected-error{{invalid argument type}} + (void)(~f32); // expected-error{{invalid argument type}} + (void)(~f64); // expected-error{{invalid argument type}} +} diff --git a/clang/test/Sema/riscv-rvv-vector-compare-ops.c b/clang/test/Sema/riscv-rvv-vector-compare-ops.c new file mode 100644 --- /dev/null +++ b/clang/test/Sema/riscv-rvv-vector-compare-ops.c @@ -0,0 +1,762 @@ +// RUN: %clang_cc1 -triple riscv64 -target-feature +f -target-feature +d \ +// RUN: -target-feature +v -target-feature +zfh -target-feature +zvfh \ +// RUN: -disable-O0-optnone -o - -fsyntax-only %s -verify +// REQUIRES: riscv-registered-target + +#include + +void eq(vint8m8_t i8, vint16m4_t i16, vint32m2_t i32, vint64m1_t i64, + vuint8m8_t u8, vuint16m4_t u16, vuint32m2_t u32, vuint64m1_t u64, + vfloat16m4_t f16, vfloat32m2_t f32, vfloat64m1_t f64, + vbool1_t b) { + (void)(i8 == b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i8 == i16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i8 == i32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i8 == i64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i8 == u16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i8 == u32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i8 == u64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i8 == f16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(i8 == f32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(i8 == f64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(u8 == b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u8 == i16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u8 == i32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u8 == i64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u8 == u16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u8 == u32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u8 == u64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u8 == f16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(u8 == f32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(u8 == f64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(i16 == b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i16 == i8); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i16 == i32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i16 == i64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i16 == u8); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i16 == u32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i16 == u64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i16 == f16); // expected-error{{cannot convert between vector type 'vfloat16m4_t' (aka '__rvv_float16m4_t') and vector type 'vint16m4_t' (aka '__rvv_int16m4_t') as implicit conversion would cause truncation}} + (void)(i16 == f32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(i16 == f64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(u16 == b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u16 == i8); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u16 == i32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u16 == i64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u16 == u8); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u16 == u32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u16 == u64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u16 == f16); // expected-error{{cannot convert between vector type 'vfloat16m4_t' (aka '__rvv_float16m4_t') and vector type 'vuint16m4_t' (aka '__rvv_uint16m4_t') as implicit conversion would cause truncation}} + (void)(u16 == f32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(u16 == f64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(i32 == b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i32 == i8); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i32 == i16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i32 == i64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i32 == u8); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i32 == u16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i32 == u64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i32 == f16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(i32 == f32); // expected-error{{cannot convert between vector type 'vfloat32m2_t' (aka '__rvv_float32m2_t') and vector type 'vint32m2_t' (aka '__rvv_int32m2_t') as implicit conversion would cause truncation}} + (void)(i32 == f64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(u32 == b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u32 == i8); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u32 == i16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u32 == i64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u32 == u8); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u32 == u16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u32 == u64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u32 == f16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(u32 == f32); // expected-error{{cannot convert between vector type 'vfloat32m2_t' (aka '__rvv_float32m2_t') and vector type 'vuint32m2_t' (aka '__rvv_uint32m2_t') as implicit conversion would cause truncation}} + (void)(u32 == f64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(i64 == b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i64 == i8); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i64 == i16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i64 == i32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i64 == u8); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i64 == u16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i64 == u32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i64 == f16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(i64 == f32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(i64 == f64); // expected-error{{cannot convert between vector type 'vfloat64m1_t' (aka '__rvv_float64m1_t') and vector type 'vint64m1_t' (aka '__rvv_int64m1_t') as implicit conversion would cause truncation}} + + (void)(u64 == b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u64 == i8); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u64 == i16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u64 == i32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u64 == u8); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u64 == u16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u64 == u32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u64 == f16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(u64 == f32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(u64 == f64); // expected-error{{cannot convert between vector type 'vfloat64m1_t' (aka '__rvv_float64m1_t') and vector type 'vuint64m1_t' (aka '__rvv_uint64m1_t') as implicit conversion would cause truncation}} + + (void)(f16 == b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(f16 == i8); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(f16 == i16); // expected-error{{cannot convert between vector type 'vint16m4_t' (aka '__rvv_int16m4_t') and vector type 'vfloat16m4_t' (aka '__rvv_float16m4_t') as implicit conversion would cause truncation}} + (void)(f16 == i32); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(f16 == i64); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(f16 == u8); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(f16 == u32); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(f16 == u64); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(f16 == f32); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(f16 == f64); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(f32 == b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(f32 == i8); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(f32 == i16); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(f32 == i32); // expected-error{{cannot convert between vector type 'vint32m2_t' (aka '__rvv_int32m2_t') and vector type 'vfloat32m2_t' (aka '__rvv_float32m2_t') as implicit conversion would cause truncation}} + (void)(f32 == i64); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(f32 == u8); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(f32 == u16); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(f32 == u64); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(f32 == f16); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(f32 == f64); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(f64 == b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(f64 == i8); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(f64 == i16); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(f64 == i32); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(f64 == i64); // expected-error{{cannot convert between vector type 'vint64m1_t' (aka '__rvv_int64m1_t') and vector type 'vfloat64m1_t' (aka '__rvv_float64m1_t') as implicit conversion would cause truncation}} + (void)(f64 == u8); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(f64 == u16); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(f64 == u32); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(f64 == f16); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(f64 == f32); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} +} + +void neq(vint8m8_t i8, vint16m4_t i16, vint32m2_t i32, vint64m1_t i64, + vuint8m8_t u8, vuint16m4_t u16, vuint32m2_t u32, vuint64m1_t u64, + vfloat16m4_t f16, vfloat32m2_t f32, vfloat64m1_t f64, + vbool1_t b) { + (void)(i8 != b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i8 != i16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i8 != i32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i8 != i64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i8 != u16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i8 != u32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i8 != u64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i8 != f16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(i8 != f32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(i8 != f64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(u8 != b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u8 != i16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u8 != i32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u8 != i64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u8 != u16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u8 != u32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u8 != u64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u8 != f16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(u8 != f32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(u8 != f64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(i16 != b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i16 != i8); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i16 != i32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i16 != i64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i16 != u8); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i16 != u32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i16 != u64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i16 != f16); // expected-error{{cannot convert between vector type 'vfloat16m4_t' (aka '__rvv_float16m4_t') and vector type 'vint16m4_t' (aka '__rvv_int16m4_t') as implicit conversion would cause truncation}} + (void)(i16 != f32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(i16 != f64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(u16 != b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u16 != i8); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u16 != i32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u16 != i64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u16 != u8); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u16 != u32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u16 != u64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u16 != f16); // expected-error{{cannot convert between vector type 'vfloat16m4_t' (aka '__rvv_float16m4_t') and vector type 'vuint16m4_t' (aka '__rvv_uint16m4_t') as implicit conversion would cause truncation}} + (void)(u16 != f32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(u16 != f64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(i32 != b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i32 != i8); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i32 != i16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i32 != i64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i32 != u8); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i32 != u16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i32 != u64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i32 != f16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(i32 != f32); // expected-error{{cannot convert between vector type 'vfloat32m2_t' (aka '__rvv_float32m2_t') and vector type 'vint32m2_t' (aka '__rvv_int32m2_t') as implicit conversion would cause truncation}} + (void)(i32 != f64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(u32 != b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u32 != i8); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u32 != i16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u32 != i64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u32 != u8); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u32 != u16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u32 != u64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u32 != f16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(u32 != f32); // expected-error{{cannot convert between vector type 'vfloat32m2_t' (aka '__rvv_float32m2_t') and vector type 'vuint32m2_t' (aka '__rvv_uint32m2_t') as implicit conversion would cause truncation}} + (void)(u32 != f64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(i64 != b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i64 != i8); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i64 != i16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i64 != i32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i64 != u8); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i64 != u16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i64 != u32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i64 != f16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(i64 != f32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(i64 != f64); // expected-error{{cannot convert between vector type 'vfloat64m1_t' (aka '__rvv_float64m1_t') and vector type 'vint64m1_t' (aka '__rvv_int64m1_t') as implicit conversion would cause truncation}} + + (void)(u64 != b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u64 != i8); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u64 != i16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u64 != i32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u64 != u8); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u64 != u16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u64 != u32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u64 != f16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(u64 != f32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(u64 != f64); // expected-error{{cannot convert between vector type 'vfloat64m1_t' (aka '__rvv_float64m1_t') and vector type 'vuint64m1_t' (aka '__rvv_uint64m1_t') as implicit conversion would cause truncation}} + + (void)(f16 != b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(f16 != i8); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(f16 != i16); // expected-error{{cannot convert between vector type 'vint16m4_t' (aka '__rvv_int16m4_t') and vector type 'vfloat16m4_t' (aka '__rvv_float16m4_t') as implicit conversion would cause truncation}} + (void)(f16 != i32); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(f16 != i64); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(f16 != u8); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(f16 != u32); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(f16 != u64); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(f16 != f32); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(f16 != f64); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(f32 != b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(f32 != i8); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(f32 != i16); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(f32 != i32); // expected-error{{cannot convert between vector type 'vint32m2_t' (aka '__rvv_int32m2_t') and vector type 'vfloat32m2_t' (aka '__rvv_float32m2_t') as implicit conversion would cause truncation}} + (void)(f32 != i64); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(f32 != u8); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(f32 != u16); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(f32 != u64); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(f32 != f16); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(f32 != f64); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(f64 != b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(f64 != i8); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(f64 != i16); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(f64 != i32); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(f64 != i64); // expected-error{{cannot convert between vector type 'vint64m1_t' (aka '__rvv_int64m1_t') and vector type 'vfloat64m1_t' (aka '__rvv_float64m1_t') as implicit conversion would cause truncation}} + (void)(f64 != u8); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(f64 != u16); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(f64 != u32); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(f64 != f16); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(f64 != f32); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} +} + +void lt(vint8m8_t i8, vint16m4_t i16, vint32m2_t i32, vint64m1_t i64, + vuint8m8_t u8, vuint16m4_t u16, vuint32m2_t u32, vuint64m1_t u64, + vfloat16m4_t f16, vfloat32m2_t f32, vfloat64m1_t f64, + vbool1_t b) { + (void)(i8 < b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i8 < i16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i8 < i32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i8 < i64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i8 < u16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i8 < u32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i8 < u64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i8 < f16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(i8 < f32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(i8 < f64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(u8 < b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u8 < i16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u8 < i32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u8 < i64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u8 < u16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u8 < u32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u8 < u64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u8 < f16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(u8 < f32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(u8 < f64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(i16 < b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i16 < i8); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i16 < i32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i16 < i64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i16 < u8); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i16 < u32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i16 < u64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i16 < f16); // expected-error{{cannot convert between vector type 'vfloat16m4_t' (aka '__rvv_float16m4_t') and vector type 'vint16m4_t' (aka '__rvv_int16m4_t') as implicit conversion would cause truncation}} + (void)(i16 < f32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(i16 < f64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(u16 < b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u16 < i8); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u16 < i32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u16 < i64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u16 < u8); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u16 < u32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u16 < u64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u16 < f16); // expected-error{{cannot convert between vector type 'vfloat16m4_t' (aka '__rvv_float16m4_t') and vector type 'vuint16m4_t' (aka '__rvv_uint16m4_t') as implicit conversion would cause truncation}} + (void)(u16 < f32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(u16 < f64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(i32 < b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i32 < i8); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i32 < i16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i32 < i64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i32 < u8); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i32 < u16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i32 < u64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i32 < f16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(i32 < f32); // expected-error{{cannot convert between vector type 'vfloat32m2_t' (aka '__rvv_float32m2_t') and vector type 'vint32m2_t' (aka '__rvv_int32m2_t') as implicit conversion would cause truncation}} + (void)(i32 < f64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(u32 < b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u32 < i8); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u32 < i16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u32 < i64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u32 < u8); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u32 < u16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u32 < u64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u32 < f16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(u32 < f32); // expected-error{{cannot convert between vector type 'vfloat32m2_t' (aka '__rvv_float32m2_t') and vector type 'vuint32m2_t' (aka '__rvv_uint32m2_t') as implicit conversion would cause truncation}} + (void)(u32 < f64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(i64 < b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i64 < i8); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i64 < i16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i64 < i32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i64 < u8); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i64 < u16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i64 < u32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i64 < f16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(i64 < f32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(i64 < f64); // expected-error{{cannot convert between vector type 'vfloat64m1_t' (aka '__rvv_float64m1_t') and vector type 'vint64m1_t' (aka '__rvv_int64m1_t') as implicit conversion would cause truncation}} + + (void)(u64 < b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u64 < i8); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u64 < i16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u64 < i32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u64 < u8); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u64 < u16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u64 < u32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u64 < f16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(u64 < f32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(u64 < f64); // expected-error{{cannot convert between vector type 'vfloat64m1_t' (aka '__rvv_float64m1_t') and vector type 'vuint64m1_t' (aka '__rvv_uint64m1_t') as implicit conversion would cause truncation}} + + (void)(f16 < b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(f16 < i8); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(f16 < i16); // expected-error{{cannot convert between vector type 'vint16m4_t' (aka '__rvv_int16m4_t') and vector type 'vfloat16m4_t' (aka '__rvv_float16m4_t') as implicit conversion would cause truncation}} + (void)(f16 < i32); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(f16 < i64); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(f16 < u8); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(f16 < u32); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(f16 < u64); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(f16 < f32); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(f16 < f64); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(f32 < b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(f32 < i8); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(f32 < i16); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(f32 < i32); // expected-error{{cannot convert between vector type 'vint32m2_t' (aka '__rvv_int32m2_t') and vector type 'vfloat32m2_t' (aka '__rvv_float32m2_t') as implicit conversion would cause truncation}} + (void)(f32 < i64); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(f32 < u8); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(f32 < u16); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(f32 < u64); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(f32 < f16); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(f32 < f64); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(f64 < b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(f64 < i8); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(f64 < i16); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(f64 < i32); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(f64 < i64); // expected-error{{cannot convert between vector type 'vint64m1_t' (aka '__rvv_int64m1_t') and vector type 'vfloat64m1_t' (aka '__rvv_float64m1_t') as implicit conversion would cause truncation}} + (void)(f64 < u8); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(f64 < u16); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(f64 < u32); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(f64 < f16); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(f64 < f32); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} +} + +void leq(vint8m8_t i8, vint16m4_t i16, vint32m2_t i32, vint64m1_t i64, + vuint8m8_t u8, vuint16m4_t u16, vuint32m2_t u32, vuint64m1_t u64, + vfloat16m4_t f16, vfloat32m2_t f32, vfloat64m1_t f64, + vbool1_t b) { + (void)(i8 <= b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i8 <= i16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i8 <= i32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i8 <= i64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i8 <= u16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i8 <= u32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i8 <= u64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i8 <= f16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(i8 <= f32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(i8 <= f64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(u8 <= b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u8 <= i16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u8 <= i32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u8 <= i64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u8 <= u16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u8 <= u32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u8 <= u64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u8 <= f16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(u8 <= f32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(u8 <= f64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(i16 <= b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i16 <= i8); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i16 <= i32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i16 <= i64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i16 <= u8); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i16 <= u32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i16 <= u64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i16 <= f16); // expected-error{{cannot convert between vector type 'vfloat16m4_t' (aka '__rvv_float16m4_t') and vector type 'vint16m4_t' (aka '__rvv_int16m4_t') as implicit conversion would cause truncation}} + (void)(i16 <= f32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(i16 <= f64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(u16 <= b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u16 <= i8); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u16 <= i32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u16 <= i64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u16 <= u8); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u16 <= u32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u16 <= u64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u16 <= f16); // expected-error{{cannot convert between vector type 'vfloat16m4_t' (aka '__rvv_float16m4_t') and vector type 'vuint16m4_t' (aka '__rvv_uint16m4_t') as implicit conversion would cause truncation}} + (void)(u16 <= f32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(u16 <= f64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(i32 <= b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i32 <= i8); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i32 <= i16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i32 <= i64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i32 <= u8); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i32 <= u16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i32 <= u64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i32 <= f16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(i32 <= f32); // expected-error{{cannot convert between vector type 'vfloat32m2_t' (aka '__rvv_float32m2_t') and vector type 'vint32m2_t' (aka '__rvv_int32m2_t') as implicit conversion would cause truncation}} + (void)(i32 <= f64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(u32 <= b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u32 <= i8); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u32 <= i16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u32 <= i64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u32 <= u8); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u32 <= u16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u32 <= u64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u32 <= f16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(u32 <= f32); // expected-error{{cannot convert between vector type 'vfloat32m2_t' (aka '__rvv_float32m2_t') and vector type 'vuint32m2_t' (aka '__rvv_uint32m2_t') as implicit conversion would cause truncation}} + (void)(u32 <= f64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(i64 <= b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i64 <= i8); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i64 <= i16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i64 <= i32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i64 <= u8); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i64 <= u16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i64 <= u32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i64 <= f16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(i64 <= f32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(i64 <= f64); // expected-error{{cannot convert between vector type 'vfloat64m1_t' (aka '__rvv_float64m1_t') and vector type 'vint64m1_t' (aka '__rvv_int64m1_t') as implicit conversion would cause truncation}} + + (void)(u64 <= b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u64 <= i8); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u64 <= i16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u64 <= i32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u64 <= u8); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u64 <= u16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u64 <= u32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u64 <= f16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(u64 <= f32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(u64 <= f64); // expected-error{{cannot convert between vector type 'vfloat64m1_t' (aka '__rvv_float64m1_t') and vector type 'vuint64m1_t' (aka '__rvv_uint64m1_t') as implicit conversion would cause truncation}} + + (void)(f16 <= b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(f16 <= i8); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(f16 <= i16); // expected-error{{cannot convert between vector type 'vint16m4_t' (aka '__rvv_int16m4_t') and vector type 'vfloat16m4_t' (aka '__rvv_float16m4_t') as implicit conversion would cause truncation}} + (void)(f16 <= i32); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(f16 <= i64); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(f16 <= u8); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(f16 <= u32); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(f16 <= u64); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(f16 <= f32); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(f16 <= f64); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(f32 <= b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(f32 <= i8); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(f32 <= i16); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(f32 <= i32); // expected-error{{cannot convert between vector type 'vint32m2_t' (aka '__rvv_int32m2_t') and vector type 'vfloat32m2_t' (aka '__rvv_float32m2_t') as implicit conversion would cause truncation}} + (void)(f32 <= i64); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(f32 <= u8); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(f32 <= u16); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(f32 <= u64); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(f32 <= f16); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(f32 <= f64); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(f64 <= b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(f64 <= i8); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(f64 <= i16); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(f64 <= i32); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(f64 <= i64); // expected-error{{cannot convert between vector type 'vint64m1_t' (aka '__rvv_int64m1_t') and vector type 'vfloat64m1_t' (aka '__rvv_float64m1_t') as implicit conversion would cause truncation}} + (void)(f64 <= u8); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(f64 <= u16); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(f64 <= u32); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(f64 <= f16); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(f64 <= f32); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} +} + +void gt(vint8m8_t i8, vint16m4_t i16, vint32m2_t i32, vint64m1_t i64, + vuint8m8_t u8, vuint16m4_t u16, vuint32m2_t u32, vuint64m1_t u64, + vfloat16m4_t f16, vfloat32m2_t f32, vfloat64m1_t f64, + vbool1_t b) { + (void)(i8 > b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i8 > i16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i8 > i32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i8 > i64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i8 > u16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i8 > u32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i8 > u64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i8 > f16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(i8 > f32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(i8 > f64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(u8 > b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u8 > i16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u8 > i32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u8 > i64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u8 > u16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u8 > u32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u8 > u64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u8 > f16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(u8 > f32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(u8 > f64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(i16 > b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i16 > i8); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i16 > i32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i16 > i64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i16 > u8); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i16 > u32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i16 > u64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i16 > f16); // expected-error{{cannot convert between vector type 'vfloat16m4_t' (aka '__rvv_float16m4_t') and vector type 'vint16m4_t' (aka '__rvv_int16m4_t') as implicit conversion would cause truncation}} + (void)(i16 > f32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(i16 > f64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(u16 > b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u16 > i8); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u16 > i32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u16 > i64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u16 > u8); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u16 > u32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u16 > u64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u16 > f16); // expected-error{{cannot convert between vector type 'vfloat16m4_t' (aka '__rvv_float16m4_t') and vector type 'vuint16m4_t' (aka '__rvv_uint16m4_t') as implicit conversion would cause truncation}} + (void)(u16 > f32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(u16 > f64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(i32 > b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i32 > i8); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i32 > i16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i32 > i64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i32 > u8); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i32 > u16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i32 > u64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i32 > f16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(i32 > f32); // expected-error{{cannot convert between vector type 'vfloat32m2_t' (aka '__rvv_float32m2_t') and vector type 'vint32m2_t' (aka '__rvv_int32m2_t') as implicit conversion would cause truncation}} + (void)(i32 > f64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(u32 > b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u32 > i8); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u32 > i16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u32 > i64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u32 > u8); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u32 > u16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u32 > u64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u32 > f16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(u32 > f32); // expected-error{{cannot convert between vector type 'vfloat32m2_t' (aka '__rvv_float32m2_t') and vector type 'vuint32m2_t' (aka '__rvv_uint32m2_t') as implicit conversion would cause truncation}} + (void)(u32 > f64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(i64 > b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i64 > i8); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i64 > i16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i64 > i32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i64 > u8); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i64 > u16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i64 > u32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i64 > f16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(i64 > f32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(i64 > f64); // expected-error{{cannot convert between vector type 'vfloat64m1_t' (aka '__rvv_float64m1_t') and vector type 'vint64m1_t' (aka '__rvv_int64m1_t') as implicit conversion would cause truncation}} + + (void)(u64 > b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u64 > i8); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u64 > i16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u64 > i32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u64 > u8); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u64 > u16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u64 > u32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u64 > f16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(u64 > f32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(u64 > f64); // expected-error{{cannot convert between vector type 'vfloat64m1_t' (aka '__rvv_float64m1_t') and vector type 'vuint64m1_t' (aka '__rvv_uint64m1_t') as implicit conversion would cause truncation}} + + (void)(f16 > b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(f16 > i8); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(f16 > i16); // expected-error{{cannot convert between vector type 'vint16m4_t' (aka '__rvv_int16m4_t') and vector type 'vfloat16m4_t' (aka '__rvv_float16m4_t') as implicit conversion would cause truncation}} + (void)(f16 > i32); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(f16 > i64); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(f16 > u8); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(f16 > u32); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(f16 > u64); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(f16 > f32); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(f16 > f64); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(f32 > b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(f32 > i8); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(f32 > i16); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(f32 > i32); // expected-error{{cannot convert between vector type 'vint32m2_t' (aka '__rvv_int32m2_t') and vector type 'vfloat32m2_t' (aka '__rvv_float32m2_t') as implicit conversion would cause truncation}} + (void)(f32 > i64); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(f32 > u8); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(f32 > u16); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(f32 > u64); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(f32 > f16); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(f32 > f64); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(f64 > b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(f64 > i8); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(f64 > i16); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(f64 > i32); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(f64 > i64); // expected-error{{cannot convert between vector type 'vint64m1_t' (aka '__rvv_int64m1_t') and vector type 'vfloat64m1_t' (aka '__rvv_float64m1_t') as implicit conversion would cause truncation}} + (void)(f64 > u8); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(f64 > u16); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(f64 > u32); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(f64 > f16); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(f64 > f32); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} +} + +void geq(vint8m8_t i8, vint16m4_t i16, vint32m2_t i32, vint64m1_t i64, + vuint8m8_t u8, vuint16m4_t u16, vuint32m2_t u32, vuint64m1_t u64, + vfloat16m4_t f16, vfloat32m2_t f32, vfloat64m1_t f64, + vbool1_t b) { + (void)(i8 >= b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i8 >= i16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i8 >= i32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i8 >= i64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i8 >= u16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i8 >= u32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i8 >= u64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i8 >= f16); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(i8 >= f32); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(i8 >= f64); // expected-error{{vector operands do not have the same number of elements ('vint8m8_t' (aka '__rvv_int8m8_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(u8 >= b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u8 >= i16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u8 >= i32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u8 >= i64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u8 >= u16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u8 >= u32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u8 >= u64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u8 >= f16); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(u8 >= f32); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(u8 >= f64); // expected-error{{vector operands do not have the same number of elements ('vuint8m8_t' (aka '__rvv_uint8m8_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(i16 >= b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i16 >= i8); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i16 >= i32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i16 >= i64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i16 >= u8); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i16 >= u32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i16 >= u64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i16 >= f16); // expected-error{{cannot convert between vector type 'vfloat16m4_t' (aka '__rvv_float16m4_t') and vector type 'vint16m4_t' (aka '__rvv_int16m4_t') as implicit conversion would cause truncation}} + (void)(i16 >= f32); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(i16 >= f64); // expected-error{{vector operands do not have the same number of elements ('vint16m4_t' (aka '__rvv_int16m4_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(u16 >= b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u16 >= i8); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u16 >= i32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u16 >= i64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u16 >= u8); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u16 >= u32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u16 >= u64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u16 >= f16); // expected-error{{cannot convert between vector type 'vfloat16m4_t' (aka '__rvv_float16m4_t') and vector type 'vuint16m4_t' (aka '__rvv_uint16m4_t') as implicit conversion would cause truncation}} + (void)(u16 >= f32); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(u16 >= f64); // expected-error{{vector operands do not have the same number of elements ('vuint16m4_t' (aka '__rvv_uint16m4_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(i32 >= b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i32 >= i8); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i32 >= i16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i32 >= i64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(i32 >= u8); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i32 >= u16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i32 >= u64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(i32 >= f16); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(i32 >= f32); // expected-error{{cannot convert between vector type 'vfloat32m2_t' (aka '__rvv_float32m2_t') and vector type 'vint32m2_t' (aka '__rvv_int32m2_t') as implicit conversion would cause truncation}} + (void)(i32 >= f64); // expected-error{{vector operands do not have the same number of elements ('vint32m2_t' (aka '__rvv_int32m2_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(u32 >= b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u32 >= i8); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u32 >= i16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u32 >= i64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(u32 >= u8); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u32 >= u16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u32 >= u64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(u32 >= f16); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(u32 >= f32); // expected-error{{cannot convert between vector type 'vfloat32m2_t' (aka '__rvv_float32m2_t') and vector type 'vuint32m2_t' (aka '__rvv_uint32m2_t') as implicit conversion would cause truncation}} + (void)(u32 >= f64); // expected-error{{vector operands do not have the same number of elements ('vuint32m2_t' (aka '__rvv_uint32m2_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(i64 >= b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(i64 >= i8); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(i64 >= i16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(i64 >= i32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(i64 >= u8); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(i64 >= u16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(i64 >= u32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(i64 >= f16); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(i64 >= f32); // expected-error{{vector operands do not have the same number of elements ('vint64m1_t' (aka '__rvv_int64m1_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(i64 >= f64); // expected-error{{cannot convert between vector type 'vfloat64m1_t' (aka '__rvv_float64m1_t') and vector type 'vint64m1_t' (aka '__rvv_int64m1_t') as implicit conversion would cause truncation}} + + (void)(u64 >= b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(u64 >= i8); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(u64 >= i16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(u64 >= i32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(u64 >= u8); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(u64 >= u16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(u64 >= u32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(u64 >= f16); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(u64 >= f32); // expected-error{{vector operands do not have the same number of elements ('vuint64m1_t' (aka '__rvv_uint64m1_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(u64 >= f64); // expected-error{{cannot convert between vector type 'vfloat64m1_t' (aka '__rvv_float64m1_t') and vector type 'vuint64m1_t' (aka '__rvv_uint64m1_t') as implicit conversion would cause truncation}} + + (void)(f16 >= b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(f16 >= i8); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(f16 >= i16); // expected-error{{cannot convert between vector type 'vint16m4_t' (aka '__rvv_int16m4_t') and vector type 'vfloat16m4_t' (aka '__rvv_float16m4_t') as implicit conversion would cause truncation}} + (void)(f16 >= i32); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(f16 >= i64); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(f16 >= u8); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(f16 >= u32); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(f16 >= u64); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(f16 >= f32); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} + (void)(f16 >= f64); // expected-error{{vector operands do not have the same number of elements ('vfloat16m4_t' (aka '__rvv_float16m4_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(f32 >= b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(f32 >= i8); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(f32 >= i16); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(f32 >= i32); // expected-error{{cannot convert between vector type 'vint32m2_t' (aka '__rvv_int32m2_t') and vector type 'vfloat32m2_t' (aka '__rvv_float32m2_t') as implicit conversion would cause truncation}} + (void)(f32 >= i64); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vint64m1_t' (aka '__rvv_int64m1_t'))}} + (void)(f32 >= u8); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(f32 >= u16); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(f32 >= u64); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vuint64m1_t' (aka '__rvv_uint64m1_t'))}} + (void)(f32 >= f16); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(f32 >= f64); // expected-error{{vector operands do not have the same number of elements ('vfloat32m2_t' (aka '__rvv_float32m2_t') and 'vfloat64m1_t' (aka '__rvv_float64m1_t'))}} + + (void)(f64 >= b); // expected-error{{cannot convert between vector and non-scalar values}} + (void)(f64 >= i8); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vint8m8_t' (aka '__rvv_int8m8_t'))}} + (void)(f64 >= i16); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vint16m4_t' (aka '__rvv_int16m4_t'))}} + (void)(f64 >= i32); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vint32m2_t' (aka '__rvv_int32m2_t'))}} + (void)(f64 >= i64); // expected-error{{cannot convert between vector type 'vint64m1_t' (aka '__rvv_int64m1_t') and vector type 'vfloat64m1_t' (aka '__rvv_float64m1_t') as implicit conversion would cause truncation}} + (void)(f64 >= u8); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vuint8m8_t' (aka '__rvv_uint8m8_t'))}} + (void)(f64 >= u16); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vuint16m4_t' (aka '__rvv_uint16m4_t'))}} + (void)(f64 >= u32); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vuint32m2_t' (aka '__rvv_uint32m2_t'))}} + (void)(f64 >= f16); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vfloat16m4_t' (aka '__rvv_float16m4_t'))}} + (void)(f64 >= f32); // expected-error{{vector operands do not have the same number of elements ('vfloat64m1_t' (aka '__rvv_float64m1_t') and 'vfloat32m2_t' (aka '__rvv_float32m2_t'))}} +} diff --git a/clang/test/Sema/riscv-rvv-vector-shift-ops.c b/clang/test/Sema/riscv-rvv-vector-shift-ops.c new file mode 100644 --- /dev/null +++ b/clang/test/Sema/riscv-rvv-vector-shift-ops.c @@ -0,0 +1,584 @@ +// RUN: %clang_cc1 -triple riscv64 -target-feature +f -target-feature +d \ +// RUN: -target-feature +v -target-feature +zfh -target-feature +zvfh \ +// RUN: -disable-O0-optnone -o - -fsyntax-only %s -verify +// REQUIRES: riscv-registered-target + +#include + +void lshift(vint8m8_t i8, vint16m4_t i16, vint32m2_t i32, vint64m1_t i64, + vuint8m8_t u8, vuint16m4_t u16, vuint32m2_t u32, vuint64m1_t u64, + vfloat16m4_t f16, vfloat32m2_t f32, vfloat64m1_t f64, + vbool1_t b) { + (void)(b << b); // expected-error{{invalid operands to binary expression}} + + (void)(i8 << b); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(i8 << i16); // expected-error{{invalid operands to binary expression}} + (void)(i8 << i32); // expected-error{{invalid operands to binary expression}} + (void)(i8 << i64); // expected-error{{invalid operands to binary expression}} + (void)(i8 << u16); // expected-error{{invalid operands to binary expression}} + (void)(i8 << u32); // expected-error{{invalid operands to binary expression}} + (void)(i8 << u64); // expected-error{{invalid operands to binary expression}} + (void)(i8 << f16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(i8 << f32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(i8 << f64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(i8 << 0.f); // expected-error{{used type 'float' where integer is required}} + (void)(i8 << 0.); // expected-error{{used type 'double' where integer is required}} + + (void)(u8 << b); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(u8 << i16); // expected-error{{invalid operands to binary expression}} + (void)(u8 << i32); // expected-error{{invalid operands to binary expression}} + (void)(u8 << i64); // expected-error{{invalid operands to binary expression}} + (void)(u8 << u16); // expected-error{{invalid operands to binary expression}} + (void)(u8 << u32); // expected-error{{invalid operands to binary expression}} + (void)(u8 << u64); // expected-error{{invalid operands to binary expression}} + (void)(u8 << f16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(u8 << f32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(u8 << f64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(u8 << 0.f); // expected-error{{used type 'float' where integer is required}} + (void)(u8 << 0.); // expected-error{{used type 'double' where integer is required}} + + (void)(i16 << b); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(i16 << i8); // expected-error{{invalid operands to binary expression}} + (void)(i16 << i32); // expected-error{{invalid operands to binary expression}} + (void)(i16 << i64); // expected-error{{invalid operands to binary expression}} + (void)(i16 << u8); // expected-error{{invalid operands to binary expression}} + (void)(i16 << u32); // expected-error{{invalid operands to binary expression}} + (void)(i16 << u64); // expected-error{{invalid operands to binary expression}} + (void)(i16 << f16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(i16 << f32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(i16 << f64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(i16 << 0.f); // expected-error{{used type 'float' where integer is required}} + (void)(i16 << 0.); // expected-error{{used type 'double' where integer is required}} + + (void)(u16 << b); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(u16 << i8); // expected-error{{invalid operands to binary expression}} + (void)(u16 << i32); // expected-error{{invalid operands to binary expression}} + (void)(u16 << i64); // expected-error{{invalid operands to binary expression}} + (void)(u16 << u8); // expected-error{{invalid operands to binary expression}} + (void)(u16 << u32); // expected-error{{invalid operands to binary expression}} + (void)(u16 << u64); // expected-error{{invalid operands to binary expression}} + (void)(u16 << f16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(u16 << f32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(u16 << f64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(u16 << 0.f); // expected-error{{used type 'float' where integer is required}} + (void)(u16 << 0.); // expected-error{{used type 'double' where integer is required}} + + (void)(i32 << b); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(i32 << i8); // expected-error{{invalid operands to binary expression}} + (void)(i32 << i16); // expected-error{{invalid operands to binary expression}} + (void)(i32 << i64); // expected-error{{invalid operands to binary expression}} + (void)(i32 << u8); // expected-error{{invalid operands to binary expression}} + (void)(i32 << u16); // expected-error{{invalid operands to binary expression}} + (void)(i32 << u64); // expected-error{{invalid operands to binary expression}} + (void)(i32 << f16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(i32 << f32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(i32 << f64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(i32 << 0.f); // expected-error{{used type 'float' where integer is required}} + (void)(i32 << 0.); // expected-error{{used type 'double' where integer is required}} + + (void)(u32 << b); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(u32 << i8); // expected-error{{invalid operands to binary expression}} + (void)(u32 << i16); // expected-error{{invalid operands to binary expression}} + (void)(u32 << i64); // expected-error{{invalid operands to binary expression}} + (void)(u32 << u8); // expected-error{{invalid operands to binary expression}} + (void)(u32 << u16); // expected-error{{invalid operands to binary expression}} + (void)(u32 << u64); // expected-error{{invalid operands to binary expression}} + (void)(u32 << f16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(u32 << f32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(u32 << f64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(u32 << 0.f); // expected-error{{used type 'float' where integer is required}} + (void)(u32 << 0.); // expected-error{{used type 'double' where integer is required}} + + (void)(i64 << b); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(i64 << i8); // expected-error{{invalid operands to binary expression}} + (void)(i64 << i16); // expected-error{{invalid operands to binary expression}} + (void)(i64 << i32); // expected-error{{invalid operands to binary expression}} + (void)(i64 << u8); // expected-error{{invalid operands to binary expression}} + (void)(i64 << u16); // expected-error{{invalid operands to binary expression}} + (void)(i64 << u32); // expected-error{{invalid operands to binary expression}} + (void)(i64 << f16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(i64 << f32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(i64 << f64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(i64 << 0.f); // expected-error{{used type 'float' where integer is required}} + (void)(i64 << 0.); // expected-error{{used type 'double' where integer is required}} + + (void)(u64 << b); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(u64 << i8); // expected-error{{invalid operands to binary expression}} + (void)(u64 << i16); // expected-error{{invalid operands to binary expression}} + (void)(u64 << i32); // expected-error{{invalid operands to binary expression}} + (void)(u64 << u8); // expected-error{{invalid operands to binary expression}} + (void)(u64 << u16); // expected-error{{invalid operands to binary expression}} + (void)(u64 << u32); // expected-error{{invalid operands to binary expression}} + (void)(u64 << f16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(u64 << f32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(u64 << f64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(u64 << 0.f); // expected-error{{used type 'float' where integer is required}} + (void)(u64 << 0.); // expected-error{{used type 'double' where integer is required}} + + (void)(f16 << b); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f16 << i8); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f16 << i16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f16 << i32); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f16 << i64); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f16 << u8); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f16 << u32); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f16 << u64); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f16 << f32); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f16 << f64); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f16 << 0.f); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f16 << 0.); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + + (void)(f32 << b); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f32 << i8); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f32 << i16); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f32 << i32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f32 << i64); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f32 << u8); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f32 << u16); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f32 << u64); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f32 << f16); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f32 << f64); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f32 << 0.); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + + (void)(f64 << b); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(f64 << i8); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(f64 << i16); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(f64 << i32); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(f64 << i64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(f64 << u8); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(f64 << u16); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(f64 << u32); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(f64 << f16); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(f64 << f32); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(f64 << 0.f); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + + (void)(b << i8); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(i16 << i8); // expected-error{{invalid operands to binary expression}} + (void)(i32 << i8); // expected-error{{invalid operands to binary expression}} + (void)(i64 << i8); // expected-error{{invalid operands to binary expression}} + (void)(u16 << i8); // expected-error{{invalid operands to binary expression}} + (void)(u32 << i8); // expected-error{{invalid operands to binary expression}} + (void)(u64 << i8); // expected-error{{invalid operands to binary expression}} + (void)(f16 << i8); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f32 << i8); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f64 << i8); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(0.f << i8); // expected-error{{used type 'float' where integer is required}} + (void)(0. << i8); // expected-error{{used type 'double' where integer is required}} + + (void)(b << u8); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(i16 << u8); // expected-error{{invalid operands to binary expression}} + (void)(i32 << u8); // expected-error{{invalid operands to binary expression}} + (void)(i64 << u8); // expected-error{{invalid operands to binary expression}} + (void)(u16 << u8); // expected-error{{invalid operands to binary expression}} + (void)(u32 << u8); // expected-error{{invalid operands to binary expression}} + (void)(u64 << u8); // expected-error{{invalid operands to binary expression}} + (void)(f16 << u8); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f32 << u8); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f64 << u8); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(0.f << u8); // expected-error{{used type 'float' where integer is required}} + (void)(0. << u8); // expected-error{{used type 'double' where integer is required}} + + (void)(b << i16); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(i8 << i16); // expected-error{{invalid operands to binary expression}} + (void)(i32 << i16); // expected-error{{invalid operands to binary expression}} + (void)(i64 << i16); // expected-error{{invalid operands to binary expression}} + (void)(u8 << i16); // expected-error{{invalid operands to binary expression}} + (void)(u32 << i16); // expected-error{{invalid operands to binary expression}} + (void)(u64 << i16); // expected-error{{invalid operands to binary expression}} + (void)(f16 << i16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f32 << i16); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f64 << i16); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(0.f << i16); // expected-error{{used type 'float' where integer is required}} + (void)(0. << i16); // expected-error{{used type 'double' where integer is required}} + + (void)(b << u16); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(i8 << u16); // expected-error{{invalid operands to binary expression}} + (void)(i32 << u16); // expected-error{{invalid operands to binary expression}} + (void)(i64 << u16); // expected-error{{invalid operands to binary expression}} + (void)(u8 << u16); // expected-error{{invalid operands to binary expression}} + (void)(u32 << u16); // expected-error{{invalid operands to binary expression}} + (void)(u64 << u16); // expected-error{{invalid operands to binary expression}} + (void)(f16 << u16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f32 << u16); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f64 << u16); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(0.f << u16); // expected-error{{used type 'float' where integer is required}} + (void)(0. << u16); // expected-error{{used type 'double' where integer is required}} + + (void)(b << i32); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(i8 << i32); // expected-error{{invalid operands to binary expression}} + (void)(i16 << i32); // expected-error{{invalid operands to binary expression}} + (void)(i64 << i32); // expected-error{{invalid operands to binary expression}} + (void)(u8 << i32); // expected-error{{invalid operands to binary expression}} + (void)(u16 << i32); // expected-error{{invalid operands to binary expression}} + (void)(u64 << i32); // expected-error{{invalid operands to binary expression}} + (void)(f16 << i32); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f32 << i32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f64 << i32); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(0.f << i32); // expected-error{{used type 'float' where integer is required}} + (void)(0. << i32); // expected-error{{used type 'double' where integer is required}} + + (void)(b << u32); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(i8 << u32); // expected-error{{invalid operands to binary expression}} + (void)(i16 << u32); // expected-error{{invalid operands to binary expression}} + (void)(i64 << u32); // expected-error{{invalid operands to binary expression}} + (void)(u8 << u32); // expected-error{{invalid operands to binary expression}} + (void)(u16 << u32); // expected-error{{invalid operands to binary expression}} + (void)(u64 << u32); // expected-error{{invalid operands to binary expression}} + (void)(f16 << u32); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f32 << u32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f64 << u32); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(0.f << u32); // expected-error{{used type 'float' where integer is required}} + (void)(0. << u32); // expected-error{{used type 'double' where integer is required}} + + (void)(b << i64); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(i8 << i64); // expected-error{{invalid operands to binary expression}} + (void)(i16 << i64); // expected-error{{invalid operands to binary expression}} + (void)(i32 << i64); // expected-error{{invalid operands to binary expression}} + (void)(u8 << i64); // expected-error{{invalid operands to binary expression}} + (void)(u16 << i64); // expected-error{{invalid operands to binary expression}} + (void)(u32 << i64); // expected-error{{invalid operands to binary expression}} + (void)(f16 << i64); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f32 << i64); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f64 << i64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(0.f << i64); // expected-error{{used type 'float' where integer is required}} + (void)(0. << i64); // expected-error{{used type 'double' where integer is required}} + + (void)(b << u64); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(i8 << u64); // expected-error{{invalid operands to binary expression}} + (void)(i16 << u64); // expected-error{{invalid operands to binary expression}} + (void)(i32 << u64); // expected-error{{invalid operands to binary expression}} + (void)(u8 << u64); // expected-error{{invalid operands to binary expression}} + (void)(u16 << u64); // expected-error{{invalid operands to binary expression}} + (void)(u32 << u64); // expected-error{{invalid operands to binary expression}} + (void)(f16 << u64); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f32 << u64); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f64 << u64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(0.f << u64); // expected-error{{used type 'float' where integer is required}} + (void)(0. << u64); // expected-error{{used type 'double' where integer is required}} + + (void)(b << f16); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(i8 << f16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(i16 << f16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(i32 << f16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(i64 << f16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(u8 << f16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(u32 << f16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(u64 << f16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f32 << f16); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f64 << f16); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(0.f << f16); // expected-error{{used type 'float' where integer is required}} + (void)(0. << f16); // expected-error{{used type 'double' where integer is required}} + + (void)(b << f32); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(i8 << f32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(i16 << f32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(i32 << f32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(i64 << f32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(u8 << f32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(u16 << f32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(u64 << f32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f16 << f32); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f64 << f32); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(0. << f32); // expected-error{{used type 'double' where integer is required}} + + (void)(b << f64); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(i8 << f64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(i16 << f64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(i32 << f64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(i64 << f64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(u8 << f64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(u16 << f64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(u32 << f64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(f16 << f64); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f32 << f64); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(0.f << f64); // expected-error{{used type 'float' where integer is required}} +} + +void rshift(vint8m8_t i8, vint16m4_t i16, vint32m2_t i32, vint64m1_t i64, + vuint8m8_t u8, vuint16m4_t u16, vuint32m2_t u32, vuint64m1_t u64, + vfloat16m4_t f16, vfloat32m2_t f32, vfloat64m1_t f64, + vbool1_t b) { + (void)(b >> b); // expected-error{{invalid operands to binary expression}} + + (void)(i8 >> b); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(i8 >> i16); // expected-error{{invalid operands to binary expression}} + (void)(i8 >> i32); // expected-error{{invalid operands to binary expression}} + (void)(i8 >> i64); // expected-error{{invalid operands to binary expression}} + (void)(i8 >> u16); // expected-error{{invalid operands to binary expression}} + (void)(i8 >> u32); // expected-error{{invalid operands to binary expression}} + (void)(i8 >> u64); // expected-error{{invalid operands to binary expression}} + (void)(i8 >> f16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(i8 >> f32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(i8 >> f64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(i8 >> 0.f); // expected-error{{used type 'float' where integer is required}} + (void)(i8 >> 0.); // expected-error{{used type 'double' where integer is required}} + + (void)(u8 >> b); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(u8 >> i16); // expected-error{{invalid operands to binary expression}} + (void)(u8 >> i32); // expected-error{{invalid operands to binary expression}} + (void)(u8 >> i64); // expected-error{{invalid operands to binary expression}} + (void)(u8 >> u16); // expected-error{{invalid operands to binary expression}} + (void)(u8 >> u32); // expected-error{{invalid operands to binary expression}} + (void)(u8 >> u64); // expected-error{{invalid operands to binary expression}} + (void)(u8 >> f16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(u8 >> f32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(u8 >> f64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(u8 >> 0.f); // expected-error{{used type 'float' where integer is required}} + (void)(u8 >> 0.); // expected-error{{used type 'double' where integer is required}} + + (void)(i16 >> b); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(i16 >> i8); // expected-error{{invalid operands to binary expression}} + (void)(i16 >> i32); // expected-error{{invalid operands to binary expression}} + (void)(i16 >> i64); // expected-error{{invalid operands to binary expression}} + (void)(i16 >> u8); // expected-error{{invalid operands to binary expression}} + (void)(i16 >> u32); // expected-error{{invalid operands to binary expression}} + (void)(i16 >> u64); // expected-error{{invalid operands to binary expression}} + (void)(i16 >> f16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(i16 >> f32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(i16 >> f64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(i16 >> 0.f); // expected-error{{used type 'float' where integer is required}} + (void)(i16 >> 0.); // expected-error{{used type 'double' where integer is required}} + + (void)(u16 >> b); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(u16 >> i8); // expected-error{{invalid operands to binary expression}} + (void)(u16 >> i32); // expected-error{{invalid operands to binary expression}} + (void)(u16 >> i64); // expected-error{{invalid operands to binary expression}} + (void)(u16 >> u8); // expected-error{{invalid operands to binary expression}} + (void)(u16 >> u32); // expected-error{{invalid operands to binary expression}} + (void)(u16 >> u64); // expected-error{{invalid operands to binary expression}} + (void)(u16 >> f16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(u16 >> f32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(u16 >> f64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(u16 >> 0.f); // expected-error{{used type 'float' where integer is required}} + (void)(u16 >> 0.); // expected-error{{used type 'double' where integer is required}} + + (void)(i32 >> b); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(i32 >> i8); // expected-error{{invalid operands to binary expression}} + (void)(i32 >> i16); // expected-error{{invalid operands to binary expression}} + (void)(i32 >> i64); // expected-error{{invalid operands to binary expression}} + (void)(i32 >> u8); // expected-error{{invalid operands to binary expression}} + (void)(i32 >> u16); // expected-error{{invalid operands to binary expression}} + (void)(i32 >> u64); // expected-error{{invalid operands to binary expression}} + (void)(i32 >> f16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(i32 >> f32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(i32 >> f64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(i32 >> 0.f); // expected-error{{used type 'float' where integer is required}} + (void)(i32 >> 0.); // expected-error{{used type 'double' where integer is required}} + + (void)(u32 >> b); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(u32 >> i8); // expected-error{{invalid operands to binary expression}} + (void)(u32 >> i16); // expected-error{{invalid operands to binary expression}} + (void)(u32 >> i64); // expected-error{{invalid operands to binary expression}} + (void)(u32 >> u8); // expected-error{{invalid operands to binary expression}} + (void)(u32 >> u16); // expected-error{{invalid operands to binary expression}} + (void)(u32 >> u64); // expected-error{{invalid operands to binary expression}} + (void)(u32 >> f16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(u32 >> f32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(u32 >> f64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(u32 >> 0.f); // expected-error{{used type 'float' where integer is required}} + (void)(u32 >> 0.); // expected-error{{used type 'double' where integer is required}} + + (void)(i64 >> b); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(i64 >> i8); // expected-error{{invalid operands to binary expression}} + (void)(i64 >> i16); // expected-error{{invalid operands to binary expression}} + (void)(i64 >> i32); // expected-error{{invalid operands to binary expression}} + (void)(i64 >> u8); // expected-error{{invalid operands to binary expression}} + (void)(i64 >> u16); // expected-error{{invalid operands to binary expression}} + (void)(i64 >> u32); // expected-error{{invalid operands to binary expression}} + (void)(i64 >> f16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(i64 >> f32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(i64 >> f64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(i64 >> 0.f); // expected-error{{used type 'float' where integer is required}} + (void)(i64 >> 0.); // expected-error{{used type 'double' where integer is required}} + + (void)(u64 >> b); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(u64 >> i8); // expected-error{{invalid operands to binary expression}} + (void)(u64 >> i16); // expected-error{{invalid operands to binary expression}} + (void)(u64 >> i32); // expected-error{{invalid operands to binary expression}} + (void)(u64 >> u8); // expected-error{{invalid operands to binary expression}} + (void)(u64 >> u16); // expected-error{{invalid operands to binary expression}} + (void)(u64 >> u32); // expected-error{{invalid operands to binary expression}} + (void)(u64 >> f16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(u64 >> f32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(u64 >> f64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(u64 >> 0.f); // expected-error{{used type 'float' where integer is required}} + (void)(u64 >> 0.); // expected-error{{used type 'double' where integer is required}} + + (void)(f16 >> b); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f16 >> i8); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f16 >> i16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f16 >> i32); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f16 >> i64); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f16 >> u8); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f16 >> u32); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f16 >> u64); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f16 >> f32); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f16 >> f64); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f16 >> 0.f); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f16 >> 0.); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + + (void)(f32 >> b); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f32 >> i8); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f32 >> i16); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f32 >> i32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f32 >> i64); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f32 >> u8); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f32 >> u16); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f32 >> u64); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f32 >> f16); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f32 >> f64); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f32 >> 0.); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + + (void)(f64 >> b); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(f64 >> i8); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(f64 >> i16); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(f64 >> i32); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(f64 >> i64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(f64 >> u8); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(f64 >> u16); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(f64 >> u32); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(f64 >> f16); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(f64 >> f32); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(f64 >> 0.f); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + + (void)(b >> i8); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(i16 >> i8); // expected-error{{invalid operands to binary expression}} + (void)(i32 >> i8); // expected-error{{invalid operands to binary expression}} + (void)(i64 >> i8); // expected-error{{invalid operands to binary expression}} + (void)(u16 >> i8); // expected-error{{invalid operands to binary expression}} + (void)(u32 >> i8); // expected-error{{invalid operands to binary expression}} + (void)(u64 >> i8); // expected-error{{invalid operands to binary expression}} + (void)(f16 >> i8); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f32 >> i8); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f64 >> i8); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(0.f >> i8); // expected-error{{used type 'float' where integer is required}} + (void)(0. >> i8); // expected-error{{used type 'double' where integer is required}} + + (void)(b >> u8); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(i16 >> u8); // expected-error{{invalid operands to binary expression}} + (void)(i32 >> u8); // expected-error{{invalid operands to binary expression}} + (void)(i64 >> u8); // expected-error{{invalid operands to binary expression}} + (void)(u16 >> u8); // expected-error{{invalid operands to binary expression}} + (void)(u32 >> u8); // expected-error{{invalid operands to binary expression}} + (void)(u64 >> u8); // expected-error{{invalid operands to binary expression}} + (void)(f16 >> u8); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f32 >> u8); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f64 >> u8); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(0.f >> u8); // expected-error{{used type 'float' where integer is required}} + (void)(0. >> u8); // expected-error{{used type 'double' where integer is required}} + + (void)(b >> i16); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(i8 >> i16); // expected-error{{invalid operands to binary expression}} + (void)(i32 >> i16); // expected-error{{invalid operands to binary expression}} + (void)(i64 >> i16); // expected-error{{invalid operands to binary expression}} + (void)(u8 >> i16); // expected-error{{invalid operands to binary expression}} + (void)(u32 >> i16); // expected-error{{invalid operands to binary expression}} + (void)(u64 >> i16); // expected-error{{invalid operands to binary expression}} + (void)(f16 >> i16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f32 >> i16); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f64 >> i16); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(0.f >> i16); // expected-error{{used type 'float' where integer is required}} + (void)(0. >> i16); // expected-error{{used type 'double' where integer is required}} + + (void)(b >> u16); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(i8 >> u16); // expected-error{{invalid operands to binary expression}} + (void)(i32 >> u16); // expected-error{{invalid operands to binary expression}} + (void)(i64 >> u16); // expected-error{{invalid operands to binary expression}} + (void)(u8 >> u16); // expected-error{{invalid operands to binary expression}} + (void)(u32 >> u16); // expected-error{{invalid operands to binary expression}} + (void)(u64 >> u16); // expected-error{{invalid operands to binary expression}} + (void)(f16 >> u16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f32 >> u16); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f64 >> u16); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(0.f >> u16); // expected-error{{used type 'float' where integer is required}} + (void)(0. >> u16); // expected-error{{used type 'double' where integer is required}} + + (void)(b >> i32); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(i8 >> i32); // expected-error{{invalid operands to binary expression}} + (void)(i16 >> i32); // expected-error{{invalid operands to binary expression}} + (void)(i64 >> i32); // expected-error{{invalid operands to binary expression}} + (void)(u8 >> i32); // expected-error{{invalid operands to binary expression}} + (void)(u16 >> i32); // expected-error{{invalid operands to binary expression}} + (void)(u64 >> i32); // expected-error{{invalid operands to binary expression}} + (void)(f16 >> i32); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f32 >> i32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f64 >> i32); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(0.f >> i32); // expected-error{{used type 'float' where integer is required}} + (void)(0. >> i32); // expected-error{{used type 'double' where integer is required}} + + (void)(b >> u32); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(i8 >> u32); // expected-error{{invalid operands to binary expression}} + (void)(i16 >> u32); // expected-error{{invalid operands to binary expression}} + (void)(i64 >> u32); // expected-error{{invalid operands to binary expression}} + (void)(u8 >> u32); // expected-error{{invalid operands to binary expression}} + (void)(u16 >> u32); // expected-error{{invalid operands to binary expression}} + (void)(u64 >> u32); // expected-error{{invalid operands to binary expression}} + (void)(f16 >> u32); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f32 >> u32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f64 >> u32); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(0.f >> u32); // expected-error{{used type 'float' where integer is required}} + (void)(0. >> u32); // expected-error{{used type 'double' where integer is required}} + + (void)(b >> i64); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(i8 >> i64); // expected-error{{invalid operands to binary expression}} + (void)(i16 >> i64); // expected-error{{invalid operands to binary expression}} + (void)(i32 >> i64); // expected-error{{invalid operands to binary expression}} + (void)(u8 >> i64); // expected-error{{invalid operands to binary expression}} + (void)(u16 >> i64); // expected-error{{invalid operands to binary expression}} + (void)(u32 >> i64); // expected-error{{invalid operands to binary expression}} + (void)(f16 >> i64); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f32 >> i64); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f64 >> i64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(0.f >> i64); // expected-error{{used type 'float' where integer is required}} + (void)(0. >> i64); // expected-error{{used type 'double' where integer is required}} + + (void)(b >> u64); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(i8 >> u64); // expected-error{{invalid operands to binary expression}} + (void)(i16 >> u64); // expected-error{{invalid operands to binary expression}} + (void)(i32 >> u64); // expected-error{{invalid operands to binary expression}} + (void)(u8 >> u64); // expected-error{{invalid operands to binary expression}} + (void)(u16 >> u64); // expected-error{{invalid operands to binary expression}} + (void)(u32 >> u64); // expected-error{{invalid operands to binary expression}} + (void)(f16 >> u64); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f32 >> u64); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f64 >> u64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(0.f >> u64); // expected-error{{used type 'float' where integer is required}} + (void)(0. >> u64); // expected-error{{used type 'double' where integer is required}} + + (void)(b >> f16); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(i8 >> f16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(i16 >> f16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(i32 >> f16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(i64 >> f16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(u8 >> f16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(u32 >> f16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(u64 >> f16); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f32 >> f16); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f64 >> f16); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(0.f >> f16); // expected-error{{used type 'float' where integer is required}} + (void)(0. >> f16); // expected-error{{used type 'double' where integer is required}} + + (void)(b >> f32); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(i8 >> f32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(i16 >> f32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(i32 >> f32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(i64 >> f32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(u8 >> f32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(u16 >> f32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(u64 >> f32); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(f16 >> f32); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f64 >> f32); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(0. >> f32); // expected-error{{used type 'double' where integer is required}} + + (void)(b >> f64); // expected-error{{used type 'vbool1_t' (aka '__rvv_bool1_t') where integer is required}} + (void)(i8 >> f64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(i16 >> f64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(i32 >> f64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(i64 >> f64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(u8 >> f64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(u16 >> f64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(u32 >> f64); // expected-error{{used type 'vfloat64m1_t' (aka '__rvv_float64m1_t') where integer is required}} + (void)(f16 >> f64); // expected-error{{used type 'vfloat16m4_t' (aka '__rvv_float16m4_t') where integer is required}} + (void)(f32 >> f64); // expected-error{{used type 'vfloat32m2_t' (aka '__rvv_float32m2_t') where integer is required}} + (void)(0.f >> f64); // expected-error{{used type 'float' where integer is required}} +} diff --git a/clang/test/Sema/riscv-rvv-vector-subscript-ops.c b/clang/test/Sema/riscv-rvv-vector-subscript-ops.c new file mode 100644 --- /dev/null +++ b/clang/test/Sema/riscv-rvv-vector-subscript-ops.c @@ -0,0 +1,48 @@ +// RUN: %clang_cc1 -triple riscv64 -target-feature +f -target-feature +d \ +// RUN: -target-feature +v -target-feature +zfh -target-feature +zvfh \ +// RUN: -disable-O0-optnone -o - -fsyntax-only %s -verify +// REQUIRES: riscv-registered-target + +#include + +void subscript(vint8m8_t i8, vint16m4_t i16, vint32m2_t i32, vint64m1_t i64, + vuint8m8_t u8, vuint16m4_t u16, vuint32m2_t u32, vuint64m1_t u64, + vfloat16m4_t f16, vfloat32m2_t f32, vfloat64m1_t f64, + vbool1_t b) { + (void)b[0]; // expected-error{{subscripted value is not an array, pointer, or vector}} + (void)b[0.f]; // expected-error{{subscripted value is not an array, pointer, or vector}} + (void)b[0.]; // expected-error{{subscripted value is not an array, pointer, or vector}} + + (void)i8[0.f]; // expected-error{{array subscript is not an integer}} + (void)i8[0.]; // expected-error{{array subscript is not an integer}} + + (void)u8[0.f]; // expected-error{{array subscript is not an integer}} + (void)u8[0.]; // expected-error{{array subscript is not an integer}} + + (void)i16[0.f]; // expected-error{{array subscript is not an integer}} + (void)i16[0.]; // expected-error{{array subscript is not an integer}} + + (void)u16[0.f]; // expected-error{{array subscript is not an integer}} + (void)u16[0.]; // expected-error{{array subscript is not an integer}} + + (void)i32[0.f]; // expected-error{{array subscript is not an integer}} + (void)i32[0.]; // expected-error{{array subscript is not an integer}} + + (void)u32[0.f]; // expected-error{{array subscript is not an integer}} + (void)u32[0.]; // expected-error{{array subscript is not an integer}} + + (void)i64[0.f]; // expected-error{{array subscript is not an integer}} + (void)i64[0.]; // expected-error{{array subscript is not an integer}} + + (void)u64[0.f]; // expected-error{{array subscript is not an integer}} + (void)u64[0.]; // expected-error{{array subscript is not an integer}} + + (void)f16[0.f]; // expected-error{{array subscript is not an integer}} + (void)f16[0.]; // expected-error{{array subscript is not an integer}} + + (void)f32[0.f]; // expected-error{{array subscript is not an integer}} + (void)f32[0.]; // expected-error{{array subscript is not an integer}} + + (void)f64[0.f]; // expected-error{{array subscript is not an integer}} + (void)f64[0.]; // expected-error{{array subscript is not an integer}} +}