[llvm] r267432 - [ValueTracking] Add an additional test case for r266767 where one operand is a const.

Chad Rosier via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 25 10:41:48 PDT 2016


Author: mcrosier
Date: Mon Apr 25 12:41:48 2016
New Revision: 267432

URL: http://llvm.org/viewvc/llvm-project?rev=267432&view=rev
Log:
[ValueTracking] Add an additional test case for r266767 where one operand is a const.

Modified:
    llvm/trunk/test/Transforms/SimplifyCFG/implied-cond-matching.ll

Modified: llvm/trunk/test/Transforms/SimplifyCFG/implied-cond-matching.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SimplifyCFG/implied-cond-matching.ll?rev=267432&r1=267431&r2=267432&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/SimplifyCFG/implied-cond-matching.ll (original)
+++ llvm/trunk/test/Transforms/SimplifyCFG/implied-cond-matching.ll Mon Apr 25 12:41:48 2016
@@ -1003,3 +1003,27 @@ sle_sle_isfalse:
 untaken:
   ret void
 }
+
+; A >=u 5 implies A <u 5 is false.
+; CHECK-LABEL: @test_uge_ult_const
+; CHECK-NOT: call void @is(i1 true)
+; CHECK: call void @is(i1 false)
+define void @test_uge_ult_const(i32 %a, i32 %b) {
+  %cmp1 = icmp uge i32 %a, %b
+  br i1 %cmp1, label %taken, label %untaken
+
+taken:
+  %cmp2 = icmp ult i32 %a, %b
+  br i1 %cmp2, label %istrue, label %isfalse
+
+istrue:
+  call void @is(i1 true)
+  ret void
+
+isfalse:
+  call void @is(i1 false)
+  ret void
+
+untaken:
+  ret void
+}




More information about the llvm-commits mailing list