diff options
author | Chris Lattner <sabre@nondot.org> | 2009-12-21 06:08:50 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-12-21 06:08:50 +0000 |
commit | 7bc85a931ecb6843ad3289ef708d85a8b15f2e6d (patch) | |
tree | 89f9cf4b5bdce9b7d2af86791904fdb13031867d | |
parent | 33269813dfa0a7c02b44354948c7e669f9566f09 (diff) | |
download | bcm5719-llvm-7bc85a931ecb6843ad3289ef708d85a8b15f2e6d.tar.gz bcm5719-llvm-7bc85a931ecb6843ad3289ef708d85a8b15f2e6d.zip |
add check lines for min/max tests.
llvm-svn: 91816
-rw-r--r-- | llvm/test/Transforms/InstCombine/select.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/select.ll b/llvm/test/Transforms/InstCombine/select.ll index 2dcc3b19f97..06d5338884e 100644 --- a/llvm/test/Transforms/InstCombine/select.ll +++ b/llvm/test/Transforms/InstCombine/select.ll @@ -383,42 +383,58 @@ next: } +; SMAX(SMAX(x, y), x) -> SMAX(x, y) define i32 @test30(i32 %x, i32 %y) { %cmp = icmp sgt i32 %x, %y %cond = select i1 %cmp, i32 %x, i32 %y + %cmp5 = icmp sgt i32 %cond, %x %retval = select i1 %cmp5, i32 %cond, i32 %x ret i32 %retval +; CHECK: @test30 +; CHECK: ret i32 %cond } +; UMAX(UMAX(x, y), x) -> UMAX(x, y) define i32 @test31(i32 %x, i32 %y) { %cmp = icmp ugt i32 %x, %y %cond = select i1 %cmp, i32 %x, i32 %y %cmp5 = icmp ugt i32 %cond, %x %retval = select i1 %cmp5, i32 %cond, i32 %x ret i32 %retval +; CHECK: @test31 +; CHECK: ret i32 %cond } +; SMIN(SMIN(x, y), x) -> SMIN(x, y) define i32 @test32(i32 %x, i32 %y) { %cmp = icmp sgt i32 %x, %y %cond = select i1 %cmp, i32 %y, i32 %x %cmp5 = icmp sgt i32 %cond, %x %retval = select i1 %cmp5, i32 %x, i32 %cond ret i32 %retval +; CHECK: @test32 +; CHECK: ret i32 %cond } +; MAX(MIN(x, y), x) -> x define i32 @test33(i32 %x, i32 %y) { %cmp = icmp sgt i32 %x, %y %cond = select i1 %cmp, i32 %y, i32 %x %cmp5 = icmp sgt i32 %cond, %x %retval = select i1 %cmp5, i32 %cond, i32 %x ret i32 %retval +; CHECK: @test33 +; CHECK: ret i32 %x } +; MIN(MAX(x, y), x) -> x define i32 @test34(i32 %x, i32 %y) { %cmp = icmp sgt i32 %x, %y %cond = select i1 %cmp, i32 %x, i32 %y %cmp5 = icmp sgt i32 %cond, %x %retval = select i1 %cmp5, i32 %x, i32 %cond ret i32 %retval +; CHECK: @test34 +; CHECK: ret i32 %x } |