1 ; RUN: opt < %s -inline -pass-remarks='inline' -S 2>&1 | FileCheck %s
2 ; RUN: opt < %s -inline -pass-remarks='inl.*' -S 2>&1 | FileCheck %s
3 ; RUN: opt < %s -inline -pass-remarks='vector' -pass-remarks='inl' -S 2>&1 | FileCheck %s
5 ; These two should not yield an inline remark for the same reason.
6 ; In the first command, we only ask for vectorizer remarks, in the
7 ; second one we ask for the inliner, but we then ask for the vectorizer
8 ; (thus overriding the first flag).
9 ; RUN: opt < %s -inline -pass-remarks='vector' -S 2>&1 | FileCheck --check-prefix=REMARKS %s
10 ; RUN: opt < %s -inline -pass-remarks='inl' -pass-remarks='vector' -S 2>&1 | FileCheck --check-prefix=REMARKS %s
12 ; RUN: opt < %s -inline -S 2>&1 | FileCheck --check-prefix=REMARKS %s
13 ; RUN: not opt < %s -pass-remarks='(' 2>&1 | FileCheck --check-prefix=BAD-REGEXP %s
15 define i32 @foo(i32 %x, i32 %y) #0 {
17 %x.addr = alloca i32, align 4
18 %y.addr = alloca i32, align 4
19 store i32 %x, i32* %x.addr, align 4
20 store i32 %y, i32* %y.addr, align 4
21 %0 = load i32, i32* %x.addr, align 4
22 %1 = load i32, i32* %y.addr, align 4
23 %add = add nsw i32 %0, %1
27 define i32 @bar(i32 %j) #0 {
29 %j.addr = alloca i32, align 4
30 store i32 %j, i32* %j.addr, align 4
31 %0 = load i32, i32* %j.addr, align 4
32 %1 = load i32, i32* %j.addr, align 4
33 %sub = sub nsw i32 %1, 2
34 %call = call i32 @foo(i32 %0, i32 %sub)
35 ; CHECK: foo inlined into bar
36 ; REMARKS-NOT: foo inlined into bar
40 ; BAD-REGEXP: Invalid regular expression '(' in -pass-remarks: