[PATCH] D108307: [DAG] CombineConsecutiveLoads - replace getABITypeAlign with allowsMemoryAccess (PR45116)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 23 02:08:51 PDT 2021


RKSimon added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:12573
+      DAG.areNonVolatileConsecutiveLoads(LD2, LD1, LD1Bytes, 1) &&
+      TLI.allowsMemoryAccess(*DAG.getContext(), DAG.getDataLayout(), VT,
+                             *LD1->getMemOperand()))
----------------
pengfei wrote:
> Is the type possible a vector? Is there performance penalty when we turn it into unaligned?
allowsMemoryAccess does have an optional fast check that we could use, that allows targets to specify if the unaligned load is slower or not - I'll try adding it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108307/new/

https://reviews.llvm.org/D108307



More information about the llvm-commits mailing list