[PATCH] D137341: [VectorCombine] widen a load with subvector insert

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 3 08:11:24 PDT 2022


spatel created this revision.
spatel added reviewers: RKSimon, dmgreen, arsenm.
Herald added subscribers: hiraditya, mcrosier.
Herald added a project: All.
spatel requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, wdng.
Herald added a project: LLVM.

This adapts/copies code from the existing fold that allows widening of load scalar+insert. It can help in IR because it removes a shuffle, and the backend can already narrow loads if that is profitable in codegen.

We might be able to consolidate more of the logic, but handling this basic pattern should be enough to make a small difference on one of the motivating examples from issue #17113 <https://github.com/llvm/llvm-project/issues/17113>. The final goal of combining loads on those patterns is not solved though.


https://reviews.llvm.org/D137341

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137341.472943.patch
Type: text/x-patch
Size: 9135 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221103/7f909831/attachment.bin>


More information about the llvm-commits mailing list