[clang] 66c44b2 - [Clang][AArch64][SVE] Add shift operators for SVE vector types
David Truby via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 14 05:21:02 PDT 2022
Author: David Truby
Date: 2022-04-14T13:20:50+01:00
New Revision: 66c44b20b4a538fbb1bae8bc9533c25f5a006bd5
URL: https://github.com/llvm/llvm-project/commit/66c44b20b4a538fbb1bae8bc9533c25f5a006bd5
DIFF: https://github.com/llvm/llvm-project/commit/66c44b20b4a538fbb1bae8bc9533c25f5a006bd5.diff
LOG: [Clang][AArch64][SVE] Add shift operators for SVE vector types
This patch enables shift operators on SVE vector types, as well as
supporting vector-scalar shift operations.
Shifts by a scalar that is wider than the contained type in the
vector are permitted but as in the C standard if the value is larger
than the width of the type the behavior is undefined.
Differential Revision: https://reviews.llvm.org/D123303
Added:
clang/test/CodeGen/aarch64-sve-vector-shift-ops.c
clang/test/Sema/aarch64-sve-vector-shift-ops.c
Modified:
clang/lib/Sema/SemaExpr.cpp
clang/test/Sema/sizeless-1.c
clang/test/SemaCXX/sizeless-1.cpp
Removed:
################################################################################
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index faff375314e92..f210a8ba7aac2 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -11476,6 +11476,97 @@ static QualType checkVectorShift(Sema &S, ExprResult &LHS, ExprResult &RHS,
return LHSType;
}
+static QualType checkSizelessVectorShift(Sema &S, ExprResult &LHS,
+ ExprResult &RHS, SourceLocation Loc,
+ bool IsCompAssign) {
+ if (!IsCompAssign) {
+ LHS = S.UsualUnaryConversions(LHS.get());
+ if (LHS.isInvalid())
+ return QualType();
+ }
+
+ RHS = S.UsualUnaryConversions(RHS.get());
+ if (RHS.isInvalid())
+ return QualType();
+
+ QualType LHSType = LHS.get()->getType();
+ const BuiltinType *LHSBuiltinTy = LHSType->getAs<BuiltinType>();
+ QualType LHSEleType = LHSType->isVLSTBuiltinType()
+ ? LHSBuiltinTy->getSveEltType(S.getASTContext())
+ : LHSType;
+
+ // Note that RHS might not be a vector
+ QualType RHSType = RHS.get()->getType();
+ const BuiltinType *RHSBuiltinTy = RHSType->getAs<BuiltinType>();
+ QualType RHSEleType = RHSType->isVLSTBuiltinType()
+ ? RHSBuiltinTy->getSveEltType(S.getASTContext())
+ : RHSType;
+
+ if ((LHSBuiltinTy && LHSBuiltinTy->isSVEBool()) ||
+ (RHSBuiltinTy && RHSBuiltinTy->isSVEBool())) {
+ S.Diag(Loc, diag::err_typecheck_invalid_operands)
+ << LHSType << RHSType << LHS.get()->getSourceRange();
+ return QualType();
+ }
+
+ if (!LHSEleType->isIntegerType()) {
+ S.Diag(Loc, diag::err_typecheck_expect_int)
+ << LHS.get()->getType() << LHS.get()->getSourceRange();
+ return QualType();
+ }
+
+ if (!RHSEleType->isIntegerType()) {
+ S.Diag(Loc, diag::err_typecheck_expect_int)
+ << RHS.get()->getType() << RHS.get()->getSourceRange();
+ return QualType();
+ }
+
+ if (LHSType->isVLSTBuiltinType() && RHSType->isVLSTBuiltinType() &&
+ (S.Context.getBuiltinVectorTypeInfo(LHSBuiltinTy).EC !=
+ S.Context.getBuiltinVectorTypeInfo(RHSBuiltinTy).EC)) {
+ S.Diag(Loc, diag::err_typecheck_invalid_operands)
+ << LHSType << RHSType << LHS.get()->getSourceRange()
+ << RHS.get()->getSourceRange();
+ return QualType();
+ }
+
+ if (!LHSType->isVLSTBuiltinType()) {
+ assert(RHSType->isVLSTBuiltinType());
+ if (IsCompAssign)
+ return RHSType;
+ if (LHSEleType != RHSEleType) {
+ LHS = S.ImpCastExprToType(LHS.get(), RHSEleType, clang::CK_IntegralCast);
+ LHSEleType = RHSEleType;
+ }
+ const llvm::ElementCount VecSize =
+ S.Context.getBuiltinVectorTypeInfo(RHSBuiltinTy).EC;
+ QualType VecTy =
+ S.Context.getScalableVectorType(LHSEleType, VecSize.getKnownMinValue());
+ LHS = S.ImpCastExprToType(LHS.get(), VecTy, clang::CK_VectorSplat);
+ LHSType = VecTy;
+ } else if (RHSBuiltinTy && RHSBuiltinTy->isVLSTBuiltinType()) {
+ if (S.Context.getTypeSize(RHSBuiltinTy) !=
+ S.Context.getTypeSize(LHSBuiltinTy)) {
+ S.Diag(Loc, diag::err_typecheck_vector_lengths_not_equal)
+ << LHSType << RHSType << LHS.get()->getSourceRange()
+ << RHS.get()->getSourceRange();
+ return QualType();
+ }
+ } else {
+ const llvm::ElementCount VecSize =
+ S.Context.getBuiltinVectorTypeInfo(LHSBuiltinTy).EC;
+ if (LHSEleType != RHSEleType) {
+ RHS = S.ImpCastExprToType(RHS.get(), LHSEleType, clang::CK_IntegralCast);
+ RHSEleType = LHSEleType;
+ }
+ QualType VecTy =
+ S.Context.getScalableVectorType(RHSEleType, VecSize.getKnownMinValue());
+ RHS = S.ImpCastExprToType(RHS.get(), VecTy, CK_VectorSplat);
+ }
+
+ return LHSType;
+}
+
// C99 6.5.7
QualType Sema::CheckShiftOperands(ExprResult &LHS, ExprResult &RHS,
SourceLocation Loc, BinaryOperatorKind Opc,
@@ -11501,7 +11592,7 @@ QualType Sema::CheckShiftOperands(ExprResult &LHS, ExprResult &RHS,
if (LHS.get()->getType()->isVLSTBuiltinType() ||
RHS.get()->getType()->isVLSTBuiltinType())
- return InvalidOperands(Loc, LHS, RHS);
+ return checkSizelessVectorShift(*this, LHS, RHS, Loc, IsCompAssign);
// Shifts don't perform usual arithmetic conversions, they just do integer
// promotions on each operand. C99 6.5.7p3
diff --git a/clang/test/CodeGen/aarch64-sve-vector-shift-ops.c b/clang/test/CodeGen/aarch64-sve-vector-shift-ops.c
new file mode 100644
index 0000000000000..b479296ffa8b1
--- /dev/null
+++ b/clang/test/CodeGen/aarch64-sve-vector-shift-ops.c
@@ -0,0 +1,504 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
+// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve \
+// RUN: -fallow-half-arguments-and-returns -disable-O0-optnone \
+// RUN: -emit-llvm -o - %s | opt -S -sroa | FileCheck %s
+
+// REQUIRES: aarch64-registered-target
+
+#include <arm_sve.h>
+
+// CHECK-LABEL: @lshift_i8(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SHL:%.*]] = shl <vscale x 16 x i8> [[A:%.*]], [[B:%.*]]
+// CHECK-NEXT: ret <vscale x 16 x i8> [[SHL]]
+//
+svint8_t lshift_i8(svint8_t a, svint8_t b) {
+ return a << b;
+}
+
+// CHECK-LABEL: @rshift_i8(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SHR:%.*]] = ashr <vscale x 16 x i8> [[A:%.*]], [[B:%.*]]
+// CHECK-NEXT: ret <vscale x 16 x i8> [[SHR]]
+//
+svint8_t rshift_i8(svint8_t a, svint8_t b) {
+ return a >> b;
+}
+
+// CHECK-LABEL: @lshift_u8(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SHL:%.*]] = shl <vscale x 16 x i8> [[A:%.*]], [[B:%.*]]
+// CHECK-NEXT: ret <vscale x 16 x i8> [[SHL]]
+//
+svuint8_t lshift_u8(svuint8_t a, svuint8_t b) {
+ return a << b;
+}
+
+// CHECK-LABEL: @rshift_u8(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SHR:%.*]] = lshr <vscale x 16 x i8> [[A:%.*]], [[B:%.*]]
+// CHECK-NEXT: ret <vscale x 16 x i8> [[SHR]]
+//
+svuint8_t rshift_u8(svuint8_t a, svuint8_t b) {
+ return a >> b;
+}
+
+// CHECK-LABEL: @lshift_i16(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SHL:%.*]] = shl <vscale x 8 x i16> [[A:%.*]], [[B:%.*]]
+// CHECK-NEXT: ret <vscale x 8 x i16> [[SHL]]
+//
+svint16_t lshift_i16(svint16_t a, svint16_t b) {
+ return a << b;
+}
+
+// CHECK-LABEL: @rshift_i16(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SHR:%.*]] = ashr <vscale x 8 x i16> [[A:%.*]], [[B:%.*]]
+// CHECK-NEXT: ret <vscale x 8 x i16> [[SHR]]
+//
+svint16_t rshift_i16(svint16_t a, svint16_t b) {
+ return a >> b;
+}
+
+// CHECK-LABEL: @lshift_u16(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SHL:%.*]] = shl <vscale x 8 x i16> [[A:%.*]], [[B:%.*]]
+// CHECK-NEXT: ret <vscale x 8 x i16> [[SHL]]
+//
+svuint16_t lshift_u16(svuint16_t a, svuint16_t b) {
+ return a << b;
+}
+
+// CHECK-LABEL: @rshift_u16(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SHR:%.*]] = lshr <vscale x 8 x i16> [[A:%.*]], [[B:%.*]]
+// CHECK-NEXT: ret <vscale x 8 x i16> [[SHR]]
+//
+svuint16_t rshift_u16(svuint16_t a, svuint16_t b) {
+ return a >> b;
+}
+
+// CHECK-LABEL: @lshift_i32(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SHL:%.*]] = shl <vscale x 4 x i32> [[A:%.*]], [[B:%.*]]
+// CHECK-NEXT: ret <vscale x 4 x i32> [[SHL]]
+//
+svint32_t lshift_i32(svint32_t a, svint32_t b) {
+ return a << b;
+}
+
+// CHECK-LABEL: @rshift_i32(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SHR:%.*]] = ashr <vscale x 4 x i32> [[A:%.*]], [[B:%.*]]
+// CHECK-NEXT: ret <vscale x 4 x i32> [[SHR]]
+//
+svint32_t rshift_i32(svint32_t a, svint32_t b) {
+ return a >> b;
+}
+
+// CHECK-LABEL: @lshift_u32(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SHL:%.*]] = shl <vscale x 4 x i32> [[A:%.*]], [[B:%.*]]
+// CHECK-NEXT: ret <vscale x 4 x i32> [[SHL]]
+//
+svuint32_t lshift_u32(svuint32_t a, svuint32_t b) {
+ return a << b;
+}
+
+// CHECK-LABEL: @rshift_u32(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SHR:%.*]] = lshr <vscale x 4 x i32> [[A:%.*]], [[B:%.*]]
+// CHECK-NEXT: ret <vscale x 4 x i32> [[SHR]]
+//
+svuint32_t rshift_u32(svuint32_t a, svuint32_t b) {
+ return a >> b;
+}
+
+// CHECK-LABEL: @lshift_i64(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SHL:%.*]] = shl <vscale x 2 x i64> [[A:%.*]], [[B:%.*]]
+// CHECK-NEXT: ret <vscale x 2 x i64> [[SHL]]
+//
+svint64_t lshift_i64(svint64_t a, svint64_t b) {
+ return a << b;
+}
+
+// CHECK-LABEL: @rshift_i64(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SHR:%.*]] = ashr <vscale x 2 x i64> [[A:%.*]], [[B:%.*]]
+// CHECK-NEXT: ret <vscale x 2 x i64> [[SHR]]
+//
+svint64_t rshift_i64(svint64_t a, svint64_t b) {
+ return a >> b;
+}
+
+// CHECK-LABEL: @lshift_u64(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SHL:%.*]] = shl <vscale x 2 x i64> [[A:%.*]], [[B:%.*]]
+// CHECK-NEXT: ret <vscale x 2 x i64> [[SHL]]
+//
+svuint64_t lshift_u64(svuint64_t a, svuint64_t b) {
+ return a << b;
+}
+
+// CHECK-LABEL: @rshift_u64(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SHR:%.*]] = lshr <vscale x 2 x i64> [[A:%.*]], [[B:%.*]]
+// CHECK-NEXT: ret <vscale x 2 x i64> [[SHR]]
+//
+svuint64_t rshift_u64(svuint64_t a, svuint64_t b) {
+ return a >> b;
+}
+
+// CHECK-LABEL: @lshift_i8_rsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 16 x i8> poison, i8 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 16 x i8> [[SPLAT_SPLATINSERT]], <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer
+// CHECK-NEXT: [[SHL:%.*]] = shl <vscale x 16 x i8> [[A:%.*]], [[SPLAT_SPLAT]]
+// CHECK-NEXT: ret <vscale x 16 x i8> [[SHL]]
+//
+svint8_t lshift_i8_rsplat(svint8_t a, int8_t b) {
+ return a << b;
+}
+
+// CHECK-LABEL: @lshift_i8_lsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 16 x i8> poison, i8 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 16 x i8> [[SPLAT_SPLATINSERT]], <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer
+// CHECK-NEXT: [[SHL:%.*]] = shl <vscale x 16 x i8> [[SPLAT_SPLAT]], [[A:%.*]]
+// CHECK-NEXT: ret <vscale x 16 x i8> [[SHL]]
+//
+svint8_t lshift_i8_lsplat(svint8_t a, int8_t b) {
+ return b << a;
+}
+
+// CHECK-LABEL: @rshift_i8_rsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 16 x i8> poison, i8 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 16 x i8> [[SPLAT_SPLATINSERT]], <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer
+// CHECK-NEXT: [[SHR:%.*]] = ashr <vscale x 16 x i8> [[A:%.*]], [[SPLAT_SPLAT]]
+// CHECK-NEXT: ret <vscale x 16 x i8> [[SHR]]
+//
+svint8_t rshift_i8_rsplat(svint8_t a, int8_t b) {
+ return a >> b;
+}
+
+// CHECK-LABEL: @rshift_i8_lsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 16 x i8> poison, i8 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 16 x i8> [[SPLAT_SPLATINSERT]], <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer
+// CHECK-NEXT: [[SHR:%.*]] = ashr <vscale x 16 x i8> [[SPLAT_SPLAT]], [[A:%.*]]
+// CHECK-NEXT: ret <vscale x 16 x i8> [[SHR]]
+//
+svint8_t rshift_i8_lsplat(svint8_t a, int8_t b) {
+ return b >> a;
+}
+
+// CHECK-LABEL: @lshift_u8_rsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 16 x i8> poison, i8 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 16 x i8> [[SPLAT_SPLATINSERT]], <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer
+// CHECK-NEXT: [[SHL:%.*]] = shl <vscale x 16 x i8> [[A:%.*]], [[SPLAT_SPLAT]]
+// CHECK-NEXT: ret <vscale x 16 x i8> [[SHL]]
+//
+svuint8_t lshift_u8_rsplat(svuint8_t a, uint8_t b) {
+ return a << b;
+}
+
+// CHECK-LABEL: @lshift_u8_lsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 16 x i8> poison, i8 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 16 x i8> [[SPLAT_SPLATINSERT]], <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer
+// CHECK-NEXT: [[SHL:%.*]] = shl <vscale x 16 x i8> [[SPLAT_SPLAT]], [[A:%.*]]
+// CHECK-NEXT: ret <vscale x 16 x i8> [[SHL]]
+//
+svuint8_t lshift_u8_lsplat(svuint8_t a, uint8_t b) {
+ return b << a;
+}
+
+// CHECK-LABEL: @rshift_u8_rsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 16 x i8> poison, i8 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 16 x i8> [[SPLAT_SPLATINSERT]], <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer
+// CHECK-NEXT: [[SHR:%.*]] = lshr <vscale x 16 x i8> [[A:%.*]], [[SPLAT_SPLAT]]
+// CHECK-NEXT: ret <vscale x 16 x i8> [[SHR]]
+//
+svuint8_t rshift_u8_rsplat(svuint8_t a, uint8_t b) {
+ return a >> b;
+}
+
+// CHECK-LABEL: @rshift_u8_lsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 16 x i8> poison, i8 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 16 x i8> [[SPLAT_SPLATINSERT]], <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer
+// CHECK-NEXT: [[SHR:%.*]] = lshr <vscale x 16 x i8> [[SPLAT_SPLAT]], [[A:%.*]]
+// CHECK-NEXT: ret <vscale x 16 x i8> [[SHR]]
+//
+svuint8_t rshift_u8_lsplat(svuint8_t a, uint8_t b) {
+ return b >> a;
+}
+
+// CHECK-LABEL: @lshift_i16_rsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 8 x i16> poison, i16 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 8 x i16> [[SPLAT_SPLATINSERT]], <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
+// CHECK-NEXT: [[SHL:%.*]] = shl <vscale x 8 x i16> [[A:%.*]], [[SPLAT_SPLAT]]
+// CHECK-NEXT: ret <vscale x 8 x i16> [[SHL]]
+//
+svint16_t lshift_i16_rsplat(svint16_t a, int16_t b) {
+ return a << b;
+}
+
+// CHECK-LABEL: @lshift_i16_lsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 8 x i16> poison, i16 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 8 x i16> [[SPLAT_SPLATINSERT]], <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
+// CHECK-NEXT: [[SHL:%.*]] = shl <vscale x 8 x i16> [[SPLAT_SPLAT]], [[A:%.*]]
+// CHECK-NEXT: ret <vscale x 8 x i16> [[SHL]]
+//
+svint16_t lshift_i16_lsplat(svint16_t a, int16_t b) {
+ return b << a;
+}
+
+// CHECK-LABEL: @rshift_i16_rsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 8 x i16> poison, i16 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 8 x i16> [[SPLAT_SPLATINSERT]], <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
+// CHECK-NEXT: [[SHR:%.*]] = ashr <vscale x 8 x i16> [[A:%.*]], [[SPLAT_SPLAT]]
+// CHECK-NEXT: ret <vscale x 8 x i16> [[SHR]]
+//
+svint16_t rshift_i16_rsplat(svint16_t a, int16_t b) {
+ return a >> b;
+}
+
+// CHECK-LABEL: @rshift_i16_lsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 8 x i16> poison, i16 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 8 x i16> [[SPLAT_SPLATINSERT]], <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
+// CHECK-NEXT: [[SHR:%.*]] = ashr <vscale x 8 x i16> [[SPLAT_SPLAT]], [[A:%.*]]
+// CHECK-NEXT: ret <vscale x 8 x i16> [[SHR]]
+//
+svint16_t rshift_i16_lsplat(svint16_t a, int16_t b) {
+ return b >> a;
+}
+
+// CHECK-LABEL: @lshift_u16_rsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 8 x i16> poison, i16 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 8 x i16> [[SPLAT_SPLATINSERT]], <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
+// CHECK-NEXT: [[SHL:%.*]] = shl <vscale x 8 x i16> [[A:%.*]], [[SPLAT_SPLAT]]
+// CHECK-NEXT: ret <vscale x 8 x i16> [[SHL]]
+//
+svuint16_t lshift_u16_rsplat(svuint16_t a, uint16_t b) {
+ return a << b;
+}
+
+// CHECK-LABEL: @lshift_u16_lsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 8 x i16> poison, i16 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 8 x i16> [[SPLAT_SPLATINSERT]], <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
+// CHECK-NEXT: [[SHL:%.*]] = shl <vscale x 8 x i16> [[SPLAT_SPLAT]], [[A:%.*]]
+// CHECK-NEXT: ret <vscale x 8 x i16> [[SHL]]
+//
+svuint16_t lshift_u16_lsplat(svuint16_t a, uint16_t b) {
+ return b << a;
+}
+
+// CHECK-LABEL: @rshift_u16_rsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 8 x i16> poison, i16 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 8 x i16> [[SPLAT_SPLATINSERT]], <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
+// CHECK-NEXT: [[SHR:%.*]] = lshr <vscale x 8 x i16> [[A:%.*]], [[SPLAT_SPLAT]]
+// CHECK-NEXT: ret <vscale x 8 x i16> [[SHR]]
+//
+svuint16_t rshift_u16_rsplat(svuint16_t a, uint16_t b) {
+ return a >> b;
+}
+
+// CHECK-LABEL: @rshift_u16_lsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 8 x i16> poison, i16 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 8 x i16> [[SPLAT_SPLATINSERT]], <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
+// CHECK-NEXT: [[SHR:%.*]] = lshr <vscale x 8 x i16> [[SPLAT_SPLAT]], [[A:%.*]]
+// CHECK-NEXT: ret <vscale x 8 x i16> [[SHR]]
+//
+svuint16_t rshift_u16_lsplat(svuint16_t a, uint16_t b) {
+ return b >> a;
+}
+
+// CHECK-LABEL: @lshift_i32_rsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 4 x i32> poison, i32 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[SPLAT_SPLATINSERT]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
+// CHECK-NEXT: [[SHL:%.*]] = shl <vscale x 4 x i32> [[A:%.*]], [[SPLAT_SPLAT]]
+// CHECK-NEXT: ret <vscale x 4 x i32> [[SHL]]
+//
+svint32_t lshift_i32_rsplat(svint32_t a, int32_t b) {
+ return a << b;
+}
+
+// CHECK-LABEL: @lshift_i32_lsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 4 x i32> poison, i32 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[SPLAT_SPLATINSERT]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
+// CHECK-NEXT: [[SHL:%.*]] = shl <vscale x 4 x i32> [[SPLAT_SPLAT]], [[A:%.*]]
+// CHECK-NEXT: ret <vscale x 4 x i32> [[SHL]]
+//
+svint32_t lshift_i32_lsplat(svint32_t a, int32_t b) {
+ return b << a;
+}
+
+// CHECK-LABEL: @rshift_i32_rsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 4 x i32> poison, i32 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[SPLAT_SPLATINSERT]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
+// CHECK-NEXT: [[SHR:%.*]] = ashr <vscale x 4 x i32> [[A:%.*]], [[SPLAT_SPLAT]]
+// CHECK-NEXT: ret <vscale x 4 x i32> [[SHR]]
+//
+svint32_t rshift_i32_rsplat(svint32_t a, int32_t b) {
+ return a >> b;
+}
+
+// CHECK-LABEL: @rshift_i32_lsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 4 x i32> poison, i32 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[SPLAT_SPLATINSERT]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
+// CHECK-NEXT: [[SHR:%.*]] = ashr <vscale x 4 x i32> [[SPLAT_SPLAT]], [[A:%.*]]
+// CHECK-NEXT: ret <vscale x 4 x i32> [[SHR]]
+//
+svint32_t rshift_i32_lsplat(svint32_t a, int32_t b) {
+ return b >> a;
+}
+
+// CHECK-LABEL: @lshift_u32_rsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 4 x i32> poison, i32 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[SPLAT_SPLATINSERT]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
+// CHECK-NEXT: [[SHL:%.*]] = shl <vscale x 4 x i32> [[A:%.*]], [[SPLAT_SPLAT]]
+// CHECK-NEXT: ret <vscale x 4 x i32> [[SHL]]
+//
+svuint32_t lshift_u32_rsplat(svuint32_t a, uint32_t b) {
+ return a << b;
+}
+
+// CHECK-LABEL: @lshift_u32_lsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 4 x i32> poison, i32 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[SPLAT_SPLATINSERT]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
+// CHECK-NEXT: [[SHL:%.*]] = shl <vscale x 4 x i32> [[SPLAT_SPLAT]], [[A:%.*]]
+// CHECK-NEXT: ret <vscale x 4 x i32> [[SHL]]
+//
+svuint32_t lshift_u32_lsplat(svuint32_t a, uint32_t b) {
+ return b << a;
+}
+
+// CHECK-LABEL: @rshift_u32_rsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 4 x i32> poison, i32 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[SPLAT_SPLATINSERT]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
+// CHECK-NEXT: [[SHR:%.*]] = lshr <vscale x 4 x i32> [[A:%.*]], [[SPLAT_SPLAT]]
+// CHECK-NEXT: ret <vscale x 4 x i32> [[SHR]]
+//
+svuint32_t rshift_u32_rsplat(svuint32_t a, uint32_t b) {
+ return a >> b;
+}
+
+// CHECK-LABEL: @rshift_u32_lsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 4 x i32> poison, i32 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[SPLAT_SPLATINSERT]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
+// CHECK-NEXT: [[SHR:%.*]] = lshr <vscale x 4 x i32> [[SPLAT_SPLAT]], [[A:%.*]]
+// CHECK-NEXT: ret <vscale x 4 x i32> [[SHR]]
+//
+svuint32_t rshift_u32_lsplat(svuint32_t a, uint32_t b) {
+ return b >> a;
+}
+
+// CHECK-LABEL: @lshift_i64_rsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[SPLAT_SPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
+// CHECK-NEXT: [[SHL:%.*]] = shl <vscale x 2 x i64> [[A:%.*]], [[SPLAT_SPLAT]]
+// CHECK-NEXT: ret <vscale x 2 x i64> [[SHL]]
+//
+svint64_t lshift_i64_rsplat(svint64_t a, int64_t b) {
+ return a << b;
+}
+
+// CHECK-LABEL: @lshift_i64_lsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[SPLAT_SPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
+// CHECK-NEXT: [[SHL:%.*]] = shl <vscale x 2 x i64> [[SPLAT_SPLAT]], [[A:%.*]]
+// CHECK-NEXT: ret <vscale x 2 x i64> [[SHL]]
+//
+svint64_t lshift_i64_lsplat(svint64_t a, int64_t b) {
+ return b << a;
+}
+
+// CHECK-LABEL: @rshift_i64_rsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[SPLAT_SPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
+// CHECK-NEXT: [[SHR:%.*]] = ashr <vscale x 2 x i64> [[A:%.*]], [[SPLAT_SPLAT]]
+// CHECK-NEXT: ret <vscale x 2 x i64> [[SHR]]
+//
+svint64_t rshift_i64_rsplat(svint64_t a, int64_t b) {
+ return a >> b;
+}
+
+// CHECK-LABEL: @rshift_i64_lsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[SPLAT_SPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
+// CHECK-NEXT: [[SHR:%.*]] = ashr <vscale x 2 x i64> [[SPLAT_SPLAT]], [[A:%.*]]
+// CHECK-NEXT: ret <vscale x 2 x i64> [[SHR]]
+//
+svint64_t rshift_i64_lsplat(svint64_t a, int64_t b) {
+ return b >> a;
+}
+
+// CHECK-LABEL: @lshift_u64_rsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[SPLAT_SPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
+// CHECK-NEXT: [[SHL:%.*]] = shl <vscale x 2 x i64> [[A:%.*]], [[SPLAT_SPLAT]]
+// CHECK-NEXT: ret <vscale x 2 x i64> [[SHL]]
+//
+svuint64_t lshift_u64_rsplat(svuint64_t a, uint64_t b) {
+ return a << b;
+}
+
+// CHECK-LABEL: @lshift_u64_lsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[SPLAT_SPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
+// CHECK-NEXT: [[SHL:%.*]] = shl <vscale x 2 x i64> [[SPLAT_SPLAT]], [[A:%.*]]
+// CHECK-NEXT: ret <vscale x 2 x i64> [[SHL]]
+//
+svuint64_t lshift_u64_lsplat(svuint64_t a, uint64_t b) {
+ return b << a;
+}
+
+// CHECK-LABEL: @rshift_u64_rsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[SPLAT_SPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
+// CHECK-NEXT: [[SHR:%.*]] = lshr <vscale x 2 x i64> [[A:%.*]], [[SPLAT_SPLAT]]
+// CHECK-NEXT: ret <vscale x 2 x i64> [[SHR]]
+//
+svuint64_t rshift_u64_rsplat(svuint64_t a, uint64_t b) {
+ return a >> b;
+}
+
+// CHECK-LABEL: @rshift_u64_lsplat(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[B:%.*]], i32 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[SPLAT_SPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
+// CHECK-NEXT: [[SHR:%.*]] = lshr <vscale x 2 x i64> [[SPLAT_SPLAT]], [[A:%.*]]
+// CHECK-NEXT: ret <vscale x 2 x i64> [[SHR]]
+//
+svuint64_t rshift_u64_lsplat(svuint64_t a, uint64_t b) {
+ return b >> a;
+}
diff --git a/clang/test/Sema/aarch64-sve-vector-shift-ops.c b/clang/test/Sema/aarch64-sve-vector-shift-ops.c
new file mode 100644
index 0000000000000..ed0f232bd0a42
--- /dev/null
+++ b/clang/test/Sema/aarch64-sve-vector-shift-ops.c
@@ -0,0 +1,583 @@
+// RUN: %clang_cc1 -verify -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -fsyntax-only %s
+
+// REQUIRES: aarch64-registered-target
+
+#include <arm_sve.h>
+
+void lshift(svint8_t i8, svint16_t i16, svint32_t i32, svint64_t i64,
+ svuint8_t u8, svuint16_t u16, svuint32_t u32, svuint64_t u64,
+ svfloat16_t f16, svfloat32_t f32, svfloat64_t f64,
+ svbool_t b) {
+ (void)(b << b); // expected-error{{invalid operands to binary expression}}
+
+ (void)(i8 << b); // expected-error{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(i8 << f32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(i8 << f64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(u8 << f32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(u8 << f64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(i16 << f32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(i16 << f64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(u16 << f32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(u16 << f64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(i32 << f32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(i32 << f64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(u32 << f32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(u32 << f64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(i64 << f32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(i64 << f64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(u64 << f32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(u64 << f64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (void)(f16 << i8); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f16 << i16); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f16 << i32); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f16 << i64); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f16 << u8); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f16 << u32); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f16 << u64); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f16 << f32); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f16 << f64); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f16 << 0.f); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f16 << 0.); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+
+ (void)(f32 << b); // expected-error{{invalid operands to binary expression}}
+ (void)(f32 << i8); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f32 << i16); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f32 << i32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f32 << i64); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f32 << u8); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f32 << u16); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f32 << u64); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f32 << f16); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f32 << f64); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f32 << 0.); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+
+ (void)(f64 << b); // expected-error{{invalid operands to binary expression}}
+ (void)(f64 << i8); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(f64 << i16); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(f64 << i32); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(f64 << i64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(f64 << u8); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(f64 << u16); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(f64 << u32); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(f64 << f16); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(f64 << f32); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(f64 << 0.f); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+
+ (void)(b << i8); // expected-error{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f32 << i8); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f64 << i8); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f32 << u8); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f64 << u8); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f32 << i16); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f64 << i16); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f32 << u16); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f64 << u16); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f32 << i32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f64 << i32); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f32 << u32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f64 << u32); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f32 << i64); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f64 << i64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f32 << u64); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f64 << u64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (void)(i8 << f16); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(i16 << f16); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(i32 << f16); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(i64 << f16); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(u8 << f16); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(u32 << f16); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(u64 << f16); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f32 << f16); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f64 << f16); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (void)(i8 << f32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(i16 << f32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(i32 << f32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(i64 << f32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(u8 << f32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(u16 << f32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(u64 << f32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f16 << f32); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f64 << f32); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(0. << f32); // expected-error{{used type 'double' where integer is required}}
+
+ (void)(b << f64); // expected-error{{invalid operands to binary expression}}
+ (void)(i8 << f64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(i16 << f64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(i32 << f64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(i64 << f64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(u8 << f64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(u16 << f64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(u32 << f64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(f16 << f64); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f32 << f64); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(0.f << f64); // expected-error{{used type 'float' where integer is required}}
+}
+
+void rshift(svint8_t i8, svint16_t i16, svint32_t i32, svint64_t i64,
+ svuint8_t u8, svuint16_t u16, svuint32_t u32, svuint64_t u64,
+ svfloat16_t f16, svfloat32_t f32, svfloat64_t f64,
+ svbool_t b) {
+ (void)(b >> b); // expected-error{{invalid operands to binary expression}}
+
+ (void)(i8 >> b); // expected-error{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(i8 >> f32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(i8 >> f64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(u8 >> f32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(u8 >> f64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(i16 >> f32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(i16 >> f64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(u16 >> f32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(u16 >> f64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(i32 >> f32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(i32 >> f64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(u32 >> f32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(u32 >> f64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(i64 >> f32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(i64 >> f64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(u64 >> f32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(u64 >> f64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (void)(f16 >> i8); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f16 >> i16); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f16 >> i32); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f16 >> i64); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f16 >> u8); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f16 >> u32); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f16 >> u64); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f16 >> f32); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f16 >> f64); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f16 >> 0.f); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f16 >> 0.); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+
+ (void)(f32 >> b); // expected-error{{invalid operands to binary expression}}
+ (void)(f32 >> i8); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f32 >> i16); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f32 >> i32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f32 >> i64); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f32 >> u8); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f32 >> u16); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f32 >> u64); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f32 >> f16); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f32 >> f64); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f32 >> 0.); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+
+ (void)(f64 >> b); // expected-error{{invalid operands to binary expression}}
+ (void)(f64 >> i8); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(f64 >> i16); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(f64 >> i32); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(f64 >> i64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(f64 >> u8); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(f64 >> u16); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(f64 >> u32); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(f64 >> f16); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(f64 >> f32); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(f64 >> 0.f); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+
+ (void)(b >> i8); // expected-error{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f32 >> i8); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f64 >> i8); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f32 >> u8); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f64 >> u8); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f32 >> i16); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f64 >> i16); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f32 >> u16); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f64 >> u16); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f32 >> i32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f64 >> i32); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f32 >> u32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f64 >> u32); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f32 >> i64); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f64 >> i64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (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 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f32 >> u64); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f64 >> u64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (void)(i8 >> f16); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(i16 >> f16); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(i32 >> f16); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(i64 >> f16); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(u8 >> f16); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(u32 >> f16); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(u64 >> f16); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f32 >> f16); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f64 >> f16); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_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{{invalid operands to binary expression}}
+ (void)(i8 >> f32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(i16 >> f32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(i32 >> f32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(i64 >> f32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(u8 >> f32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(u16 >> f32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(u64 >> f32); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(f16 >> f32); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f64 >> f32); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(0. >> f32); // expected-error{{used type 'double' where integer is required}}
+
+ (void)(b >> f64); // expected-error{{invalid operands to binary expression}}
+ (void)(i8 >> f64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(i16 >> f64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(i32 >> f64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(i64 >> f64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(u8 >> f64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(u16 >> f64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(u32 >> f64); // expected-error{{used type 'svfloat64_t' (aka '__SVFloat64_t') where integer is required}}
+ (void)(f16 >> f64); // expected-error{{used type 'svfloat16_t' (aka '__SVFloat16_t') where integer is required}}
+ (void)(f32 >> f64); // expected-error{{used type 'svfloat32_t' (aka '__SVFloat32_t') where integer is required}}
+ (void)(0.f >> f64); // expected-error{{used type 'float' where integer is required}}
+}
diff --git a/clang/test/Sema/sizeless-1.c b/clang/test/Sema/sizeless-1.c
index b77ee479f1045..2ee1ca9e87165 100644
--- a/clang/test/Sema/sizeless-1.c
+++ b/clang/test/Sema/sizeless-1.c
@@ -198,14 +198,9 @@ void func(int sel) {
__real init_int8; // expected-error {{invalid type 'svint8_t'}}
__imag init_int8; // expected-error {{invalid type 'svint8_t'}}
- local_int8 << init_int8; // expected-error {{invalid operands to binary expression}}
- local_int8 >> init_int8; // expected-error {{invalid operands to binary expression}}
local_int8 &&init_int8; // expected-error {{invalid operands to binary expression}}
local_int8 || init_int8; // expected-error {{invalid operands to binary expression}}
- local_int8 <<= init_int8; // expected-error {{invalid operands to binary expression}}
- local_int8 >>= init_int8; // expected-error {{invalid operands to binary expression}}
-
local_int8 + 0; // expected-error {{invalid operands to binary expression}}
local_int8 - 0; // expected-error {{invalid operands to binary expression}}
local_int8 * 0; // expected-error {{invalid operands to binary expression}}
@@ -214,8 +209,6 @@ void func(int sel) {
local_int8 & 0; // expected-error {{invalid operands to binary expression}}
local_int8 | 0; // expected-error {{invalid operands to binary expression}}
local_int8 ^ 0; // expected-error {{invalid operands to binary expression}}
- local_int8 << 0; // expected-error {{invalid operands to binary expression}}
- local_int8 >> 0; // expected-error {{invalid operands to binary expression}}
local_int8 < 0; // expected-error {{invalid operands to binary expression}}
local_int8 <= 0; // expected-error {{invalid operands to binary expression}}
local_int8 == 0; // expected-error {{invalid operands to binary expression}}
diff --git a/clang/test/SemaCXX/sizeless-1.cpp b/clang/test/SemaCXX/sizeless-1.cpp
index fa29e1582cd37..1e6987955cc7a 100644
--- a/clang/test/SemaCXX/sizeless-1.cpp
+++ b/clang/test/SemaCXX/sizeless-1.cpp
@@ -210,14 +210,9 @@ void func(int sel) {
__real init_int8; // expected-error {{invalid type 'svint8_t'}}
__imag init_int8; // expected-error {{invalid type 'svint8_t'}}
- local_int8 << init_int8; // expected-error {{invalid operands to binary expression}}
- local_int8 >> init_int8; // expected-error {{invalid operands to binary expression}}
local_int8 &&init_int8; // expected-error {{invalid operands to binary expression}} expected-error {{not contextually convertible}}
local_int8 || init_int8; // expected-error {{invalid operands to binary expression}} expected-error {{not contextually convertible}}
- local_int8 <<= init_int8; // expected-error {{invalid operands to binary expression}}
- local_int8 >>= init_int8; // expected-error {{invalid operands to binary expression}}
-
local_int8 + 0; // expected-error {{invalid operands to binary expression}}
local_int8 - 0; // expected-error {{invalid operands to binary expression}}
local_int8 * 0; // expected-error {{invalid operands to binary expression}}
@@ -226,8 +221,6 @@ void func(int sel) {
local_int8 & 0; // expected-error {{invalid operands to binary expression}}
local_int8 | 0; // expected-error {{invalid operands to binary expression}}
local_int8 ^ 0; // expected-error {{invalid operands to binary expression}}
- local_int8 << 0; // expected-error {{invalid operands to binary expression}}
- local_int8 >> 0; // expected-error {{invalid operands to binary expression}}
local_int8 < 0; // expected-error {{invalid operands to binary expression}}
local_int8 <= 0; // expected-error {{invalid operands to binary expression}}
local_int8 == 0; // expected-error {{invalid operands to binary expression}}
More information about the cfe-commits
mailing list