[PATCH] D57643: [X86] Fix bug in vectorcall calling convention

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 21 13:16:54 PST 2019


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

lgtm



================
Comment at: lib/Target/X86/X86CallingConv.cpp:165
       // At that case for each argument a shadow stack of 8 bytes is allocated.
-      if (Reg == X86::XMM4 || Reg == X86::XMM5)
+      if (Reg == X86::XMM4 || Reg == X86::XMM5 ||
+          Reg == X86::YMM4 || Reg == X86::YMM5 ||
----------------
rnk wrote:
> One way to deal with this would be to find MCRegisterInfo and ask if this is a sub/super register of XMM0 so we don't have to enumerate all the X,Y,Z cases and inevitable W someday in the future. But I'd accept this fix as is because I'm not sure how to get the register info data here.
Eh, now I feel this made the code less readable since we still have to say XMM4/5 twice. Anyway, I'm not that concerned.


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

https://reviews.llvm.org/D57643





More information about the llvm-commits mailing list