Skip to content

Commit c81828e

Browse files
[SYCL] Fix test failure due to size discrepancy in 32 and 64 bit environment (#2594)
Signed-off-by: Elizabeth Andrews <[email protected]>
1 parent f2e8e43 commit c81828e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

clang/test/SemaSYCL/args-size-overflow.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -fsyntax-only -Wsycl-strict -sycl-std=2020 -verify %s
1+
// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64 -internal-isystem %S/Inputs -fsyntax-only -Wsycl-strict -sycl-std=2020 -verify %s -DSPIR64
2+
// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir -internal-isystem %S/Inputs -fsyntax-only -Wsycl-strict -sycl-std=2020 -verify %s -DSPIR32
23

34
#include "sycl.hpp"
45
class Foo;
@@ -9,8 +10,11 @@ queue q;
910

1011
using Accessor =
1112
accessor<int, 1, cl::sycl::access::mode::read_write, cl::sycl::access::target::global_buffer>;
12-
13+
#ifdef SPIR64
1314
// expected-warning@Inputs/sycl.hpp:220 {{size of kernel arguments (7994 bytes) may exceed the supported maximum of 2048 bytes on some devices}}
15+
#elif SPIR32
16+
// expected-warning@Inputs/sycl.hpp:220 {{size of kernel arguments (7986 bytes) may exceed the supported maximum of 2048 bytes on some devices}}
17+
#endif
1418

1519
void use() {
1620
struct S {
@@ -25,4 +29,4 @@ void use() {
2529
// expected-note@+1 {{in instantiation of function template specialization}}
2630
h.single_task<class Foo>(L);
2731
});
28-
}
32+
}

0 commit comments

Comments
 (0)