@@ -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
441446TEST_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