1; RUN: opt < %s -instcombine -S | FileCheck %s
2
3; InstCombine should mark null-checked argument as nonnull at callsite
4declare void @dummy(i32*, i32)
5
6define void @test(i32* %a, i32 %b) {
7; CHECK-LABEL: @test
8; CHECK: call void @dummy(i32* nonnull %a, i32 %b)
9entry:
10  %cond1 = icmp eq i32* %a, null
11  br i1 %cond1, label %dead, label %not_null
12not_null:
13  %cond2 = icmp eq i32 %b, 0
14  br i1 %cond2, label %dead, label %not_zero
15not_zero:
16  call void @dummy(i32* %a, i32 %b)
17  ret void
18dead:
19  unreachable
20}
21