From a3c50671a5ed37a0e9d1249817313c1e52c7c2d2 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Tue, 19 Mar 2019 11:44:22 +0000 Subject: [PATCH] [InstCombine] Regenerate + add icmp with undef tests Better test coverage for PR41125 and D59363 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356448 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Transforms/InstCombine/icmp.ll | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/test/Transforms/InstCombine/icmp.ll b/test/Transforms/InstCombine/icmp.ll index 7f8c6a3819d..b2244c5de2b 100644 --- a/test/Transforms/InstCombine/icmp.ll +++ b/test/Transforms/InstCombine/icmp.ll @@ -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> ; %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( -- 2.40.0