[PATCH] D82792: [SVE][CodeGen] Legalisation of unpredicated load instructions

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 29 11:21:40 PDT 2020


efriedma added a comment.

Please split the addressing mode improvements off into a separate patch from the legalization change.



================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:1542
+
+  SDValue BytesIncrement;
+  MachinePointerInfo MPI;
----------------
BytesIncrement doesn't need to be declared out here?


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:1547
+        dl, Ptr.getValueType(),
+        APInt(Ptr.getValueType().getSizeInBits().getKnownMinSize(),
+              IncrementSize));
----------------
getFixedSize?


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:1549
+              IncrementSize));
+    MPI = LD->getPointerInfo();
+    Ptr = DAG.getNode(ISD::ADD, dl, Ptr.getValueType(), Ptr, BytesIncrement);
----------------
kmclaughlin wrote:
> Where `LoVT` is not scalable we update the PointerInfo with the offset, IncrementSize. For scalable types I've just reused `LD->getPointerInfo()` for now; I'm not entirely sure how best to handle the PointerInfo for scalable vectors as MachinePointerInfo currently has no knowledge of scaled offsets.
You can get an "empty" MachinePointerInfo.  Something like `MachinePointerInfo(LD->getPointerInfo()->getAddrSpace());`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82792





More information about the llvm-commits mailing list