[PATCH] D98882: [LoopVectorize] Support widening memory ops with irregular types

LemonBoy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 18 11:33:17 PDT 2021


LemonBoy created this revision.
LemonBoy added reviewers: lebedev.ri, delena, fhahn.
Herald added subscribers: dexonsmith, hiraditya.
LemonBoy requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Successive elements of types whose Alloc size doesn't match the type size have some padding bits in between, preventing the vectorizer from kicking in.
Let's handle this case by promoting the load/store to a type that's as big as the Alloc size and truncating/extending the values as needed.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D98882

Files:
  llvm/include/llvm/IR/DataLayout.h
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/test/Transforms/LoopVectorize/X86/load-deref-pred.ll
  llvm/test/Transforms/LoopVectorize/irregular_type.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98882.331636.patch
Type: text/x-patch
Size: 225462 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210318/0736209c/attachment-0001.bin>


More information about the llvm-commits mailing list