[llvm] [offload][SYCL] Add SYCL Module splitting (PR #119713)
Maksim Sabianin via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 10 08:42:02 PDT 2025
================
@@ -0,0 +1,114 @@
+; Test checks "kernel" splitting mode.
+
+; RUN: llvm-split -sycl-split=kernel -S < %s -o %t.files
+; RUN: FileCheck %s -input-file=%t.files_0.ll --check-prefixes CHECK-MODULE0,CHECK
+; RUN: FileCheck %s -input-file=%t.files_0.sym --check-prefixes CHECK-MODULE0-TXT
+; RUN: FileCheck %s -input-file=%t.files_1.ll --check-prefixes CHECK-MODULE1,CHECK
+; RUN: FileCheck %s -input-file=%t.files_1.sym --check-prefixes CHECK-MODULE1-TXT
+; RUN: FileCheck %s -input-file=%t.files_2.ll --check-prefixes CHECK-MODULE2,CHECK
+; RUN: FileCheck %s -input-file=%t.files_2.sym --check-prefixes CHECK-MODULE2-TXT
+
+;CHECK-MODULE2-NOT: @GV
+;CHECK-MODULE1-NOT: @GV
+;CHECK-MODULE0: @GV = internal addrspace(1) constant [1 x i32] [i32 42], align 4
+ at GV = internal addrspace(1) constant [1 x i32] [i32 42], align 4
+
+; CHECK-MODULE2: define dso_local spir_kernel void @TU0_kernel0
+; CHECK-MODULE2-TXT: TU0_kernel0
+; CHECK-MODULE1-NOT: define dso_local spir_kernel void @TU0_kernel0
+; CHECK-MODULE1-TXT-NOT: TU0_kernel0
----------------
maksimsab wrote:
Added missing checks.
https://github.com/llvm/llvm-project/pull/119713
More information about the llvm-commits
mailing list