diff options
author | Sanjay Patel <spatel@rotateright.com> | 2016-12-16 16:58:54 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2016-12-16 16:58:54 +0000 |
commit | 2d82aa7af7a45ba84dba1d185b9ebc2cf5a28027 (patch) | |
tree | 7dd206102dee41e95a5cfd7fcc6f53b59f448b1e | |
parent | 099af810de82cb7502319ea03e68883be516b5e0 (diff) | |
download | bcm5719-llvm-2d82aa7af7a45ba84dba1d185b9ebc2cf5a28027.tar.gz bcm5719-llvm-2d82aa7af7a45ba84dba1d185b9ebc2cf5a28027.zip |
[InstCombine] auto-generate checks; NFC
llvm-svn: 289959
-rw-r--r-- | llvm/test/Transforms/InstCombine/call_nonnull_arg.ll | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/llvm/test/Transforms/InstCombine/call_nonnull_arg.ll b/llvm/test/Transforms/InstCombine/call_nonnull_arg.ll index b10411f622b..58cf3bcb756 100644 --- a/llvm/test/Transforms/InstCombine/call_nonnull_arg.ll +++ b/llvm/test/Transforms/InstCombine/call_nonnull_arg.ll @@ -1,11 +1,23 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py ; RUN: opt < %s -instcombine -S | FileCheck %s ; InstCombine should mark null-checked argument as nonnull at callsite declare void @dummy(i32*, i32) define void @test(i32* %a, i32 %b) { -; CHECK-LABEL: @test -; CHECK: call void @dummy(i32* nonnull %a, i32 %b) +; CHECK-LABEL: @test( +; CHECK-NEXT: entry: +; CHECK-NEXT: [[COND1:%.*]] = icmp eq i32* %a, null +; CHECK-NEXT: br i1 [[COND1]], label %dead, label %not_null +; CHECK: not_null: +; CHECK-NEXT: [[COND2:%.*]] = icmp eq i32 %b, 0 +; CHECK-NEXT: br i1 [[COND2]], label %dead, label %not_zero +; CHECK: not_zero: +; CHECK-NEXT: call void @dummy(i32* nonnull %a, i32 %b) +; CHECK-NEXT: ret void +; CHECK: dead: +; CHECK-NEXT: unreachable +; entry: %cond1 = icmp eq i32* %a, null br i1 %cond1, label %dead, label %not_null @@ -18,3 +30,4 @@ not_zero: dead: unreachable } + |