[PATCH] D86160: [VectorCombine] allow vector loads with mismatched insert type

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 18 11:03:08 PDT 2020


spatel created this revision.
spatel added reviewers: RKSimon, xbolva00, lebedev.ri, craig.topper, nikic.
Herald added subscribers: hiraditya, mcrosier.
Herald added a project: LLVM.
spatel requested review of this revision.

This is an enhancement to D81766 <https://reviews.llvm.org/D81766> to allow loading the minimum target vector type into an IR vector with a different number of elements.

In one of the motivating tests from PR16739, SLP creates <2 x float> load ops mixed with <4 x float> insert ops, so we want to handle that pattern in addition to potential oversized vectors created by the vectorizers.

I'm not sure if we should try to model the cost of the identity shuffle as an insert/extract subvector since we are shuffling with undef?


https://reviews.llvm.org/D86160

Files:
  llvm/lib/Transforms/Vectorize/VectorCombine.cpp
  llvm/test/Transforms/VectorCombine/X86/load.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86160.286357.patch
Type: text/x-patch
Size: 5138 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200818/7f5bf956/attachment-0001.bin>


More information about the llvm-commits mailing list