-
Notifications
You must be signed in to change notification settings - Fork 750
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SYCL] Disable dereferenceable attribute for SPIRV emitted from SYCL …
…1.2.1. Signed-off-by: Vladimir Lazarev <vladimir.lazarev@intel.com>
- Loading branch information
1 parent
d35c08f
commit 70774e8
Showing
2 changed files
with
27 additions
and
1 deletion.
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
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,20 @@ | ||
// RUN: %clang -cc1 -triple spir64-unknown-linux-sycldevice -std=c++11 -fsycl-is-device -S -emit-spirv -x c++ %s -o %t.spv | ||
// RUN: llvm-spirv %t.spv -to-text -o %t.txt | ||
// RUN: FileCheck < %t.txt %s --check-prefix=CHECK | ||
|
||
template <typename name, typename Func> | ||
__attribute__((sycl_kernel)) void kernel_single_task(Func kernelFunc) { | ||
kernelFunc(); | ||
} | ||
struct foo { | ||
static void bar(int &val) { | ||
val = 1; | ||
} | ||
}; | ||
int main() { | ||
kernel_single_task<class fake_kernel>([]() { int var; foo::bar(var); }); | ||
return 0; | ||
} | ||
|
||
// CHECK: 3 Name [[os_ID:[0-9]+]] "val" | ||
// CHECK-NOT: Decorate {{[0-9]+}} MaxByteOffset |