diff options
| author | Pete Cooper <peter_cooper@apple.com> | 2011-12-01 04:35:26 +0000 |
|---|---|---|
| committer | Pete Cooper <peter_cooper@apple.com> | 2011-12-01 04:35:26 +0000 |
| commit | 3b7f35bf087e4a1f35a3aea5bd988bb1dc1607e7 (patch) | |
| tree | fef1111f7607764580a021c24d3eaa9330924437 | |
| parent | a5230ce303ef1a8da2339ce7bdbb14be23ecc2d0 (diff) | |
| download | bcm5719-llvm-3b7f35bf087e4a1f35a3aea5bd988bb1dc1607e7.tar.gz bcm5719-llvm-3b7f35bf087e4a1f35a3aea5bd988bb1dc1607e7.zip | |
Removed use of grep from test and moved it to be with other icmp tests
llvm-svn: 145570
| -rw-r--r-- | llvm/test/Transforms/InstCombine/compare-abs-nonzero.ll | 10 | ||||
| -rw-r--r-- | llvm/test/Transforms/InstCombine/icmp.ll | 11 |
2 files changed, 11 insertions, 10 deletions
diff --git a/llvm/test/Transforms/InstCombine/compare-abs-nonzero.ll b/llvm/test/Transforms/InstCombine/compare-abs-nonzero.ll deleted file mode 100644 index 49cd688bda0..00000000000 --- a/llvm/test/Transforms/InstCombine/compare-abs-nonzero.ll +++ /dev/null @@ -1,10 +0,0 @@ -; RUN: opt < %s -instcombine -S | grep -v {select} - -define zeroext i1 @cmpabs(i64 %val) nounwind uwtable readnone ssp { -entry: - %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 -} diff --git a/llvm/test/Transforms/InstCombine/icmp.ll b/llvm/test/Transforms/InstCombine/icmp.ll index 77ca62cfec6..e3d12f7fff7 100644 --- a/llvm/test/Transforms/InstCombine/icmp.ll +++ b/llvm/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 +} |

