[llvm] [IR][PatternMatch] Make `m_Checked{Int,Fp}` accept `Constant *` output instead of `APInt *` (PR #91377)
via llvm-commits
llvm-commits at lists.llvm.org
Tue May 7 18:16:21 PDT 2024
================
@@ -625,39 +625,49 @@ TEST_F(PatternMatchTest, CheckedInt) {
APInt APVal(8, Val);
Constant *C = ConstantInt::get(I8Ty, Val);
+ CRes = nullptr;
Res = nullptr;
EXPECT_TRUE(m_CheckedInt(CheckTrue).match(C));
- EXPECT_TRUE(m_CheckedInt(Res, CheckTrue).match(C));
+ EXPECT_TRUE(m_CheckedInt(CRes, CheckTrue).match(C));
+ EXPECT_NE(CRes, nullptr);
+ EXPECT_TRUE(match(CRes, m_APIntAllowPoison(Res)));
----------------
goldsteinn wrote:
Sure, how it is now was mostly based on the simplest changes...
https://github.com/llvm/llvm-project/pull/91377
More information about the llvm-commits
mailing list