diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2012-03-29 22:01:41 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2012-03-29 22:01:41 +0000 |
commit | d6735ce57a8ca48fb79522306e73f167c646f3bd (patch) | |
tree | 8a2abb4ebcd9db863e7c00bf87c40941c7d7469c /llvm/test/Transforms/InstCombine/apint-shl-trunc.ll | |
parent | 591cdaf2ee6dc650467bf47381ed7254d66df4fe (diff) | |
download | bcm5719-llvm-d6735ce57a8ca48fb79522306e73f167c646f3bd.tar.gz bcm5719-llvm-d6735ce57a8ca48fb79522306e73f167c646f3bd.zip |
Filecheck-ize this test so that it actually tests something reasonable.
llvm-svn: 153697
Diffstat (limited to 'llvm/test/Transforms/InstCombine/apint-shl-trunc.ll')
-rw-r--r-- | llvm/test/Transforms/InstCombine/apint-shl-trunc.ll | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/llvm/test/Transforms/InstCombine/apint-shl-trunc.ll b/llvm/test/Transforms/InstCombine/apint-shl-trunc.ll index 8163e6d527d..f2dc7d5130a 100644 --- a/llvm/test/Transforms/InstCombine/apint-shl-trunc.ll +++ b/llvm/test/Transforms/InstCombine/apint-shl-trunc.ll @@ -1,13 +1,24 @@ -; RUN: opt < %s -instcombine -S | grep shl -; END. +; RUN: opt < %s -instcombine -S | FileCheck %s define i1 @test0(i39 %X, i39 %A) { +; CHECK: @test0 +; CHECK: %[[V1:.*]] = shl i39 1, %A +; CHECK: %[[V2:.*]] = and i39 %[[V1]], %X +; CHECK: %[[V3:.*]] = icmp ne i39 %[[V2]], 0 +; CHECK: ret i1 %[[V3]] + %B = lshr i39 %X, %A %D = trunc i39 %B to i1 ret i1 %D } define i1 @test1(i799 %X, i799 %A) { +; CHECK: @test1 +; CHECK: %[[V1:.*]] = shl i799 1, %A +; CHECK: %[[V2:.*]] = and i799 %[[V1]], %X +; CHECK: %[[V3:.*]] = icmp ne i799 %[[V2]], 0 +; CHECK: ret i1 %[[V3]] + %B = lshr i799 %X, %A %D = trunc i799 %B to i1 ret i1 %D |