Fix two bugs revealed during internal testing.
authorPat Gavlin <pagavlin@microsoft.com>
Fri, 18 Nov 2016 21:30:24 +0000 (13:30 -0800)
committerPat Gavlin <pagavlin@microsoft.com>
Fri, 18 Nov 2016 21:30:24 +0000 (13:30 -0800)
commit078500477bad4a165393198093df6297c90b3b34
tree5301cfa1be4e0af5b2ff48691cc5110705b1b489
parenta68d387aeb5993b54b2dc15c631f2836cde44989
Fix two bugs revealed during internal testing.

- gtNewTempAssign was unnecessarily creating a new node to represent the
  value being assigned to a temp if the value was a normalize-on-load
  lclVar. This caused problems when using `gtNewTempAssign` as part of
  `LIR::Use::ReplaceWithLclVar`, which assumes that `gtNewTempAssign`
  only creates a single node (the new `st.lclVar` node). Instead of
  creating a new lclVar node, simply change the type of the existing
  node.
- LowerSignedDivOrMod contained an unnecessarily strong assertion. This
  assertion has been removed.

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