[llvm] r356448 - [InstCombine] Regenerate + add icmp with undef tests

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 19 04:44:22 PDT 2019


Author: rksimon
Date: Tue Mar 19 04:44:22 2019
New Revision: 356448

URL: http://llvm.org/viewvc/llvm-project?rev=356448&view=rev
Log:
[InstCombine] Regenerate + add icmp with undef tests

Better test coverage for PR41125 and D59363

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

Modified: llvm/trunk/test/Transforms/InstCombine/icmp.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/icmp.ll?rev=356448&r1=356447&r2=356448&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/icmp.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/icmp.ll Tue Mar 19 04:44:22 2019
@@ -67,13 +67,34 @@ define i32 @test4(i32 %X) {
 }
 
 ; PR4837
-define <2 x i1> @test5(<2 x i64> %x) {
-; CHECK-LABEL: @test5(
+define <2 x i1> @test5_eq(<2 x i64> %x) {
+; CHECK-LABEL: @test5_eq(
 ; CHECK-NEXT:    ret <2 x i1> <i1 true, i1 true>
 ;
   %V = icmp eq <2 x i64> %x, undef
   ret <2 x i1> %V
 }
+define <2 x i1> @test5_ne(<2 x i64> %x) {
+; CHECK-LABEL: @test5_ne(
+; CHECK-NEXT:    ret <2 x i1> zeroinitializer
+;
+  %V = icmp ne <2 x i64> %x, undef
+  ret <2 x i1> %V
+}
+define <2 x i1> @test5_ugt(<2 x i64> %x) {
+; CHECK-LABEL: @test5_ugt(
+; CHECK-NEXT:    ret <2 x i1> zeroinitializer
+;
+  %V = icmp ugt <2 x i64> %x, undef
+  ret <2 x i1> %V
+}
+define <2 x i1> @test5_zero() {
+; CHECK-LABEL: @test5_zero(
+; CHECK-NEXT:    ret <2 x i1> undef
+;
+  %V = icmp eq <2 x i64> zeroinitializer, undef
+  ret <2 x i1> %V
+}
 
 define i32 @test6(i32 %a, i32 %b) {
 ; CHECK-LABEL: @test6(




More information about the llvm-commits mailing list