1 ; RUN: opt -S -inline %s | FileCheck %s
2 ; RUN: opt -S -passes='cgscc(inline)' %s | FileCheck %s
7 define void @callee(i8* %arg) {
8 %cmp = icmp eq i8* %arg, null
9 br i1 %cmp, label %expensive, label %done
11 ; This block is designed to be too expensive to inline. We can only inline
12 ; callee if this block is known to be dead.
31 ; Positive test - arg is known non null
32 define void @caller(i8* nonnull %arg) {
33 ; CHECK-LABEL: @caller
34 ; CHECK: call void @bar()
35 call void @callee(i8* nonnull %arg)
39 ; Negative test - arg is not known to be non null
40 define void @caller2(i8* %arg) {
41 ; CHECK-LABEL: @caller2
42 ; CHECK: call void @callee(
43 call void @callee(i8* %arg)