rjmccall added inline comments.

================
Comment at: clang/lib/CodeGen/TargetInfo.cpp:2980
 
-    return (Ty->isPromotableIntegerType() ? ABIArgInfo::getExtend(Ty)
-                                          : ABIArgInfo::getDirect());
+    if (!Ty->isExtIntType())
+      return (Ty->isPromotableIntegerType() ? ABIArgInfo::getExtend(Ty)
----------------
erichkeane wrote:
> rjmccall wrote:
> > Presumably *some* `ExtInt` types should be returned directly.
> Right, and they are.  This is only for cases where we request an 'indirect 
> result', so cases where we've already decided that it cannot be passed direct.
> 
> At this point, the 'classify' step has already been done, which would have 
> decided that <=128 bit values are passed 'direct', and we've requested an 
> indirect.  At least as far as I can tell from this code/debugging.
Oh, I see.  So the current code is intentionally using a direct IR return in 
some cases and then allowing LLVM to lower it as an indirect return?  I didn't 
think we ever did that, and I'm really not sure it's a good idea, so I 
definitely agree with not doing it for ExtInt types.


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

https://reviews.llvm.org/D78785



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

Reply via email to