Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion llvm/lib/SYCLLowerIR/ESIMD/ESIMDVerifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -505,16 +505,16 @@ namespace ext::oneapi::experimental {

template <architecture... Archs, typename T, typename... Args>
constexpr static auto if_architecture_is(T fnTrue, Args... args) {
static_assert(detail::allowable_aot_mode<Archs...>(),
static_assert(sycl::detail::allowable_aot_mode<Archs...>(),
"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<Archs...>()) {
if constexpr (sycl::detail::device_architecture_is<Archs...>()) {
fnTrue(args...);
return detail::if_architecture_helper<false>{};
return sycl::detail::if_architecture_helper<false>{};
} else {
(void)fnTrue;
return detail::if_architecture_helper<true>{};
return sycl::detail::if_architecture_helper<true>{};
}
}

Expand Down