[all-commits] [llvm/llvm-project] 8314a0: [SelectionDAG] Allow FindMemType to fail when wide...

Fraser Cormack via All-commits all-commits at lists.llvm.org
Fri Oct 29 10:36:21 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8314a04ede9ba1ddc03bfec24bf6431ff9a8c609
      https://github.com/llvm/llvm-project/commit/8314a04ede9ba1ddc03bfec24bf6431ff9a8c609
  Author: Fraser Cormack <fraser at codeplay.com>
  Date:   2021-10-29 (Fri, 29 Oct 2021)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h
    M llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp

  Log Message:
  -----------
  [SelectionDAG] Allow FindMemType to fail when widening loads & stores

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.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D112000




More information about the All-commits mailing list