[PATCH] D79452: [VectorCombine] scalarize binop of inserted elements into undef

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 5 16:12:46 PDT 2020


spatel created this revision.
spatel added reviewers: lebedev.ri, RKSimon, craig.topper, efriedma.
Herald added subscribers: hiraditya, mcrosier.
Herald added a project: LLVM.

As with the extractelement patterns that are currently in vector-combine, there are going to be several possible variations on this theme. This should be the clearest, simplest example.

Scalarization is the right direction for target-independent canonicalization, and InstCombine has some of those folds already, but it doesn't do this. I proposed a similar transform in D50992 <https://reviews.llvm.org/D50992>. Here in vector-combine, we can check the cost model to be sure it's profitable, so there should be less risk.


https://reviews.llvm.org/D79452

Files:
  llvm/lib/Transforms/Vectorize/VectorCombine.cpp
  llvm/test/Transforms/VectorCombine/X86/insert-binop.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79452.262245.patch
Type: text/x-patch
Size: 5351 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200505/05f3d87e/attachment.bin>


More information about the llvm-commits mailing list