From 1325b90b7534686f9fd7f3169f26989d12e08988 Mon Sep 17 00:00:00 2001 From: Aman Khalid Date: Wed, 22 May 2024 14:06:19 +0000 Subject: [PATCH] Handle GT_SWIFT_ERROR_RET in LinearScan::getKillSetForNode (#102519) Fixes #102349. In LinearScan::getKillSetForNode, GT_SWIFT_ERROR_RET (which represents the regular return value, alongside the Swift error register value to be loaded) needs to be handled like GT_RETURN if Compiler::compIsProfilerHookNeeded is true, which is possible under some JitStress scenarios. --- src/coreclr/jit/lsrabuild.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/coreclr/jit/lsrabuild.cpp b/src/coreclr/jit/lsrabuild.cpp index 1ddcd4d56411b5..9230f20fd12e09 100644 --- a/src/coreclr/jit/lsrabuild.cpp +++ b/src/coreclr/jit/lsrabuild.cpp @@ -1063,6 +1063,7 @@ regMaskTP LinearScan::getKillSetForNode(GenTree* tree) // profiler callback would trash these registers. See vm\amd64\asmhelpers.asm for // more details. case GT_RETURN: + case GT_SWIFT_ERROR_RET: killMask = getKillSetForReturn(); break;