[PATCH] D84937: [SVE][CodeGen] Fix scalable vector issues in DAGTypeLegalizer::GenWidenVectorStores

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 13:58:30 PDT 2020


efriedma added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:5158
+        Align NewAlign =
+            commonAlignment(ST->getOriginalAlign(), Offset.getKnownMinSize());
         SDValue EOp = DAG.getNode(ISD::EXTRACT_SUBVECTOR, dl, NewVT, ValOp,
----------------
getAlign(), not getOriginalAlign(), I think?  Try writing a testcase where the store is at some offset inside a global variable, or something like that, and the difference should be clear.

Also, ideally, we'd continue to use plain getOriginalAlign() for the non-scalable case.  This dance with the alignment is only necessary because we can't specify a scalable offset in the MachinePointerInfo.  Maybe IncrementPointer should be involved in this somehow?


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

https://reviews.llvm.org/D84937



More information about the llvm-commits mailing list