1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 10:32:48 +02:00

Fix tail call guarantee setting for GHC on arm64 backend

This commit is contained in:
sguo35 2022-04-27 23:21:46 -07:00 committed by Ivan
parent 509d31ad89
commit eb7a5e5301

View File

@ -5526,7 +5526,7 @@ SDValue AArch64TargetLowering::LowerCallResult(
/// Return true if the calling convention is one that we can guarantee TCO for.
static bool canGuaranteeTCO(CallingConv::ID CC, bool GuaranteeTailCalls) {
return (CC == CallingConv::Fast && GuaranteeTailCalls) ||
CC == CallingConv::Tail || CC == CallingConv::SwiftTail;
CC == CallingConv::Tail || CC == CallingConv::SwiftTail || CC == CallingConv::GHC;
}
/// Return true if we might ever do TCO for calls with this calling convention.
@ -5539,6 +5539,7 @@ static bool mayTailCallThisCC(CallingConv::ID CC) {
case CallingConv::SwiftTail:
case CallingConv::Tail:
case CallingConv::Fast:
case CallingConv::GHC:
return true;
default:
return false;