Skip to content

Commit 6e4f7c0

Browse files
committed
[Statepoints] Take result type from gc.result [NFC]
When lowering a gc.result, we can assume that the result type of the gc.result matches the type of the underlying call. This is explicitly required in LangRef. At the moment, this makes little difference, but for opaque pointers we need a means to get result typing without relying on pointee types.
1 parent 093b43f commit 6e4f7c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,7 @@ void SelectionDAGBuilder::visitGCResult(const GCResultInst &CI) {
11801180
// register because statepoint and actual call return types can be
11811181
// different, and getValue() will use CopyFromReg of the wrong type,
11821182
// which is always i32 in our case.
1183-
Type *RetTy = SI->getActualReturnType();
1183+
Type *RetTy = CI.getType();
11841184
SDValue CopyFromReg = getCopyFromRegs(SI, RetTy);
11851185

11861186
assert(CopyFromReg.getNode());

0 commit comments

Comments
 (0)