From 296853bdf53b61f2e91b1f8e4d9ee8c087572a12 Mon Sep 17 00:00:00 2001 From: Andy Ayers Date: Thu, 4 Jun 2026 17:58:26 -0700 Subject: [PATCH] SuperPMI: re-apply JitWasmNyiToR2RUnsupported when ignoring stored config The asmdiffs-checked-release leg uses -ignoreStoredConfig, which drops the JitWasmNyiToR2RUnsupported=1 setting that crossgen-corelib.proj recorded into the MCH stored config at collection time. The wasm JIT then asserts on unimplemented opcodes (e.g. GT_ASYNC_CONTINUATION) instead of cleanly skipping them as R2R-unsupported. Re-supply the option externally for wasm whenever we pass -ignoreStoredConfig. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/coreclr/scripts/superpmi.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/coreclr/scripts/superpmi.py b/src/coreclr/scripts/superpmi.py index 0a36d7c55220fc..14f1bbe1bba9b1 100644 --- a/src/coreclr/scripts/superpmi.py +++ b/src/coreclr/scripts/superpmi.py @@ -2280,6 +2280,17 @@ def replay_with_asm_diffs(self): # two Release compilers, so this is safest. flags += [ "-ignoreStoredConfig" ] + # `-ignoreStoredConfig` drops any codegenopt the collection recorded into the + # MCH stored config. For wasm we need to re-supply + # `JitWasmNyiToR2RUnsupported=1` (set by crossgen-corelib.proj during collection) + # so that unimplemented opcodes turn into R2R-unsupported skips rather than + # asserts. FIXME: remove once wasm codegen covers all cases. + if self.coreclr_args.target_arch == "wasm": + flags += [ + "-jitoption", "force", "JitWasmNyiToR2RUnsupported=1", + "-jit2option", "force", "JitWasmNyiToR2RUnsupported=1" + ] + # Change the working directory to the Core_Root we will call SuperPMI from. # This is done to allow libcoredistools to be loaded correctly on unix # as the loadlibrary path will be relative to the current directory.