Disable UseAggressiveReg2MemForCodeSize on WASM

It causes an LLVM WASM backend instruction selection failure.

rdar://139541259
This commit is contained in:
Arnold Schwaighofer
2024-11-08 15:51:12 -08:00
parent 5bd4113e11
commit e07f4d4f85

View File

@@ -3786,6 +3786,11 @@ bool CompilerInvocation::parseArgs(
OPT_disable_aggressive_reg2mem,
SILOpts.UseAggressiveReg2MemForCodeSize);
// We ran into a LLVM backed instruction selection failure.
// This is a workaround.
if (LangOpts.Target.isWasm())
SILOpts.UseAggressiveReg2MemForCodeSize = false;
// With Swift 6, enable @_spiOnly by default. This also enables proper error
// reporting of ioi references from spi decls.
if (LangOpts.EffectiveLanguageVersion.isVersionAtLeast(6)) {