Fix three SIMD-related bugs.
authorPat Gavlin <pagavlin@microsoft.com>
Mon, 27 Jun 2016 19:46:06 +0000 (12:46 -0700)
committerPat Gavlin <pagavlin@microsoft.com>
Mon, 27 Jun 2016 20:24:46 +0000 (13:24 -0700)
commit1b35c0a24c08657dfa0c1217f362eec794c0286b
treeb15eb60a4af4a7b54cca699da1b9b3db4d2079e0
parent7081a2b5ecab517d5e9cbe49267682c520468404
Fix three SIMD-related bugs.

The first two bugs involve SIMD nodes that are created by the JIT
for intermediate SIMD operations. These interediate operations
are not directly represented in metadata) and may therefore use
SIMD types that are not present in metadata. For example, metadata
may only use Vector<T>, but the IR may represent some intermediate
operations using the natural vector type for the target machine.
In these cases, the JIT will not be able to derive a type handle
for the SIMD type, which was causing a couple of issues:
- `gtNewTempAssign` was generating a `GT_ASG` node instead of a
  `GT_COPYBLK` when given trees involving these operations and
  types
- `gtGetStructHandleIfPresent` was returning an invalid type handle
  when dealing with SIMD-typed `GT_IND` nodes

The fix for the former is to check for SIMD-typed trees in
`gtNewTempAssign` and `gtNewCpObjNode`; the fix for the latter is
to check for SIMD-typed trees before checking for the array index
flag on a `GT_IND` in `gtGetStructHandleIfPresent`.

The third bug is that `gtNewTempAssign` was not setting the
`lvSIMDType` flag on local vars after changing their type to a SIMD
type.
src/jit/gentree.cpp