xref: /llvm-project/llvm/test/tools/llvm-reduce/skip-delta-passes.ll (revision c3bc72ccb23eb13aa6efba81adf68a0518eebc52)
1; RUN: llvm-reduce --delta-passes=attributes --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
2; RUN: FileCheck -check-prefix=RESULT %s < %t
3
4; RUN: llvm-reduce --delta-passes=instructions,attributes --skip-delta-passes=instructions --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
5; RUN: FileCheck -check-prefix=RESULT %s < %t
6
7; RUN: not llvm-reduce --skip-delta-passes=foo --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t 2>&1 | FileCheck %s --check-prefix=ERROR
8
9
10; CHECK-INTERESTINGNESS: @foo
11; RESULT: define void @foo() {
12; RESULT-NEXT: store i32
13; RESULT-NEXT: ret void
14; RESULT0-NOT: attributes
15
16; ERROR: unknown pass "foo"
17define void @foo() #0 {
18  store i32 0, ptr null
19  ret void
20}
21
22attributes #0 = { "arstarstarst" }
23