[PATCH] D60294: [DAGCombiner] [CodeGenPrepare] WIP/RFC Splitting large offsets from base addresses

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 11 05:39:31 PDT 2019


asb added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:980
+  EVT VT = N0.getValueType();
+  Type *AccessTy = VT.getTypeForEVT(*DAG.getContext());
+
----------------
efriedma wrote:
> This computation of AccessTy is weird: it's supposed to be the type of the load, not the type of the pointer.
> 
> How you get the right access type is sort of awkward, of course... I guess you could traverse the use list.
Traversing the use list as callers to canFoldInAddressingMode do seems sensible. This function can identify the first load/store operation and use the type from that. Bail out if none of the uses are load/stores. By doing this we can also get the right address space. It might be worth exploring if we can just call canFoldInAddressingMode rather than replicating similar logic here.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D60294





More information about the llvm-commits mailing list