diff options
author | David Majnemer <david.majnemer@gmail.com> | 2016-07-20 04:13:05 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2016-07-20 04:13:05 +0000 |
commit | a75736087d56b09b8b0066953049738c897fc65b (patch) | |
tree | db90b1765a0824469430860059bf37726afe0066 /llvm/test/Transforms/FunctionAttrs | |
parent | 5d261277529a922b892e86de5b11a10c85401b49 (diff) | |
download | bcm5719-llvm-a75736087d56b09b8b0066953049738c897fc65b.tar.gz bcm5719-llvm-a75736087d56b09b8b0066953049738c897fc65b.zip |
Forgot to add a test for r276008.
llvm-svn: 276082
Diffstat (limited to 'llvm/test/Transforms/FunctionAttrs')
-rw-r--r-- | llvm/test/Transforms/FunctionAttrs/returned.ll | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/test/Transforms/FunctionAttrs/returned.ll b/llvm/test/Transforms/FunctionAttrs/returned.ll new file mode 100644 index 00000000000..4e419693d9f --- /dev/null +++ b/llvm/test/Transforms/FunctionAttrs/returned.ll @@ -0,0 +1,18 @@ +; RUN: opt < %s -functionattrs -S | FileCheck %s + +; CHECK: define i32 @test1(i32 %p, i32 %q) +define i32 @test1(i32 %p, i32 %q) { +entry: + %cmp = icmp sgt i32 %p, %q + br i1 %cmp, label %cond.end, label %lor.lhs.false + +lor.lhs.false: ; preds = %entry + %tobool = icmp ne i32 %p, 0 + %tobool1 = icmp ne i32 %q, 0 + %or.cond = and i1 %tobool, %tobool1 + %p.q = select i1 %or.cond, i32 %p, i32 %q + ret i32 %p.q + +cond.end: ; preds = %entry + ret i32 %p +} |