[llvm] [StatepointLowering] Handle struct return through stack (PR #157251)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 10 18:56:44 PDT 2025
================
@@ -337,13 +337,17 @@ static std::pair<SDValue, SDNode *> lowerCallFromStatepointLoweringInfo(
//
// get_return_value can either be a sequence of CopyFromReg instructions
// to grab the return value from the return register(s), or it can be a LOAD
- // to load a value returned by reference via a stack slot.
+ // to load a value returned by reference via a stack slot, or it can be a
+ // struct returned by value through stack.
if (CallEnd->getOpcode() == ISD::EH_LABEL)
CallEnd = CallEnd->getOperand(0).getNode();
- bool HasDef = !SI.CLI.RetTy->isVoidTy();
+ bool HasDef = !SI.CLI.RetTy->isVoidTy() || !SI.CLI.OutVals.empty();
----------------
arsenm wrote:
```suggestion
bool HasDef = !SI.CLI.OutVals.empty();
```
Should be redundant?
https://github.com/llvm/llvm-project/pull/157251
More information about the llvm-commits
mailing list