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

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 26 11:35:26 PST 2019


rnk 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 ||
----------------
wxiao3 wrote:
> 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?
Sure, I already approved the patch, but it needs a committer to submit it. I see this is your first patch in phab, so I'll go ahead and do that. Thanks for finding regsOverlap!


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

https://reviews.llvm.org/D57643





More information about the llvm-commits mailing list