rnk added inline comments.

================
Comment at: clang/lib/CodeGen/TargetInfo.cpp:4364-4365
 
   // MS x64 ABI requirement: "Any argument that doesn't fit in 8 bytes, or is
   // not 1, 2, 4, or 8 bytes, must be passed by reference."
   if (isAggregateTypeForABI(Ty) || Ty->isMemberPointerType()) {
----------------
I wonder if we should make the check more general. There are other cases to 
consider, like `__int128`. How does GCC pass other large types through varargs? 
It looks to me like clang passes those indirectly, so we could go ahead and 
check the type size directly without these aggregate checks.

Separately, I think `X86_64ABIInfo::EmitMSVAArg` has a bug, it always passes 
false for indirect, but it should match this code here exactly. Ideally, they 
would share an implementation.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103452

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to