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

Wei Xiao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 26 01:29:21 PST 2019


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


================
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:
> 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.
The XMM4/5 only appear once. Can we merge it now?


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

https://reviews.llvm.org/D57643





More information about the llvm-commits mailing list