Add checks for missing SSA numbers (#57274)
authorJakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
Tue, 17 Aug 2021 17:48:38 +0000 (19:48 +0200)
committerGitHub <noreply@github.com>
Tue, 17 Aug 2021 17:48:38 +0000 (19:48 +0200)
commit57839c4c8a28006aacae49a1ddf8e9239fdc7edb
tree2c2ecbf7a122099293aff3dec32e453ed6305db8
parentf7cd0c6b5cc315b1a3105565ecceca5eb656c1bb
Add checks for missing SSA numbers (#57274)

In several places there were cases where we were checking lvaInSsa for
the lcl num of a local tree node, but then proceeded to use the ssa
number directly after. It is possible for a local to be in SSA without
tree nodes themselves having SSA form built for them, for example if
unreachable code makes it to SSA building. This adds some additional
check for missing SSA numbers.
src/coreclr/jit/assertionprop.cpp
src/coreclr/jit/earlyprop.cpp
src/coreclr/jit/optimizer.cpp
src/coreclr/jit/valuenum.cpp
src/tests/JIT/Regression/JitBlue/Runtime_57061/Runtime_57061_2.cs [new file with mode: 0644]
src/tests/JIT/Regression/JitBlue/Runtime_57061/Runtime_57061_2.csproj [new file with mode: 0644]
src/tests/JIT/Regression/JitBlue/Runtime_57061/Runtime_57061_3.cs [new file with mode: 0644]
src/tests/JIT/Regression/JitBlue/Runtime_57061/Runtime_57061_3.csproj [new file with mode: 0644]