[llvm] Add matchers m_ExtractSubvector and m_InsertSubvector (PR #120212)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 3 09:49:50 PST 2025
================
@@ -182,15 +187,23 @@ TEST_F(SelectionDAGPatternMatchTest, matchTernaryOp) {
EXPECT_TRUE(sd_match(ExtractELT, m_ExtractElt(m_Value(), m_Value())));
EXPECT_TRUE(sd_match(ExtractELT, m_ExtractElt(m_Value(), m_ConstInt())));
EXPECT_TRUE(sd_match(ExtractELT, m_ExtractElt(m_Value(), m_SpecificInt(1))));
+
+ EXPECT_TRUE(sd_match(InsertSubvector,
+ m_InsertSubvector(m_Value(), m_Value(), m_Value())));
+ EXPECT_TRUE(sd_match(
+ InsertSubvector,
+ m_InsertSubvector(m_Specific(V2), m_Specific(V3), m_Specific(Idx0))));
----------------
RKSimon wrote:
Please can you add true/false tests with a m_SpecificInt() for the index as well
https://github.com/llvm/llvm-project/pull/120212
More information about the llvm-commits
mailing list