From fb63a285901f95ecfd26db6eb402bab95519b865 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Fri, 10 Mar 2017 00:47:35 +0000 Subject: [PATCH] PatternMatch; Add m_ZExtOrSExt matcher git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297432 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/IR/PatternMatch.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/llvm/IR/PatternMatch.h b/include/llvm/IR/PatternMatch.h index 2cd99d76cc9..62e1d61e818 100644 --- a/include/llvm/IR/PatternMatch.h +++ b/include/llvm/IR/PatternMatch.h @@ -827,6 +827,13 @@ inline CastClass_match m_ZExt(const OpTy &Op) { 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) { -- 2.50.1