[PATCH] D51236: [InstCombine] Extend (add (sext x), cst) --> (sext (add x, cst')) and (add (zext x), cst) --> (zext (add x, cst')) to work for vectors

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 25 10:20:40 PDT 2018


lebedev.ri added inline comments.


================
Comment at: include/llvm/IR/PatternMatch.h:211-212
+
+/// Match a CosntantInt or a vector ConstantInts, binding the specified
+/// pointer to the Constant.
+inline constantint_or_constantint_vec_match
----------------
1. This should ideally describe how this is different from the normal `m_Constant()` matcher (i.e. that this ignores constant expressions)
2. Can we go the other way around, and add a matcher for the constant expressions?


https://reviews.llvm.org/D51236





More information about the llvm-commits mailing list