Index: include/llvm/IR/PatternMatch.h =================================================================== --- include/llvm/IR/PatternMatch.h +++ include/llvm/IR/PatternMatch.h @@ -814,6 +814,13 @@ return CastClass_match(Op); } +template +inline match_combine_or, + CastClass_match> +m_ZExtOrSExt(const OpTy &Op) { + return m_CombineOr(m_ZExt(Op), m_SExt(Op)); +} + /// \brief Matches UIToFP. template inline CastClass_match m_UIToFP(const OpTy &Op) {