Skip to content

Commit 8b90f85

Browse files
authored
[SYCL] Disable inlining in 'ID queries fit in int' test (#3751)
Signed-off-by: Sergey Kanaev <[email protected]>
1 parent fd50369 commit 8b90f85

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed
Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
1-
// RUN: %clangxx -fsycl -fsycl-id-queries-fit-in-int -O0 -c -S -emit-llvm -o %t.ll %s
1+
// RUN: %clangxx -fsycl-device-only -fsycl-id-queries-fit-in-int -fno-sycl-early-optimizations -S -o %t.ll %s
22
// RUN: FileCheck %s --input-file %t.ll
33

44
#include <CL/sycl.hpp>
55

66
using namespace sycl;
77

8-
// CHECK: define dso_local i32 @main() {{.*}} {
9-
int main() {
10-
item<1, true> TestItem = detail::Builder::createItem<1, true>({3}, {2}, {1});
8+
// CHECK: define {{.*}}dso_local spir_func void @{{.*}}testItem{{.*}}(%"class.{{.*}}item"*{{.*}}%TestItem)
9+
SYCL_EXTERNAL void testItem(item<1> TestItem) {
1110
// CHECK: call void @llvm.assume(i1 {{.*}})
1211
int Id = TestItem.get_id(0);
1312
// CHECK: call void @llvm.assume(i1 {{.*}})
1413
int Range = TestItem.get_range(0);
1514
// CHECK: call void @llvm.assume(i1 {{.*}})
1615
int LinearId = TestItem.get_linear_id();
16+
}
1717

18-
cl::sycl::nd_item<1> TestNDItem =
19-
detail::Builder::createNDItem<1>(detail::Builder::createItem<1, false>({4}, {2}),
20-
detail::Builder::createItem<1, false>({2}, {0}),
21-
detail::Builder::createGroup<1>({4}, {2}, {1}));
22-
18+
// CHECK: define {{.*}}dso_local spir_func void @{{.*}}testNDItem{{.*}}(%"class.{{.*}}nd_item"*{{.*}}%TestNDItem)
19+
SYCL_EXTERNAL void testNDItem(nd_item<1> TestNDItem) {
2320
// CHECK: call void @llvm.assume(i1 {{.*}})
2421
int GlobalId = TestNDItem.get_global_id(0);
2522
// CHECK: call void @llvm.assume(i1 {{.*}})
@@ -39,13 +36,10 @@ int main() {
3936
// CHECK: call void @llvm.assume(i1 {{.*}})
4037
int LocalRange = TestNDItem.get_local_range(0);
4138

39+
// CHECK: call void @llvm.assume(i1 {{.*}})
4240
int GlobalIdConverted = TestNDItem.get_global_id();
4341
// CHECK: call void @llvm.assume(i1 {{.*}})
4442
int LocalIdConverted = TestNDItem.get_local_id();
4543
// CHECK: call void @llvm.assume(i1 {{.*}})
4644
int OffsetConferted = TestNDItem.get_offset();
47-
// CHECK: call void @llvm.assume(i1 {{.*}})
48-
49-
return 0;
5045
}
51-
// CHECK: }

0 commit comments

Comments
 (0)