[llvm] [DAG] Adding m_FPToUI and m_FPToSI to SDPatternMatch.h (PR #104044)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 14 13:15:53 PDT 2024


================
@@ -263,6 +268,9 @@ TEST_F(SelectionDAGPatternMatchTest, matchUnaryOp) {
   EXPECT_FALSE(sd_match(Sub, m_Neg(m_Value())));
   EXPECT_FALSE(sd_match(Neg, m_Not(m_Value())));
   EXPECT_TRUE(sd_match(VScale, m_VScale(m_Value())));
+
+  EXPECT_TRUE(sd_match(FPToUI, m_FPToUI(m_Value())));
+  EXPECT_TRUE(sd_match(FPToSI, m_FPToSI(m_Value())));
----------------
RKSimon wrote:

Add a fail test as well, maybe matching the fptoui to FPToSi?

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


More information about the llvm-commits mailing list