summaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/icmp.ll
diff options
context:
space:
mode:
authorPete Cooper <peter_cooper@apple.com>2011-12-01 04:35:26 +0000
committerPete Cooper <peter_cooper@apple.com>2011-12-01 04:35:26 +0000
commitdbaad16959070fb07ce50094b7643933b69a1f39 (patch)
treeec99a1c19a70bd0e29c01fa637ebad8f1156e617 /test/Transforms/InstCombine/icmp.ll
parent65a6b57c330361d1075af146300d6aab9059659c (diff)
downloadllvm-dbaad16959070fb07ce50094b7643933b69a1f39.tar.gz
llvm-dbaad16959070fb07ce50094b7643933b69a1f39.tar.bz2
llvm-dbaad16959070fb07ce50094b7643933b69a1f39.tar.xz
Removed use of grep from test and moved it to be with other icmp tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145570 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/icmp.ll')
-rw-r--r--test/Transforms/InstCombine/icmp.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/icmp.ll b/test/Transforms/InstCombine/icmp.ll
index 77ca62cfec..e3d12f7fff 100644
--- a/test/Transforms/InstCombine/icmp.ll
+++ b/test/Transforms/InstCombine/icmp.ll
@@ -559,3 +559,14 @@ define i1 @test57(i32 %a) {
call void @foo(i32 %and)
ret i1 %cmp
}
+
+; rdar://problem/10482509
+; CHECK: @cmpabs
+; CHECK-NEXT: icmp ne
+define zeroext i1 @cmpabs(i64 %val) {
+ %sub = sub nsw i64 0, %val
+ %cmp = icmp slt i64 %val, 0
+ %sub.val = select i1 %cmp, i64 %sub, i64 %val
+ %tobool = icmp ne i64 %sub.val, 0
+ ret i1 %tobool
+}