[PATCH] D30105: PatternMatch; Add m_AExt to match zext or sext

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 17 14:52:39 PST 2017


arsenm updated this revision to Diff 88964.
arsenm added a comment.

Rename


https://reviews.llvm.org/D30105

Files:
  include/llvm/IR/PatternMatch.h


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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30105.88964.patch
Type: text/x-patch
Size: 634 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170217/fd884dd3/attachment.bin>


More information about the llvm-commits mailing list