[PATCH] D61892: [AArch64] Treat x18 as callee-saved in functions with windows calling convention on non-windows OSes

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 29 12:00:32 PDT 2020


mstorsjo marked an inline comment as done.
mstorsjo added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:3947
+  // from those functions.
+  if (CallerCC == CallingConv::Win64 && !Subtarget->isTargetWindows())
+    return false;
----------------
mstorsjo wrote:
> efriedma wrote:
> > Do we want to also check that the callee CC isn't Win64?
> Hmm, indeed - in that case we could actually allow the tail call, yes. I'll see if I can add a test for that case.
Actually, we don't produce tail calls for the Win64 calling convention at all right now - it isn't in `mayTailCallThisCC` above at all. I guess that _should_ be fine but I'm not sure if it'd break anything, and I think adding it in this patch would be a bit out of scope. I can add that bit into the condition here though, but that case wouldn't be usable just yet at least, and not be tested here.


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

https://reviews.llvm.org/D61892





More information about the llvm-commits mailing list