Skip to content

Commit b3d8f5c

Browse files
committed
Move the test to matchConstants
1 parent 546b925 commit b3d8f5c

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

llvm/unittests/CodeGen/SelectionDAGPatternMatchTest.cpp

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,11 @@ TEST_F(SelectionDAGPatternMatchTest, matchConstants) {
436436
EXPECT_EQ(CC, ISD::SETULT);
437437
EXPECT_TRUE(sd_match(SetCC, m_Node(ISD::SETCC, m_Value(), m_Value(),
438438
m_SpecificCondCode(ISD::SETULT))));
439+
440+
SDValue UndefInt32VT = DAG->getUNDEF(Int32VT);
441+
SDValue UndefVInt32VT = DAG->getUNDEF(VInt32VT);
442+
EXPECT_TRUE(sd_match(UndefInt32VT, m_Undef()));
443+
EXPECT_TRUE(sd_match(UndefVInt32VT, m_Undef()));
439444
}
440445

441446
TEST_F(SelectionDAGPatternMatchTest, patternCombinators) {
@@ -603,18 +608,3 @@ TEST_F(SelectionDAGPatternMatchTest, matchAdvancedProperties) {
603608
EXPECT_TRUE(sd_match(Add, DAG.get(),
604609
m_LegalOp(m_IntegerVT(m_Add(m_Value(), m_Value())))));
605610
}
606-
607-
TEST_F(SelectionDAGPatternMatchTest, matchUndefined) {
608-
auto BoolVT = EVT::getIntegerVT(Context, 1);
609-
auto Int32VT = EVT::getIntegerVT(Context, 32);
610-
auto VInt32VT = EVT::getVectorVT(Context, Int32VT, 4);
611-
612-
SDValue UndefBoolVT = DAG->getUNDEF(BoolVT);
613-
SDValue UndefInt32VT = DAG->getUNDEF(Int32VT);
614-
SDValue UndefVInt32VT = DAG->getUNDEF(VInt32VT);
615-
616-
using namespace SDPatternMatch;
617-
EXPECT_TRUE(sd_match(UndefBoolVT, m_Undef()));
618-
EXPECT_TRUE(sd_match(UndefInt32VT, m_Undef()));
619-
EXPECT_TRUE(sd_match(UndefVInt32VT, m_Undef()));
620-
}

0 commit comments

Comments
 (0)