diff --git a/clang/lib/Sema/SPIRVBuiltins.td b/clang/lib/Sema/SPIRVBuiltins.td index e226e3b223e17..d7c158e499d15 100644 --- a/clang/lib/Sema/SPIRVBuiltins.td +++ b/clang/lib/Sema/SPIRVBuiltins.td @@ -849,19 +849,6 @@ foreach InType = TLUnsignedInts.List in { } } -foreach AS = [GlobalAS, LocalAS, PrivateAS] in { - def : SPVBuiltin<"GenericCastToPtrExplicit", [PointerType, PointerType], Attr.Const>; -} - -foreach Ty = [Void, ConstType] in { - def : SPVBuiltin<"GenericCastToPtrExplicit_ToGlobal", [PointerType, PointerType, Int], Attr.Const>; - def : SPVBuiltin<"GenericCastToPtrExplicit_ToLocal", [PointerType, PointerType, Int], Attr.Const>; - def : SPVBuiltin<"GenericCastToPtrExplicit_ToPrivate", [PointerType, PointerType, Int], Attr.Const>; - def : SPVBuiltin<"GenericCastToPtr_ToGlobal", [PointerType, PointerType, Int], Attr.Const>; - def : SPVBuiltin<"GenericCastToPtr_ToLocal", [PointerType, PointerType, Int], Attr.Const>; - def : SPVBuiltin<"GenericCastToPtr_ToPrivate", [PointerType, PointerType, Int], Attr.Const>; -} - foreach Type = TLFloat.List in { foreach v = [2, 3, 4, 8, 16] in { def : SPVBuiltin<"VectorTimesScalar", [VectorType, VectorType, Type], Attr.Const>; diff --git a/sycl/include/sycl/detail/address_space_cast.hpp b/sycl/include/sycl/detail/address_space_cast.hpp index 3d878631900fd..672e59113ebc7 100644 --- a/sycl/include/sycl/detail/address_space_cast.hpp +++ b/sycl/include/sycl/detail/address_space_cast.hpp @@ -13,6 +13,10 @@ #include +#ifdef __SYCL_DEVICE_ONLY__ +#include <__clang_spirv_builtins.h> +#endif + namespace sycl { inline namespace _V1 {