Skip to content

Commit 20739b6

Browse files
committed
Add FE test
Signed-off-by: Mikhail Lychkov <[email protected]>
1 parent b3efac3 commit 20739b6

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Check that AlwaysInliner pass is always run for compilation of SYCL device
2+
// target code, even if all optimizations are disabled.
3+
4+
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm \
5+
// RUN: -mllvm -debug-pass=Structure %s -o - 2>&1 \
6+
// RUN: | FileCheck %s --check-prefix=CHECK-EARLYOPT
7+
// CHECK-EARLYOPT: Function Integration/Inlining
8+
// CHECK-EARLYOPT: Replace __sycl_allocateLocalMemory with allocation of memory in local address space
9+
10+
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm \
11+
// RUN: -mllvm -debug-pass=Structure %s -o - -disable-llvm-passes 2>&1 \
12+
// RUN: | FileCheck %s --check-prefix=CHECK-NOPASSES
13+
// CHECK-NOPASSES: Inliner for always_inline functions
14+
// CHECK-NOPASSES: Replace __sycl_allocateLocalMemory with allocation of memory in local address space
15+
16+
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm \
17+
// RUN: -mllvm -debug-pass=Structure %s -o - -fno-sycl-early-optimizations 2>&1 \
18+
// RUN: | FileCheck %s --check-prefix=CHECK-NOEARLYOPT
19+
// CHECK-NOEARLYOPT: Inliner for always_inline functions
20+
// CHECK-NOEARLYOPT: Replace __sycl_allocateLocalMemory with allocation of memory in local address space
21+
22+
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm \
23+
// RUN: -mllvm -debug-pass=Structure %s -o - -O0 2>&1 \
24+
// RUN: | FileCheck %s --check-prefix=CHECK-O0opt
25+
// CHECK-O0opt: Inliner for always_inline functions
26+
// CHECK-O0opt: Replace __sycl_allocateLocalMemory with allocation of memory in local address space

0 commit comments

Comments
 (0)