Skip to content

Commit 198c42a

Browse files
committed
More test fixes
Signed-off-by: Konstantin S Bobrovsky <[email protected]>
1 parent 5759c00 commit 198c42a

File tree

4 files changed

+21
-19
lines changed

4 files changed

+21
-19
lines changed

llvm/test/tools/sycl-post-link/sycl-external-funcs/split-per-kernel.ll

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33

44
; RUN: sycl-post-link -split=kernel -symbols -S %s -o %t.table
55
; RUN: FileCheck %s -input-file=%t_0.ll --check-prefixes CHECK-IR0
6-
; RUN: FileCheck %s -input-file=%t_1.ll --check-prefixes CHECK-IR1
7-
; RUN: FileCheck %s -input-file=%t_2.ll --check-prefixes CHECK-IR2
86
; RUN: FileCheck %s -input-file=%t_0.sym --check-prefixes CHECK-SYM0
7+
; RUN: FileCheck %s -input-file=%t_1.ll --check-prefixes CHECK-IR1
98
; RUN: FileCheck %s -input-file=%t_1.sym --check-prefixes CHECK-SYM1
9+
; RUN: FileCheck %s -input-file=%t_2.ll --check-prefixes CHECK-IR2
1010
; RUN: FileCheck %s -input-file=%t_2.sym --check-prefixes CHECK-SYM2
1111

1212
; RUN: sycl-post-link -split=kernel -emit-only-kernels-as-entry-points -symbols -S %s -o %t.table
13-
; RUN: FileCheck %s -input-file=%t_0.ll --check-prefixes CHECK-IR1
14-
; RUN: FileCheck %s -input-file=%t_1.ll --check-prefixes CHECK-IR2
15-
; RUN: FileCheck %s -input-file=%t_0.sym --check-prefixes CHECK-SYM1
16-
; RUN: FileCheck %s -input-file=%t_1.sym --check-prefixes CHECK-SYM2
13+
; RUN: FileCheck %s -input-file=%t_1.ll --check-prefixes CHECK-IR1
14+
; RUN: FileCheck %s -input-file=%t_1.sym --check-prefixes CHECK-SYM1
15+
; RUN: FileCheck %s -input-file=%t_0.ll --check-prefixes CHECK-IR0
16+
; RUN: FileCheck %s -input-file=%t_0.sym --check-prefixes CHECK-SYM0
1717
; RUN: FileCheck %s -input-file=%t.table --check-prefixes CHECK-TABLE
1818

1919
; CHECK-TABLE: [Code|Properties|Symbols]
@@ -38,13 +38,13 @@ define dso_local spir_kernel void @kernel2() #0 {
3838

3939
attributes #0 = { "sycl-module-id"="a.cpp" }
4040

41-
; CHECK-IR0: define dso_local spir_func void @externalDeviceFunc()
41+
; CHECK-IR2: define dso_local spir_func void @externalDeviceFunc()
4242
; CHECK-IR1: define dso_local spir_kernel void @kernel1()
43-
; CHECK-IR2: define dso_local spir_kernel void @kernel2()
43+
; CHECK-IR0: define dso_local spir_kernel void @kernel2()
4444

45-
; CHECK-SYM0: externalDeviceFunc
46-
; CHECK-SYM0-EMPTY:
45+
; CHECK-SYM2: externalDeviceFunc
46+
; CHECK-SYM2-EMPTY:
4747
; CHECK-SYM1: kernel1
4848
; CHECK-SYM1-EMPTY:
49-
; CHECK-SYM2: kernel2
50-
; CHECK-SYM2-EMPTY:
49+
; CHECK-SYM0: kernel2
50+
; CHECK-SYM0-EMPTY:

llvm/tools/sycl-post-link/ModuleSplitter.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ bool hasIndirectFunctionsOrCalls(const Module &M) {
7878

7979
EntryPointsGroupScope selectDeviceCodeGroupScope(const Module &M,
8080
IRSplitMode Mode,
81-
bool AutoSplitIsGlobalScope) {
81+
bool AutoSplitIsGlobalScope) {
8282
switch (Mode) {
8383
case SPLIT_PER_TU:
8484
return Scope_PerModule;
@@ -190,7 +190,6 @@ EntryPointGroupVec groupEntryPointsByScope(const Module &M,
190190
// Use MapVector for deterministic order of traversal (helps tests).
191191
MapVector<StringRef, EntryPointVec> EntryPointMap;
192192

193-
194193
// Only process module entry points:
195194
for (const auto &F : M.functions()) {
196195
if (!isEntryPoint(F, EmitOnlyKernelsAsEntryPoints))
@@ -351,9 +350,11 @@ getSplitterByKernelType(std::unique_ptr<Module> M,
351350
}
352351

353352
std::unique_ptr<ModuleSplitterBase>
354-
getSplitterByMode(std::unique_ptr<Module> M, IRSplitMode Mode, bool AutoSplitIsGlobalScope,
353+
getSplitterByMode(std::unique_ptr<Module> M, IRSplitMode Mode,
354+
bool AutoSplitIsGlobalScope,
355355
bool EmitOnlyKernelsAsEntryPoints) {
356-
EntryPointsGroupScope Scope = selectDeviceCodeGroupScope(*M, Mode, AutoSplitIsGlobalScope);
356+
EntryPointsGroupScope Scope =
357+
selectDeviceCodeGroupScope(*M, Mode, AutoSplitIsGlobalScope);
357358
EntryPointGroupVec Groups =
358359
groupEntryPointsByScope(*M, Scope, EmitOnlyKernelsAsEntryPoints);
359360
assert(!Groups.empty() && "At least one group is expected");

llvm/tools/sycl-post-link/ModuleSplitter.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ getSplitterByKernelType(std::unique_ptr<Module> M,
170170
EntryPointVec *AllowedEntries = nullptr);
171171

172172
std::unique_ptr<ModuleSplitterBase>
173-
getSplitterByMode(std::unique_ptr<Module> M, IRSplitMode Mode, bool AutoSplitIsGlobalScope,
173+
getSplitterByMode(std::unique_ptr<Module> M, IRSplitMode Mode,
174+
bool AutoSplitIsGlobalScope,
174175
bool EmitOnlyKernelsAsEntryPoints);
175176

176177
#ifndef _NDEBUG

llvm/tools/sycl-post-link/sycl-post-link.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -700,8 +700,8 @@ processInputModule(std::unique_ptr<Module> M) {
700700
// However, if split mode is "auto", then entry point filtering is still
701701
// performed.
702702
assert(!IROutputOnly || (SplitMode == module_split::SPLIT_NONE) ||
703-
(SplitMode == module_split::SPLIT_AUTO) &&
704-
"invalid split mode for IR-only output");
703+
(SplitMode == module_split::SPLIT_AUTO) &&
704+
"invalid split mode for IR-only output");
705705

706706
// Top-level per-kernel/per-source splitter. SYCL/ESIMD splitting is applied
707707
// to modules resulting from the top-level splitting.

0 commit comments

Comments
 (0)