diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index 7bddf754263e..c44d9dc588bf 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -11384,7 +11384,7 @@ def warn_sycl_kernel_return_type : Warning< InGroup; def err_ext_int_bad_size : Error<"%select{signed|unsigned}0 _ExtInt must " - "have a bit size of at least %select{2|1}0">; + "have a bit size of at least 1">; def err_ext_int_max_size : Error<"%select{signed|unsigned}0 _ExtInt of bit " "sizes greater than %1 not supported">; def err_esimd_glob_cant_init : Error< diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp index 734024149bbb..93ea6bdd219c 100644 --- a/clang/lib/CodeGen/CGExprConstant.cpp +++ b/clang/lib/CodeGen/CGExprConstant.cpp @@ -1706,7 +1706,9 @@ llvm::Constant *ConstantEmitter::emitForMemory(CodeGenModule &CGM, // Zero-extend bool. if (C->getType()->isIntegerTy(1)) { llvm::Type *boolTy = CGM.getTypes().ConvertTypeForMem(destType); - return llvm::ConstantExpr::getZExt(C, boolTy); + if (C->getType()->getScalarSizeInBits() < boolTy->getScalarSizeInBits()) { + return llvm::ConstantExpr::getZExt(C, boolTy); + } } return C; diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp index aa139728fc83..cd10969c7c06 100644 --- a/clang/lib/Sema/SemaType.cpp +++ b/clang/lib/Sema/SemaType.cpp @@ -2262,13 +2262,9 @@ QualType Sema::BuildExtIntType(bool IsUnsigned, Expr *BitWidth, return QualType(); int64_t NumBits = Bits.getSExtValue(); - if (!IsUnsigned && NumBits < 2) { - Diag(Loc, diag::err_ext_int_bad_size) << 0; - return QualType(); - } - if (IsUnsigned && NumBits < 1) { - Diag(Loc, diag::err_ext_int_bad_size) << 1; + if (NumBits < 1) { + Diag(Loc, diag::err_ext_int_bad_size) << ((IsUnsigned) ? 1 : 0); return QualType(); } diff --git a/clang/test/SemaCXX/ext-int.cpp b/clang/test/SemaCXX/ext-int.cpp index a3e8dd82fc5d..04e25deb286d 100644 --- a/clang/test/SemaCXX/ext-int.cpp +++ b/clang/test/SemaCXX/ext-int.cpp @@ -17,13 +17,12 @@ _ExtInt(33) Declarations(_ExtInt(48) &Param) { // Useable in params and returns. unsigned _ExtInt(5) e = 5; _ExtInt(5) unsigned f; - _ExtInt(-3) g; // expected-error{{signed _ExtInt must have a bit size of at least 2}} - _ExtInt(0) h; // expected-error{{signed _ExtInt must have a bit size of at least 2}} - _ExtInt(1) i; // expected-error{{signed _ExtInt must have a bit size of at least 2}} - _ExtInt(2) j;; + _ExtInt(-3) g; // expected-error{{signed _ExtInt must have a bit size of at least 1}} + _ExtInt(0) h; // expected-error{{signed _ExtInt must have a bit size of at least 1}} + _ExtInt(1) j;; unsigned _ExtInt(0) k;// expected-error{{unsigned _ExtInt must have a bit size of at least 1}} unsigned _ExtInt(1) l; - signed _ExtInt(1) m; // expected-error{{signed _ExtInt must have a bit size of at least 2}} + signed _ExtInt(0) m; // expected-error{{signed _ExtInt must have a bit size of at least 1}} constexpr _ExtInt(6) n = 33; // expected-warning{{implicit conversion from 'int' to 'const _ExtInt(6)' changes value from 33 to -31}} constexpr _ExtInt(7) o = 33; @@ -33,18 +32,15 @@ _ExtInt(33) Declarations(_ExtInt(48) &Param) { // Useable in params and returns. unsigned _ExtInt(0xFFFFFFFFFF) q; // expected-error {{unsigned _ExtInt of bit sizes greater than 16777215 not supported}} // Ensure template params are instantiated correctly. - // expected-error@5{{signed _ExtInt must have a bit size of at least 2}} + // expected-error@5{{signed _ExtInt must have a bit size of at least 1}} // expected-error@6{{unsigned _ExtInt must have a bit size of at least 1}} // expected-note@+1{{in instantiation of template class }} HasExtInt<-1> r; - // expected-error@5{{signed _ExtInt must have a bit size of at least 2}} + // expected-error@5{{signed _ExtInt must have a bit size of at least 1}} // expected-error@6{{unsigned _ExtInt must have a bit size of at least 1}} // expected-note@+1{{in instantiation of template class }} HasExtInt<0> s; - // expected-error@5{{signed _ExtInt must have a bit size of at least 2}} - // expected-note@+1{{in instantiation of template class }} HasExtInt<1> t; - HasExtInt<2> u; _ExtInt(-3.0) v; // expected-error {{integral constant expression must have integral or unscoped enumeration type, not 'double'}} _ExtInt(3.0) x; // expected-error {{integral constant expression must have integral or unscoped enumeration type, not 'double'}} diff --git a/sycl/include/CL/__spirv/spirv_ops.hpp b/sycl/include/CL/__spirv/spirv_ops.hpp index 18ef03cc7060..c39ec7ee87e0 100644 --- a/sycl/include/CL/__spirv/spirv_ops.hpp +++ b/sycl/include/CL/__spirv/spirv_ops.hpp @@ -289,96 +289,96 @@ __SYCL_CONVERGENT__ extern SYCL_EXTERNAL void __spirv_SubgroupBlockWriteINTEL(__attribute__((opencl_global)) uint64_t *Ptr, dataT Data) noexcept; template -extern SYCL_EXTERNAL ap_int -__spirv_FixedSqrtINTEL(ap_int a, bool S, int32_t I, int32_t rI, +extern SYCL_EXTERNAL __spv::ap_int +__spirv_FixedSqrtINTEL(__spv::ap_int a, bool S, int32_t I, int32_t rI, int32_t Quantization = 0, int32_t Overflow = 0) noexcept; template -extern SYCL_EXTERNAL ap_int -__spirv_FixedRecipINTEL(ap_int a, bool S, int32_t I, int32_t rI, +extern SYCL_EXTERNAL __spv::ap_int +__spirv_FixedRecipINTEL(__spv::ap_int a, bool S, int32_t I, int32_t rI, int32_t Quantization = 0, int32_t Overflow = 0) noexcept; template -extern SYCL_EXTERNAL ap_int -__spirv_FixedRsqrtINTEL(ap_int a, bool S, int32_t I, int32_t rI, +extern SYCL_EXTERNAL __spv::ap_int +__spirv_FixedRsqrtINTEL(__spv::ap_int a, bool S, int32_t I, int32_t rI, int32_t Quantization = 0, int32_t Overflow = 0) noexcept; template -extern SYCL_EXTERNAL ap_int -__spirv_FixedSinINTEL(ap_int a, bool S, int32_t I, int32_t rI, +extern SYCL_EXTERNAL __spv::ap_int +__spirv_FixedSinINTEL(__spv::ap_int a, bool S, int32_t I, int32_t rI, int32_t Quantization = 0, int32_t Overflow = 0) noexcept; template -extern SYCL_EXTERNAL ap_int -__spirv_FixedCosINTEL(ap_int a, bool S, int32_t I, int32_t rI, +extern SYCL_EXTERNAL __spv::ap_int +__spirv_FixedCosINTEL(__spv::ap_int a, bool S, int32_t I, int32_t rI, int32_t Quantization = 0, int32_t Overflow = 0) noexcept; template -extern SYCL_EXTERNAL ap_int<2 * rW> -__spirv_FixedSinCosINTEL(ap_int a, bool S, int32_t I, int32_t rI, +extern SYCL_EXTERNAL __spv::ap_int<2 * rW> +__spirv_FixedSinCosINTEL(__spv::ap_int a, bool S, int32_t I, int32_t rI, int32_t Quantization = 0, int32_t Overflow = 0) noexcept; template -extern SYCL_EXTERNAL ap_int -__spirv_FixedSinPiINTEL(ap_int a, bool S, int32_t I, int32_t rI, +extern SYCL_EXTERNAL __spv::ap_int +__spirv_FixedSinPiINTEL(__spv::ap_int a, bool S, int32_t I, int32_t rI, int32_t Quantization = 0, int32_t Overflow = 0) noexcept; template -extern SYCL_EXTERNAL ap_int -__spirv_FixedCosPiINTEL(ap_int a, bool S, int32_t I, int32_t rI, +extern SYCL_EXTERNAL __spv::ap_int +__spirv_FixedCosPiINTEL(__spv::ap_int a, bool S, int32_t I, int32_t rI, int32_t Quantization = 0, int32_t Overflow = 0) noexcept; template -extern SYCL_EXTERNAL ap_int<2 * rW> -__spirv_FixedSinCosPiINTEL(ap_int a, bool S, int32_t I, int32_t rI, +extern SYCL_EXTERNAL __spv::ap_int<2 * rW> +__spirv_FixedSinCosPiINTEL(__spv::ap_int a, bool S, int32_t I, int32_t rI, int32_t Quantization = 0, int32_t Overflow = 0) noexcept; template -extern SYCL_EXTERNAL ap_int -__spirv_FixedLogINTEL(ap_int a, bool S, int32_t I, int32_t rI, +extern SYCL_EXTERNAL __spv::ap_int +__spirv_FixedLogINTEL(__spv::ap_int a, bool S, int32_t I, int32_t rI, int32_t Quantization = 0, int32_t Overflow = 0) noexcept; template -extern SYCL_EXTERNAL ap_int -__spirv_FixedExpINTEL(ap_int a, bool S, int32_t I, int32_t rI, +extern SYCL_EXTERNAL __spv::ap_int +__spirv_FixedExpINTEL(__spv::ap_int a, bool S, int32_t I, int32_t rI, int32_t Quantization = 0, int32_t Overflow = 0) noexcept; // In the following built-ins width of arbitrary precision integer type for // a floating point variable should be equal to sum of corresponding // exponent width E, mantissa width M and 1 for sign bit. I.e. WA = EA + MA + 1. template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatCastINTEL( - ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatCastINTEL( + __spv::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatCastFromIntINTEL( - ap_int A, int32_t Mout, bool FromSign = false, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatCastFromIntINTEL( + __spv::ap_int A, int32_t Mout, bool FromSign = false, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatCastToIntINTEL( - ap_int A, int32_t MA, bool ToSign = false, int32_t EnableSubnormals = 0, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatCastToIntINTEL( + __spv::ap_int A, int32_t MA, bool ToSign = false, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatAddINTEL( - ap_int A, int32_t MA, ap_int B, int32_t MB, int32_t Mout, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatAddINTEL( + __spv::ap_int A, int32_t MA, __spv::ap_int B, int32_t MB, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatSubINTEL( - ap_int A, int32_t MA, ap_int B, int32_t MB, int32_t Mout, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatSubINTEL( + __spv::ap_int A, int32_t MA, __spv::ap_int B, int32_t MB, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatMulINTEL( - ap_int A, int32_t MA, ap_int B, int32_t MB, int32_t Mout, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatMulINTEL( + __spv::ap_int A, int32_t MA, __spv::ap_int B, int32_t MB, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatDivINTEL( - ap_int A, int32_t MA, ap_int B, int32_t MB, int32_t Mout, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatDivINTEL( + __spv::ap_int A, int32_t MA, __spv::ap_int B, int32_t MB, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; @@ -386,174 +386,174 @@ extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatDivINTEL( // Rounding Accuracy. template extern SYCL_EXTERNAL bool -__spirv_ArbitraryFloatGTINTEL(ap_int A, int32_t MA, ap_int B, +__spirv_ArbitraryFloatGTINTEL(__spv::ap_int A, int32_t MA, __spv::ap_int B, int32_t MB) noexcept; template extern SYCL_EXTERNAL bool -__spirv_ArbitraryFloatGEINTEL(ap_int A, int32_t MA, ap_int B, +__spirv_ArbitraryFloatGEINTEL(__spv::ap_int A, int32_t MA, __spv::ap_int B, int32_t MB) noexcept; template extern SYCL_EXTERNAL bool -__spirv_ArbitraryFloatLTINTEL(ap_int A, int32_t MA, ap_int B, +__spirv_ArbitraryFloatLTINTEL(__spv::ap_int A, int32_t MA, __spv::ap_int B, int32_t MB) noexcept; template extern SYCL_EXTERNAL bool -__spirv_ArbitraryFloatLEINTEL(ap_int A, int32_t MA, ap_int B, +__spirv_ArbitraryFloatLEINTEL(__spv::ap_int A, int32_t MA, __spv::ap_int B, int32_t MB) noexcept; template extern SYCL_EXTERNAL bool -__spirv_ArbitraryFloatEQINTEL(ap_int A, int32_t MA, ap_int B, +__spirv_ArbitraryFloatEQINTEL(__spv::ap_int A, int32_t MA, __spv::ap_int B, int32_t MB) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatRecipINTEL( - ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatRecipINTEL( + __spv::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatRSqrtINTEL( - ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatRSqrtINTEL( + __spv::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatCbrtINTEL( - ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatCbrtINTEL( + __spv::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatHypotINTEL( - ap_int A, int32_t MA, ap_int B, int32_t MB, int32_t Mout, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatHypotINTEL( + __spv::ap_int A, int32_t MA, __spv::ap_int B, int32_t MB, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatSqrtINTEL( - ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatSqrtINTEL( + __spv::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatLogINTEL( - ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatLogINTEL( + __spv::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatLog2INTEL( - ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatLog2INTEL( + __spv::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatLog10INTEL( - ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatLog10INTEL( + __spv::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatLog1pINTEL( - ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatLog1pINTEL( + __spv::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatExpINTEL( - ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatExpINTEL( + __spv::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatExp2INTEL( - ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatExp2INTEL( + __spv::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatExp10INTEL( - ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatExp10INTEL( + __spv::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatExpm1INTEL( - ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatExpm1INTEL( + __spv::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatSinINTEL( - ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatSinINTEL( + __spv::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatCosINTEL( - ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatCosINTEL( + __spv::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; // Result value contains both values of sine and cosine and so has the size of // 2 * Wout where Wout is equal to (1 + Eout + Mout). template -extern SYCL_EXTERNAL ap_int<2 * Wout> __spirv_ArbitraryFloatSinCosINTEL( - ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, +extern SYCL_EXTERNAL __spv::ap_int<2 * Wout> __spirv_ArbitraryFloatSinCosINTEL( + __spv::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatSinPiINTEL( - ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatSinPiINTEL( + __spv::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatCosPiINTEL( - ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatCosPiINTEL( + __spv::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; // Result value contains both values of sine(A*pi) and cosine(A*pi) and so has // the size of 2 * Wout where Wout is equal to (1 + Eout + Mout). template -extern SYCL_EXTERNAL ap_int<2 * Wout> __spirv_ArbitraryFloatSinCosPiINTEL( - ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, +extern SYCL_EXTERNAL __spv::ap_int<2 * Wout> __spirv_ArbitraryFloatSinCosPiINTEL( + __spv::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatASinINTEL( - ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatASinINTEL( + __spv::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatASinPiINTEL( - ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatASinPiINTEL( + __spv::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatACosINTEL( - ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatACosINTEL( + __spv::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatACosPiINTEL( - ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatACosPiINTEL( + __spv::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatATanINTEL( - ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatATanINTEL( + __spv::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatATanPiINTEL( - ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatATanPiINTEL( + __spv::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatATan2INTEL( - ap_int A, int32_t MA, ap_int B, int32_t MB, int32_t Mout, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatATan2INTEL( + __spv::ap_int A, int32_t MA, __spv::ap_int B, int32_t MB, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatPowINTEL( - ap_int A, int32_t MA, ap_int B, int32_t MB, int32_t Mout, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatPowINTEL( + __spv::ap_int A, int32_t MA, __spv::ap_int B, int32_t MB, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatPowRINTEL( - ap_int A, int32_t MA, ap_int B, int32_t MB, int32_t Mout, +extern SYCL_EXTERNAL __spv::ap_int __spirv_ArbitraryFloatPowRINTEL( + __spv::ap_int A, int32_t MA, __spv::ap_int B, int32_t MB, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; @@ -561,8 +561,8 @@ extern SYCL_EXTERNAL ap_int __spirv_ArbitraryFloatPowRINTEL( // point number and `B` is arbitrary precision integer, i.e. its width doesn't // depend on sum of exponent and mantissa. template -extern SYCL_EXTERNAL ap_int -__spirv_ArbitraryFloatPowNINTEL(ap_int A, int32_t MA, ap_int B, +extern SYCL_EXTERNAL __spv::ap_int +__spirv_ArbitraryFloatPowNINTEL(__spv::ap_int A, int32_t MA, __spv::ap_int B, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; diff --git a/sycl/include/CL/__spirv/spirv_types.hpp b/sycl/include/CL/__spirv/spirv_types.hpp index 8adddff15539..f5e048bf2594 100644 --- a/sycl/include/CL/__spirv/spirv_types.hpp +++ b/sycl/include/CL/__spirv/spirv_types.hpp @@ -133,7 +133,9 @@ struct ConstantPipeStorage { }; // Arbitrary precision integer type +namespace __spv { template using ap_int = _ExtInt(Bits); +} // namespace _spv #endif // __SYCL_DEVICE_ONLY__ // This class does not have definition, it is only predeclared here.