Skip to content

Commit f139bfc

Browse files
authored
[NewPM] Update LIT tests to pass with both new and legacy PMs (#5323)
Signed-off-by: Mikhail Lychkov <[email protected]>
1 parent fd355c7 commit f139bfc

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed
Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
// Check LLVM optimization pipeline is run by default for SPIR-V compiled for
22
// SYCL device target, and can be disabled with -fno-sycl-early-optimizations.
33
//
4-
// RUN: %clang_cc1 -O2 -fsycl-is-device -triple spir64-unknown-unknown %s -mllvm -debug-pass=Structure -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=CHECK-EARLYOPT
4+
// RUN: %clang_cc1 -O2 -fsycl-is-device -triple spir64-unknown-unknown %s -flegacy-pass-manager -mllvm -debug-pass=Structure -emit-llvm -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK-EARLYOPT
55
// CHECK-EARLYOPT: Lower Work Group Scope Code
66
// CHECK-EARLYOPT: Combine redundant instructions
77
//
8-
// RUN: %clang_cc1 -O2 -fsycl-is-device -fno-sycl-early-optimizations -triple spir64-unknown-unknown %s -mllvm -debug-pass=Structure -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=CHECK-NOEARLYOPT
8+
// RUN: %clang_cc1 -O2 -fsycl-is-device -triple spir64-unknown-unknown %s -flegacy-pass-manager -mllvm -debug-pass=Structure -emit-llvm -fno-sycl-early-optimizations -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK-NOEARLYOPT
99
// CHECK-NOEARLYOPT: Lower Work Group Scope Code
1010
// CHECK-NOEARLYOPT-NOT: Combine redundant instructions
11+
//
12+
//
13+
// New pass manager doesn't print all passes tree, only module level.
14+
//
15+
// RUN: %clang_cc1 -O2 -fsycl-is-device -triple spir64-unknown-unknown %s -fno-legacy-pass-manager -mdebug-pass Structure -emit-llvm -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK-NEWPM-EARLYOPT
16+
// CHECK-NEWPM-EARLYOPT: ConstantMergePass
17+
// CHECK-NEWPM-EARLYOPT: SYCLMutatePrintfAddrspacePass
18+
//
19+
// RUN: %clang_cc1 -O2 -fsycl-is-device -triple spir64-unknown-unknown %s -fno-legacy-pass-manager -mdebug-pass Structure -emit-llvm -fno-sycl-early-optimizations -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK-NEWPM-NOEARLYOPT
20+
// CHECK-NEWPM-NOEARLYOPT-NOT: ConstantMergePass
21+
// CHECK-NEWPM-NOEARLYOPT: SYCLMutatePrintfAddrspacePass

llvm/test/Transforms/FunctionAttrs/2008-09-03-ReadOnly.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; First test run uses module pass that is not designed for the old pass manager.
22
; Expect different input till the moment when NewPM is enabled by default.
3-
; RUN: opt < %s -basic-aa -function-attrs -S | FileCheck %s --check-prefix=CHECK-OLD-PM
3+
; RUN: opt < %s -basic-aa -function-attrs -S -enable-new-pm=0 | FileCheck %s --check-prefix=CHECK-OLD-PM
44
; RUN: opt < %s -aa-pipeline=basic-aa -passes=function-attrs -S | FileCheck %s --check-prefix=CHECK-FUNC-PASS
55

66
; CHECK: define i32 @f() #0

0 commit comments

Comments
 (0)