@@ -124,6 +124,7 @@ TEST_F(SelectionDAGPatternMatchTest, matchVecShuffle) {
124124 auto Int32VT = EVT::getIntegerVT (Context, 32 );
125125 auto VInt32VT = EVT::getVectorVT (Context, Int32VT, 4 );
126126 SmallVector<int , 4 > MaskData = {2 , 0 , 3 , 1 };
127+ SmallVector<int , 4 > otherMaskData = {1 , 2 , 3 , 4 };
127128 ArrayRef<int > CapturedMask;
128129
129130 SDValue V0 = DAG->getCopyFromReg (DAG->getEntryNode (), DL, 1 , VInt32VT);
@@ -138,6 +139,11 @@ TEST_F(SelectionDAGPatternMatchTest, matchVecShuffle) {
138139 m_ShuffleSpecificMask (m_Value (), m_Value (), MaskData)));
139140 EXPECT_TRUE (std::equal (MaskData.begin (), MaskData.end (), CapturedMask.begin (),
140141 CapturedMask.end ()));
142+ EXPECT_FALSE (
143+ sd_match (VecShuffleWithMask,
144+ m_ShuffleSpecificMask (m_Value (), m_Value (), otherMaskData)));
145+ EXPECT_FALSE (std::equal (otherMaskData.begin (), otherMaskData.end (),
146+ CapturedMask.begin (), CapturedMask.end ()));
141147}
142148
143149TEST_F (SelectionDAGPatternMatchTest, matchTernaryOp) {
0 commit comments