From 4da47bee48a57cc5fa0256623dbd749c3bf14759 Mon Sep 17 00:00:00 2001 From: Sanjay Patel Date: Sun, 24 Jul 2022 16:58:04 -0400 Subject: [PATCH] [ValueTracking] add test for isImpliedCondition with vector types; NFC --- llvm/unittests/Analysis/ValueTrackingTest.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/llvm/unittests/Analysis/ValueTrackingTest.cpp b/llvm/unittests/Analysis/ValueTrackingTest.cpp index 18619a6..e8b9090 100644 --- a/llvm/unittests/Analysis/ValueTrackingTest.cpp +++ b/llvm/unittests/Analysis/ValueTrackingTest.cpp @@ -1345,6 +1345,18 @@ TEST_F(ValueTrackingTest, IsImpliedConditionAnd2) { EXPECT_EQ(isImpliedCondition(A, A4, DL), None); } +TEST_F(ValueTrackingTest, IsImpliedConditionAndVec) { + parseAssembly(R"( + define void @test(<2 x i8> %x, <2 x i8> %y) { + %A = icmp ult <2 x i8> %x, %y + %A2 = icmp ule <2 x i8> %x, %y + ret void + } + )"); + const DataLayout &DL = M->getDataLayout(); + EXPECT_EQ(isImpliedCondition(A, A2, DL), None); +} + TEST_F(ValueTrackingTest, IsImpliedConditionOr) { parseAssembly(R"( define void @test(i32 %x, i32 %y) { -- 2.7.4