Fix ref count adjustment in `fgMorphBlockStmt`.
authorPat Gavlin <pagavlin@microsoft.com>
Wed, 14 Dec 2016 20:23:54 +0000 (12:23 -0800)
committerPat Gavlin <pagavlin@microsoft.com>
Wed, 14 Dec 2016 20:23:54 +0000 (12:23 -0800)
commit8c5d9741222d450295dd97f5c2a419f74cd2e29d
tree88017d2536ac67adc89e3effb2829fc0d6786cef
parentdc59439c0f02d0b45d53baabf85979a5af08be92
Fix ref count adjustment in `fgMorphBlockStmt`.

LclVar ref counts must be incremented before attempting to remove the
morphed statement, since doing so decrements ref counts (and thus
requires refcounts to be conservatively correct).

Fixes VSO 359734.

Commit migrated from https://github.com/dotnet/coreclr/commit/530b45d88b08db93b89da144e22a2f34209971ab
src/coreclr/src/jit/morph.cpp