[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
Fri Aug 24 14:56:26 PDT 2018
craig.topper created this revision.
craig.topper added reviewers: spatel, eli.friedman.
This patch extends this transform to work for vectors, including non-splat vectors that contain all ConstantInts. I've added a new matcher to PatternMatch to detect vectors of all ConstantInts. We can probably also skip undefs in it, but I've left that for the future.
https://reviews.llvm.org/D51236
Files:
include/llvm/IR/PatternMatch.h
lib/Transforms/InstCombine/InstCombineAddSub.cpp
test/Transforms/InstCombine/sink-zext.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51236.162486.patch
Type: text/x-patch
Size: 7679 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180824/7d918fe0/attachment.bin>
More information about the llvm-commits
mailing list