Skip to content

Commit bee58c6

Browse files
author
Artem Gindinson
committed
Test generic address space alongside constant AS
Aims to test intel/llvm#5069. Signed-off-by: Artem Gindinson <artem.gindinson@intel.com>
1 parent f8fcf3b commit bee58c6

File tree

5 files changed

+33
-3
lines changed

5 files changed

+33
-3
lines changed

SYCL/Printf/char.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,16 @@
77
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
88
// RUN: %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER
99
// RUN: %ACC_RUN_PLACEHOLDER %t.out %ACC_CHECK_PLACEHOLDER
10+
// FIXME: Remove dedicated constant address space testing once generic AS
11+
// support is considered stable.
12+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.constant.out \
13+
// RUN: -DTEST_CONSTANT_AS
14+
// RUN: %CPU_RUN_PLACEHOLDER %t.constant.out %CPU_CHECK_PLACEHOLDER
15+
// RUN: %ACC_RUN_PLACEHOLDER %t.constant.out %ACC_CHECK_PLACEHOLDER
16+
//
1017
// FIXME: Enable on GPU once wchar_t* specification is supported there
1118
// RUNx: %GPU_RUN_PLACEHOLDER %t.out %GPU_CHECK_PLACEHOLDER
19+
// RUNx: %GPU_RUN_PLACEHOLDER %t.constant.out %GPU_CHECK_PLACEHOLDER
1220
//
1321
// CHECK: c=a
1422
// CHECK: literal strings: s=Hello ls=World!

SYCL/Printf/float.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
// RUN: %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER
99
// RUN: %GPU_RUN_PLACEHOLDER %t.out %GPU_CHECK_PLACEHOLDER
1010
// RUN: %ACC_RUN_PLACEHOLDER %t.out %ACC_CHECK_PLACEHOLDER
11+
// FIXME: Remove dedicated constant address space testing once generic AS
12+
// support is considered stable.
13+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.constant.out \
14+
// RUN: -DTEST_CONSTANT_AS
15+
// RUN: %CPU_RUN_PLACEHOLDER %t.constant.out %CPU_CHECK_PLACEHOLDER
16+
// RUN: %GPU_RUN_PLACEHOLDER %t.constant.out %GPU_CHECK_PLACEHOLDER
17+
// RUN: %ACC_RUN_PLACEHOLDER %t.constant.out %ACC_CHECK_PLACEHOLDER
1118
//
1219
// CHECK: float 3.140000e+00, 3.140000E+00
1320
// CHECK: double -6.813800e+00, -6.813800E+00

SYCL/Printf/helper.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#ifdef __SYCL_DEVICE_ONLY__
1+
#if defined(__SYCL_DEVICE_ONLY__) && defined(TEST_CONSTANT_AS)
22
// On device side, we have to put format string into a constant address space
3-
// FIXME: remove this header completly once we improve the toolchain to support
4-
// format strings in a non-constant address spaces
3+
// FIXME: remove this header completely once the toolchain's support for
4+
// non-constant address-spaced format string is stable.
55
#define FORMAT_STRING(X) static const __attribute__((opencl_constant)) char X[]
66
#else
77
#define FORMAT_STRING(X) static const char X[]

SYCL/Printf/int.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
// RUN: %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER
99
// RUN: %GPU_RUN_PLACEHOLDER %t.out %GPU_CHECK_PLACEHOLDER
1010
// RUN: %ACC_RUN_PLACEHOLDER %t.out %ACC_CHECK_PLACEHOLDER
11+
// FIXME: Remove dedicated constant address space testing once generic AS
12+
// support is considered stable.
13+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.constant.out \
14+
// RUN: -DTEST_CONSTANT_AS
15+
// RUN: %CPU_RUN_PLACEHOLDER %t.constant.out %CPU_CHECK_PLACEHOLDER
16+
// RUN: %GPU_RUN_PLACEHOLDER %t.constant.out %GPU_CHECK_PLACEHOLDER
17+
// RUN: %ACC_RUN_PLACEHOLDER %t.constant.out %ACC_CHECK_PLACEHOLDER
1118

1219
#include <CL/sycl.hpp>
1320

SYCL/Printf/percent-symbol.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,16 @@
77
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
88
// RUN: %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER
99
// RUN: %ACC_RUN_PLACEHOLDER %t.out %ACC_CHECK_PLACEHOLDER
10+
// FIXME: Remove dedicated constant address space testing once generic AS
11+
// support is considered stable.
12+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.constant.out \
13+
// RUN: -DTEST_CONSTANT_AS
14+
// RUN: %CPU_RUN_PLACEHOLDER %t.constant.out %CPU_CHECK_PLACEHOLDER
15+
// RUN: %ACC_RUN_PLACEHOLDER %t.constant.out %ACC_CHECK_PLACEHOLDER
16+
//
1017
// FIXME: Enable on GPU once %% conversion is supported there
1118
// RUNx: %GPU_RUN_PLACEHOLDER %t.out %GPU_CHECK_PLACEHOLDER
19+
// RUNx: %GPU_RUN_PLACEHOLDER %t.constant.out %GPU_CHECK_PLACEHOLDER
1220
//
1321
// CHECK: %c %s %d %i %o %x %X %u
1422
// CHECK-NEXT: %f %F %e %E %a %A %g %G %n %p

0 commit comments

Comments
 (0)