[PATCH] D97514: [SystemZ] Assign the full space for promoted and split outgoing args

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 1 05:51:43 PST 2021


uweigand added inline comments.


================
Comment at: llvm/lib/Target/SystemZ/SystemZISelLowering.cpp:1588
+      if (SlotVT.getSizeInBits() > 64 &&
+          getTypeAction(Ctx, SlotVT) == TypePromoteInteger) {
+        // Allocate the full stack space for a promoted (and split) argument.
----------------
I'm not sure this is the correct check, it doesn't appear to match anything that is done in common code ...

I think it would be better to explicitly check for the case of multiple parts (e.g. via `if (I + 1 != E && Outs[I + 1].OrigArgIndex == ArgIndex)`).  If it's just a single part, I think the current approach to just use `Outs[I].ArgVT` is the best; if it is multiple parts, then we should do the NumParts * PartSize allocation as you do below.


================
Comment at: llvm/lib/Target/SystemZ/SystemZISelLowering.cpp:1594
+      }
+      SDValue SpillSlot = DAG.CreateStackTemporary(SlotVT);
+
----------------
jonpa wrote:
> This was easier than calling CreateStackTemporary with a TypeSize and an alignment value.
Ah, OK.  Makes sense as well.


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

https://reviews.llvm.org/D97514



More information about the llvm-commits mailing list