Spill side-effects in impAssignMultiRegTypeToVar.
authorPat Gavlin <pagavlin@microsoft.com>
Wed, 19 Apr 2017 18:26:46 +0000 (11:26 -0700)
committerPat Gavlin <pagavlin@microsoft.com>
Wed, 19 Apr 2017 18:30:17 +0000 (11:30 -0700)
commit06bd4184487ac87a2f3854da3cc8d010fa49d8e4
tree0400f2c43cc87e3af1da83b240d68cd00092a803
parente51ba64913e3ce4c6b5bb03f199ee0750b9f9ced
Spill side-effects in impAssignMultiRegTypeToVar.

This importer function converts IR from the form

    tree

to
            /- tree
    STMT - =
            \- lclVar

in order to conform to the JIT's representation of multi-register values.
Today, it does not check whether or not the tree being spilled has any
side-effects that may interfere with the side-effects of trees that are
already on the evaluation stack, which can lead to bad codegen. This
change fixes this function to spill any side-effects on the stack
before generating the temp assign.

Fixes dotnet/coreclr#10940.

Commit migrated from https://github.com/dotnet/coreclr/commit/961f24096a9c2bfe4f848c27e0756669042a8985
src/coreclr/src/jit/importer.cpp