41 lines · plain
1; RUN: opt < %s -passes='cgscc(inline)' -pass-remarks='inline' -S 2>&1 | FileCheck %s2; RUN: opt < %s -passes='cgscc(inline)' -pass-remarks='inl.*' -S 2>&1 | FileCheck %s3; RUN: opt < %s -passes='cgscc(inline)' -pass-remarks='vector' -pass-remarks='inl' -S 2>&1 | FileCheck %s4 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 the7; second one we ask for the inliner, but we then ask for the vectorizer8; (thus overriding the first flag).9; RUN: opt < %s -passes='cgscc(inline)' -pass-remarks='vector' -S 2>&1 | FileCheck --check-prefix=REMARKS %s10; RUN: opt < %s -passes='cgscc(inline)' -pass-remarks='inl' -pass-remarks='vector' -S 2>&1 | FileCheck --check-prefix=REMARKS %s11 12; RUN: opt < %s -passes='cgscc(inline)' -S 2>&1 | FileCheck --check-prefix=REMARKS %s13; RUN: not opt < %s -pass-remarks='(' 2>&1 | FileCheck --check-prefix=BAD-REGEXP %s14 15define i32 @foo(i32 %x, i32 %y) #0 {16entry:17 %x.addr = alloca i32, align 418 %y.addr = alloca i32, align 419 store i32 %x, ptr %x.addr, align 420 store i32 %y, ptr %y.addr, align 421 %0 = load i32, ptr %x.addr, align 422 %1 = load i32, ptr %y.addr, align 423 %add = add nsw i32 %0, %124 ret i32 %add25}26 27define i32 @bar(i32 %j) #0 {28entry:29 %j.addr = alloca i32, align 430 store i32 %j, ptr %j.addr, align 431 %0 = load i32, ptr %j.addr, align 432 %1 = load i32, ptr %j.addr, align 433 %sub = sub nsw i32 %1, 234 %call = call i32 @foo(i32 %0, i32 %sub)35; CHECK: 'foo' inlined into 'bar'36; REMARKS-NOT: 'foo' inlined into 'bar'37 ret i32 %call38}39 40; BAD-REGEXP: Invalid regular expression '(' in -pass-remarks:41