[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

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 25 10:32:27 PDT 2018


craig.topper 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
----------------
lebedev.ri wrote:
> 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?
I'm not sure I understand what you're asking for 2.


https://reviews.llvm.org/D51236





More information about the llvm-commits mailing list