[llvm] [PatternMatch] Introduce match functor (NFC) (PR #159386)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 17 09:19:03 PDT 2025
================
@@ -340,7 +340,7 @@ bool InstCombinerImpl::foldIntegerTypedPHI(PHINode &PN) {
Instruction *InstCombinerImpl::foldPHIArgIntToPtrToPHI(PHINode &PN) {
// convert ptr2int ( phi[ int2ptr(ptr2int(x))] ) --> ptr2int ( phi [ x ] )
// Make sure all uses of phi are ptr2int.
- if (!all_of(PN.users(), [](User *U) { return isa<PtrToIntInst>(U); }))
+ if (!all_of(PN.users(), match_fn(m_PtrToInt(m_Value()))))
----------------
lukel97 wrote:
IsaPred?
https://github.com/llvm/llvm-project/pull/159386
More information about the llvm-commits
mailing list