================
@@ -672,7 +672,13 @@ bool X86TargetLowering::CanLowerReturn(
const Type *RetTy) const {
SmallVector<CCValAssign, 16> RVLocs;
CCState CCInfo(CallConv, isVarArg, MF, RVLocs, Context);
- return CCInfo.CheckReturn(Outs, RetCC_X86);
+ if (!CCInfo.CheckReturn(Outs, RetCC_X86))
+ return false;
+
+ // Demotion to sret when the value must be returned via memory. This is the
+ // case for fp128 on windows.
+ return llvm::none_of(RVLocs,
+ [](const CCValAssign &VA) { return VA.isMemLoc(); });
----------------
rnk wrote:
I agree, you're right, sorry for being picky. The old patch is probably better.
https://github.com/llvm/llvm-project/pull/204887
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits