[all-commits] [llvm/llvm-project] df672f: [DAG] scalarizeExtractedVectorLoad - replace getAB...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Fri Oct 1 13:08:25 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: df672f66b669ca6f347858d26af1cae0aeddf8c2
      https://github.com/llvm/llvm-project/commit/df672f66b669ca6f347858d26af1cae0aeddf8c2
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-10-01 (Fri, 01 Oct 2021)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/AArch64/arm64-indexed-vector-ldst.ll
    M llvm/test/CodeGen/X86/merge-consecutive-stores-nt.ll

  Log Message:
  -----------
  [DAG] scalarizeExtractedVectorLoad - replace getABITypeAlign with allowsMemoryAccess (PR45116)

One of the cases identified in PR45116 - we don't need to limit extracted loads to ABI alignment, we can use allowsMemoryAccess - which tests using getABITypeAlign, but also checks if a target permits (fast) misaligned memory loads by checking allowsMisalignedMemoryAccesses as a fallback.

I've also cleaned up the alignment calculation code - if we have a constant extraction index then the alignment can be based on an offset from the original vector load alignment, but for non-constant indices we should assume the worst (single element alignment only).

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




More information about the All-commits mailing list