[mono][jit] Fix the removal of relations added by basic blocks. (#83943)
authorZoltan Varga <vargaz@gmail.com>
Tue, 28 Mar 2023 02:42:21 +0000 (22:42 -0400)
committerGitHub <noreply@github.com>
Tue, 28 Mar 2023 02:42:21 +0000 (22:42 -0400)
commit0c5816cb7363e56a31359d6b44ec66537e9a7b01
treeb407daa1451a84123e722caf1de03ddd30b6bd96
parent2ae682e0bfcf9720adb14c3d9eb10f79f6a8e18d
[mono][jit] Fix the removal of relations added by basic blocks. (#83943)

If a basic block added two relations to the same variable, like by two op_not_null
opcodes, then sometimes the relations were not removed, causing
invalid null check elimination in unrelated basic blocks.

Fixes https://github.com/dotnet/runtime/issues/83941.
src/mono/mono/mini/abcremoval.c
src/tests/JIT/Regression/JitBlue/Runtime_83941/Runtime_83941.cs [new file with mode: 0644]
src/tests/JIT/Regression/JitBlue/Runtime_83941/Runtime_83941.csproj [new file with mode: 0644]