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