JIT: fix bad assumption in non-funclet EH models
authorAndy Ayers <andya@microsoft.com>
Sat, 14 Jan 2017 03:28:30 +0000 (19:28 -0800)
committerAndy Ayers <andya@microsoft.com>
Sat, 14 Jan 2017 03:28:30 +0000 (19:28 -0800)
commit1953d32eacf7bbf7634c294c6c6371293c6852ac
treee5db72cee6587bbf6463724e808bb0d4909121d6
parent820ae952ab63d39786c60c0cba9a91cf8bc29579
JIT: fix bad assumption in non-funclet EH models

The newly added finally optimizations mistakenly assumed that in
non-fuclet EH models the GT_END_LFIN in the continuation block would
be the last statement. The test case added below provides an example
where this is not so.

Relax the assumption and instead search the continuation for the
GT_END_LFIN. Assert that there is exactly one.

Commit migrated from https://github.com/dotnet/coreclr/commit/0df4892d1d7e04fc817beb7f10be4faae0dfaf82
src/coreclr/src/jit/flowgraph.cpp
src/coreclr/tests/src/JIT/Regression/JitBlue/DevDiv_367099/DevDiv_367099.il [new file with mode: 0644]
src/coreclr/tests/src/JIT/Regression/JitBlue/DevDiv_367099/DevDiv_367099.ilproj [new file with mode: 0644]