diff --git a/llvm/lib/SYCLLowerIR/ESIMD/ESIMDVerifier.cpp b/llvm/lib/SYCLLowerIR/ESIMD/ESIMDVerifier.cpp index 926f66e10a147..f96ee7b4fed85 100644 --- a/llvm/lib/SYCLLowerIR/ESIMD/ESIMDVerifier.cpp +++ b/llvm/lib/SYCLLowerIR/ESIMD/ESIMDVerifier.cpp @@ -54,7 +54,8 @@ static const char *LegalSYCLFunctions[] = { "^sycl::_V1::ext::oneapi::sub_group::.+", "^sycl::_V1::ext::oneapi::experimental::spec_constant<.+>::.+", "^sycl::_V1::ext::oneapi::experimental::this_sub_group", - "^sycl::_V1::ext::oneapi::experimental::bfloat16::.+"}; + "^sycl::_V1::ext::oneapi::experimental::bfloat16::.+", + "^sycl::_V1::ext::oneapi::experimental::if_architecture_is"}; static const char *LegalSYCLFunctionsInStatelessMode[] = { "^sycl::_V1::multi_ptr<.+>::get", diff --git a/sycl/include/sycl/ext/oneapi/experimental/device_architecture.hpp b/sycl/include/sycl/ext/oneapi/experimental/device_architecture.hpp index 4fcfdb2036b43..61472815b404d 100644 --- a/sycl/include/sycl/ext/oneapi/experimental/device_architecture.hpp +++ b/sycl/include/sycl/ext/oneapi/experimental/device_architecture.hpp @@ -505,16 +505,16 @@ namespace ext::oneapi::experimental { template constexpr static auto if_architecture_is(T fnTrue, Args... args) { - static_assert(detail::allowable_aot_mode(), + static_assert(sycl::detail::allowable_aot_mode(), "The if_architecture_is function may only be used when AOT " "compiling with '-fsycl-targets=spir64_x86_64' or " "'-fsycl-targets=*_gpu_*'"); - if constexpr (detail::device_architecture_is()) { + if constexpr (sycl::detail::device_architecture_is()) { fnTrue(args...); - return detail::if_architecture_helper{}; + return sycl::detail::if_architecture_helper{}; } else { (void)fnTrue; - return detail::if_architecture_helper{}; + return sycl::detail::if_architecture_helper{}; } }