Fix an assert condition in lowering.
authorPat Gavlin <pagavlin@microsoft.com>
Wed, 2 Nov 2016 21:52:58 +0000 (14:52 -0700)
committerPat Gavlin <pagavlin@microsoft.com>
Wed, 2 Nov 2016 21:52:58 +0000 (14:52 -0700)
commitdfc581382b8e32aaec5e09ee829c5e1a01661794
treeffd4ecc5720c98b9d50f29eaee824286af4363b7
parent3b5cba47d309aef49cb91e2afc9ac9f9c9166e23
Fix an assert condition in lowering.

Tail calls via the tail call helper must live in GC-safe blocks. A block
is GC-safe if either it or all of its dominators are also GC-safe. If we
are not optimizing, we will not compute dominators, and will therfore
not mark blocks whose dominators are all GC-safe. When deciding whether
or not we need to make a block GC-safe during tail call morphing,
however, we allow a tail call in an unmarked block iff the entry block
is GC-safe, as the entry block trivially dominates every reachable
block. This change fixes an assert that was not allowing for a tail call
in a block that is not marked GC-safe where the entry block is marked
GC-safe.

Commit migrated from https://github.com/dotnet/coreclr/commit/c777aec201d57ef1f896bd5a3089fb322cd53707
src/coreclr/src/jit/lower.cpp