[llvm-commits] [llvm] r91816 - /llvm/trunk/test/Transforms/InstCombine/select.ll

Chris Lattner sabre at nondot.org
Sun Dec 20 22:08:50 PST 2009


Author: lattner
Date: Mon Dec 21 00:08:50 2009
New Revision: 91816

URL: http://llvm.org/viewvc/llvm-project?rev=91816&view=rev
Log:
add check lines for min/max tests.

Modified:
    llvm/trunk/test/Transforms/InstCombine/select.ll

Modified: llvm/trunk/test/Transforms/InstCombine/select.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/select.ll?rev=91816&r1=91815&r2=91816&view=diff

==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/select.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/select.ll Mon Dec 21 00:08:50 2009
@@ -383,42 +383,58 @@
 }
 
 
+; 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
 }





More information about the llvm-commits mailing list