Fix VSO bug 405852.
authorPat Gavlin <pagavlin@microsoft.com>
Mon, 10 Apr 2017 21:17:08 +0000 (14:17 -0700)
committerPat Gavlin <pagavlin@microsoft.com>
Mon, 10 Apr 2017 21:17:08 +0000 (14:17 -0700)
commit504dcd7001fcdf4e6dd9ff5e6084432589a115a8
tree35acf12b0b061242cf16cbc62e96bb8acb4f04e6
parent80423b67b16f563bbcb281f996c7b5cdee96093a
Fix VSO bug 405852.

This bug was due to a mismatch between the semantics of the FP modulus
operator as specified by ECMA-335 and as implemented by value numbering.

ECMA-335 requires the following behavior for FP modulus:
- If the divisor is 0 or the dividend is not finite, the result is NaN
- If the divisor is not finite and is not NaN, the result is the
  dividend.
Value numbering, however, simply used `fmod`, which does not have these
semantics. This change implements the required semantics in VN.
src/jit/valuenum.cpp
tests/src/JIT/Regression/JitBlue/DevDiv_405852/DevDiv_405852.il [new file with mode: 0644]
tests/src/JIT/Regression/JitBlue/DevDiv_405852/DevDiv_405852.ilproj [new file with mode: 0644]