[PATCH] D102766: [SelectionDAG] Implement PromoteIntRes_INSERT_SUBVECTOR

Peter Waller via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 20 12:33:46 PDT 2021


peterwaller-arm added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:4717
+
+  // Spill the vector to the stack.
+  Align SmallestAlign = DAG.getReducedAlign(SubVecVT, /*UseABI=*/false);
----------------
peterwaller-arm wrote:
> For me, the term 'spilling' is usually associated with running out of registers and needing to create register space by spilling them to the stack.
> 
> I think a comment here instead should express the intent of the code, something like "To insert SubVec into Vec, store the wider vector to memory, overwrite the lower half with the narrower vector, and reload". The other comments can probably be removed.
> 
Whoops - not 'lower half', because of course you can insert at a given index, nt just the lower order bits. So the comment needs adjusting.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102766



More information about the llvm-commits mailing list