-
Notifications
You must be signed in to change notification settings - Fork 751
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SYCL][ESIMD] Require inlining of some noinline functions due to VC l…
…imitation (#12440) We need to inline some `nolinine` functions because VC doesn't support debugging/`O0`/`-g` in order to at least make user code do the right thing. Otherwise, we get wrong answers or GPU hangs. This change fixes 4 `-O0`/`-fno-inline-functions` test failures. --------- Signed-off-by: Nick Sarnie <nick.sarnie@intel.com> Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
- Loading branch information
Showing
4 changed files
with
84 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
llvm/test/SYCLLowerIR/ESIMD/assert_with_volatile_global.ll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
; This test locks down that assert functions are still noinline even if a | ||
; genx_volatile global is present. | ||
; | ||
; RUN: opt < %s -passes=LowerESIMD -S | FileCheck %s | ||
|
||
target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64" | ||
target triple = "spir64-unknown-unknown" | ||
|
||
%"class.sycl::_V1::ext::intel::esimd::simd" = type { %"class.sycl::_V1::ext::intel::esimd::detail::simd_obj_impl" } | ||
%"class.sycl::_V1::ext::intel::esimd::detail::simd_obj_impl" = type { <16 x float> } | ||
|
||
@va = dso_local global %"class.sycl::_V1::ext::intel::esimd::simd" zeroinitializer, align 64 #0 | ||
|
||
define dso_local spir_func void @__assert_fail(ptr addrspace(4) %ptr) { | ||
; CHECK: define dso_local spir_func void @__assert_fail(ptr addrspace(4) %ptr) #[[#ATTR:]] { | ||
ret void | ||
} | ||
|
||
define dso_local spir_func void @__devicelib_assert_fail(ptr addrspace(4) %ptr) { | ||
; CHECK: define dso_local spir_func void @__devicelib_assert_fail(ptr addrspace(4) %ptr) #[[#ATTR]] { | ||
ret void | ||
} | ||
|
||
; CHECK: attributes #[[#ATTR]] = { noinline } | ||
attributes #0 = { "genx_byte_offset"="192" "genx_volatile" } | ||
!0 = !{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters