[PATCH] D48279: [PatternMatch] Add m_Store pattern match helper
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 19 07:46:49 PDT 2018
lebedev.ri added inline comments.
================
Comment at: unittests/IR/PatternMatch.cpp:411-417
+ EXPECT_TRUE(m_Store(m_Value(MatchStoreVal), m_Value(MatchStorePointer))
+ .match(StoreInst));
+ EXPECT_EQ(FourtyTwo, MatchStoreVal);
+ EXPECT_EQ(Alloca, MatchStorePointer);
+
+ EXPECT_FALSE(m_Store(m_Value(MatchStoreVal), m_Value(MatchStorePointer))
+ .match(Alloca));
----------------
Can you add a basic sanity test to show that it works with `m_Specific()`, too?
https://reviews.llvm.org/D48279
More information about the llvm-commits
mailing list