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