[llvm] [PatternMatch] Introduce match functor (NFC) (PR #159386)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 17 09:19:02 PDT 2025
================
@@ -5123,8 +5120,7 @@ static Value *simplifyGEPInst(Type *SrcTy, Value *Ptr,
}
// Check to see if this is constant foldable.
- if (!isa<Constant>(Ptr) ||
- !all_of(Indices, [](Value *V) { return isa<Constant>(V); }))
+ if (!isa<Constant>(Ptr) || !all_of(Indices, match_fn(m_Constant())))
----------------
lukel97 wrote:
I think this can be IsaPred<Constant>?
https://github.com/llvm/llvm-project/pull/159386
More information about the llvm-commits
mailing list