rjmccall added inline comments.
================
Comment at: clang/lib/CodeGen/CGCall.cpp:2321
+          !isa<llvm::StructType>(ConvertType(Arg->getType())) &&
           ArgI.getCoerceToType() == ConvertType(Ty) &&
           ArgI.getDirectOffset() == 0) {
----------------
I think the right fix is to change the second clause to ArgI.getCoerceToType() 
== ConvertType(Arg->getType()).  The point of this special case is to catch the 
common case that the natural way that IRGen wants to emit the argument 
expression is by producing a single scalar of exactly the right IR type; it 
seems to me that that condition would capture that correctly.


https://reviews.llvm.org/D41311



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

Reply via email to