Fix the transformation of `(call ARRADDR_ST x, y, null)`.
authorPat Gavlin <pagavlin@microsoft.com>
Thu, 17 Nov 2016 23:49:49 +0000 (15:49 -0800)
committerPat Gavlin <pagavlin@microsoft.com>
Thu, 17 Nov 2016 23:49:49 +0000 (15:49 -0800)
commitf997866be19aa7086e75def295392cc69a76fd4d
tree4ba9b81c2223c3243d071e6c6fbdf772562eb322
parentdb81622ed195624591e2151c4f2a009ddffef29e
Fix the transformation of `(call ARRADDR_ST x, y, null)`.

`fgMorphCall` transforms `(call ARRADDR_ST x, y, null)` into
`(assign (arrindex x y) null)`. The transformation was not taking into
account the fact that the operands to the call might have been spilled
to temps, and was therefore silently dropping code in the case that they
had been.

This change collects all argument setup nodes in `gtCallArgs` in a
sequence of comma nodes if any exist and attaches the assignment
expression as the ultimate LHS of the comma tree.

Fixes #8150.
src/jit/morph.cpp