Skip to content

Commit 5c659c9

Browse files
authored
AMDGPU: Create a dummy call sequence when emitting call error (#170656)
At least one special case call lowering tries to parse the call sequence and asserts when it can't find a callseq_end.
1 parent 0378f0c commit 5c659c9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1412,7 +1412,12 @@ SDValue AMDGPUTargetLowering::lowerUnhandledCall(CallLoweringInfo &CLI,
14121412
InVals.push_back(DAG.getPOISON(Arg.VT));
14131413
}
14141414

1415-
return CLI.Chain;
1415+
// FIXME: Hack because R600 doesn't handle callseq pseudos yet.
1416+
if (getTargetMachine().getTargetTriple().getArch() == Triple::r600)
1417+
return CLI.Chain;
1418+
1419+
SDValue Chain = DAG.getCALLSEQ_START(CLI.Chain, 0, 0, CLI.DL);
1420+
return DAG.getCALLSEQ_END(Chain, 0, 0, /*InGlue=*/SDValue(), CLI.DL);
14161421
}
14171422

14181423
SDValue AMDGPUTargetLowering::LowerCall(CallLoweringInfo &CLI,

0 commit comments

Comments
 (0)