Fix bad codegen for initblk with large fill value
authorChris McKinsey <chrismck@microsoft.com>
Wed, 9 Mar 2016 23:03:48 +0000 (15:03 -0800)
committerChris McKinsey <chrismck@microsoft.com>
Fri, 11 Mar 2016 03:30:00 +0000 (19:30 -0800)
commit2a487c287a732572bb8043fd9f3e17f32c855c35
treeb13901c09801967d7ed4e4fe26f8a261c214ae2e
parentefc4eba1b0f05fe7da21c83221e856a53cee6f34
Fix bad codegen for initblk with large fill value

When the initialization value of an init block is constant we attempt to
generate an inline expansion sequences to execute the stores. In order to
generate wider stores the constant value is expanded so that each byte
position holds the initial byte value. In some cases the constant on the
initblk may be a value not in the range of 0..255 and this constant
expansion will generate the wrong value. This change fixes the x64, x86,
and arm64 (comment only) expanses to use only the lower byte value of this
constant. The ARM32 backend already does this, and the other JIT32/JIT64
JITs shipping in Desktop also do this correctly.
src/jit/lowerarm64.cpp
src/jit/lowerxarch.cpp
tests/src/JIT/Regression/JitBlue/DevDiv_199169/DevDiv_199169.il [new file with mode: 0644]
tests/src/JIT/Regression/JitBlue/DevDiv_199169/DevDiv_199169.ilproj [new file with mode: 0644]
tests/src/JIT/Regression/JitBlue/DevDiv_199169/app.config [new file with mode: 0644]