[PATCH] D42047: [PatternMatch] Implement matching code for LibFunc
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 28 05:34:46 PDT 2019
lebedev.ri added a comment.
Almost there i think..
================
Comment at: unittests/IR/PatternMatch.cpp:637-645
+ EXPECT_TRUE(match(Tan, m_LibFunc<LibFunc_tan>(TLI)));
+
+ EXPECT_TRUE(match(Tan, m_LibFunc<LibFunc_tan>(TLI, m_Value(MatchOne))));
+ EXPECT_EQ(One, MatchOne);
+
+ EXPECT_TRUE(match(Pow, m_LibFunc<LibFunc_pow>(TLI, m_Value(MatchOne),
+ m_Value(MatchTwo))));
----------------
Nice.
I feel like the template logic in `PatternMatch.h` looks fragile, so this could use a new negative tests, too.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D42047/new/
https://reviews.llvm.org/D42047
More information about the llvm-commits
mailing list