diff options
author | Tanner Gooding <tagoo@outlook.com> | 2022-11-11 01:02:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-11 01:02:03 +0300 |
commit | 37ef5fbefcb8f6f33bdb25df8f7a30164fc3700b (patch) | |
tree | a547a933669227975ccee8b3df0168a552543950 | |
parent | 72ad6649b505a98cae5ff296818df2d7a5da4807 (diff) |
Don't consider `lvSpillAtSingleDef` in `WritesAnyLocation` (#78181)
-rw-r--r-- | src/coreclr/jit/sideeffects.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/coreclr/jit/sideeffects.h b/src/coreclr/jit/sideeffects.h index 9f28e5fe419..f16fe59c9bd 100644 --- a/src/coreclr/jit/sideeffects.h +++ b/src/coreclr/jit/sideeffects.h @@ -128,8 +128,12 @@ public: if ((m_flags & ALIAS_WRITES_LCL_VAR) != 0) { + // Stores to 'lvLiveInOutOfHndlr' locals cannot be reordered with + // exception-throwing nodes so we conservatively consider them + // globally visible. + LclVarDsc* const varDsc = m_compiler->lvaGetDesc(LclNum()); - return varDsc->IsAlwaysAliveInMemory(); + return varDsc->lvLiveInOutOfHndlr != 0; } return false; |