[llvm] [SDPatternMatch] Add Matcher m_Undef (PR #122521)

Min-Yih Hsu via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 10 17:25:44 PST 2025


================
@@ -603,3 +603,18 @@ TEST_F(SelectionDAGPatternMatchTest, matchAdvancedProperties) {
   EXPECT_TRUE(sd_match(Add, DAG.get(),
                        m_LegalOp(m_IntegerVT(m_Add(m_Value(), m_Value())))));
 }
+
+TEST_F(SelectionDAGPatternMatchTest, matchUndefined) {
+  auto BoolVT = EVT::getIntegerVT(Context, 1);
----------------
mshockwave wrote:

nit: could you put tests in matchConstants instead?

https://github.com/llvm/llvm-project/pull/122521


More information about the llvm-commits mailing list