[llvm] [offload][SYCL] Add SYCL Module splitting (PR #119713)
Alexey Bader via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 9 21:49:38 PST 2025
================
@@ -0,0 +1,120 @@
+; RUN: llvm-split -sycl-split=source -S < %s -o %t
+; RUN: FileCheck %s -input-file=%t_0.ll --check-prefixes CHECK-TU0,CHECK
+; RUN: FileCheck %s -input-file=%t_1.ll --check-prefixes CHECK-TU1,CHECK
+; RUN: FileCheck %s -input-file=%t_0.sym --check-prefixes CHECK-TU0-TXT
+; RUN: FileCheck %s -input-file=%t_1.sym --check-prefixes CHECK-TU1-TXT
+
+target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
+target triple = "spir64-unknown-linux"
+
+$_Z3barIiET_S0_ = comdat any
+
+; CHECK-TU1-NOT: @{{.*}}GV{{.*}}
+; CHECK-TU0: @{{.*}}GV{{.*}} = internal addrspace(1) constant [1 x i32] [i32 42], align 4
----------------
bader wrote:
```suggestion
; CHECK-TU0: @_ZL2GV = internal addrspace(1) constant [1 x i32] [i32 42], align 4
```
Can't we check for exact name? I hope `llvm-split` doesn't rename global variables.
https://github.com/llvm/llvm-project/pull/119713
More information about the llvm-commits
mailing list