[PATCH] D112000: [SelectionDAG] Allow FindMemType to fail when widening loads & stores

Fraser Cormack via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 18 08:22:54 PDT 2021


frasercrmck created this revision.
frasercrmck added reviewers: RKSimon, spatel, craig.topper.
Herald added subscribers: ecnelises, rogfer01, hiraditya.
frasercrmck requested review of this revision.
Herald added subscribers: llvm-commits, vkmr.
Herald added a project: LLVM.

This patch removes an internal failure found in FindMemType and "bubbles
it up" to the users of that method: GenWidenVectorLoads and
GenWidenVectorStores. FindMemType -- renamed findMemType -- now returns
an optional value, returning None if no such type is found.

Each of the aforementioned users now pre-calculates the list of types it
will use to widen the memory access. If the type breakdown is not
possible they will signal a failure, at which point the compiler will
crash as it does currently.

This patch is preparing the ground for alternative legalization
strategies for vector loads and stores, such as using vector-predication
versions of loads or stores.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D112000

Files:
  llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h
  llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112000.380408.patch
Type: text/x-patch
Size: 10367 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211018/7c5b243b/attachment.bin>


More information about the llvm-commits mailing list