Skip to content

Commit e20ba6b

Browse files
committed
add test case with multiple function passes
1 parent 3f5ff99 commit e20ba6b

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Passes/RegionsFromMetadata.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ class RegionsFromMetadata final : public FunctionPass {
2727
public:
2828
RegionsFromMetadata(StringRef Pipeline);
2929
bool runOnFunction(Function &F) final;
30+
void printPipeline(raw_ostream &OS) const final {
31+
OS << getName() << "\n";
32+
RPM.printPipeline(OS);
33+
}
3034
};
3135

3236
} // namespace llvm::sandboxir
Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,28 @@
1-
; RUN: opt -passes=sandbox-vectorizer -sbvec-print-pass-pipeline -sbvec-passes="bottom-up-vec<null,null>" %s -disable-output | FileCheck %s
1+
; RUN: opt -passes=sandbox-vectorizer -sbvec-print-pass-pipeline \
2+
; RUN: -disable-output -sbvec-passes="bottom-up-vec<null,null>" %s \
3+
; RUN: | FileCheck %s
4+
;
5+
; RUN: opt -passes=sandbox-vectorizer -sbvec-print-pass-pipeline \
6+
; RUN: -disable-output -sbvec-passes="bottom-up-vec<>,regions-from-metadata<>" %s \
7+
; RUN: | FileCheck --check-prefix CHECK-MULTIPLE-FUNCTION-PASSES %s
28

39
; !!!WARNING!!! This won't get updated by update_test_checks.py !
410

511
; This checks the user defined pass pipeline.
612
define void @pipeline() {
13+
ret void
14+
}
15+
716
; CHECK: fpm
817
; CHECK: bottom-up-vec
918
; CHECK: rpm
1019
; CHECK: null
1120
; CHECK: null
1221
; CHECK-EMPTY:
13-
ret void
14-
}
22+
23+
; CHECK-MULTIPLE-FUNCTION-PASSES: fpm
24+
; CHECK-MULTIPLE-FUNCTION-PASSES: bottom-up-vec
25+
; CHECK-MULTIPLE-FUNCTION-PASSES: rpm
26+
; CHECK-MULTIPLE-FUNCTION-PASSES: regions-from-metadata
27+
; CHECK-MULTIPLE-FUNCTION-PASSES: rpm
28+
; CHECK-MULTIPLE-FUNCTION-PASSES-EMPTY:

0 commit comments

Comments
 (0)