Set overflow flag for add/sub hi on x86 TYP_LONG
authorMichelle McDaniel <adiaaida@gmail.com>
Mon, 2 May 2016 20:52:39 +0000 (13:52 -0700)
committerMichelle McDaniel <adiaaida@gmail.com>
Tue, 3 May 2016 20:47:15 +0000 (13:47 -0700)
commit01ab88cd6548eeb0adaeeff9f312645bd34c187e
treece29612ed9c0d1c844aafa4b2e1ce43d8d5d8eae
parent3db1f63b832deb9c12e9cf4a35ef6428d5f550a2
Set overflow flag for add/sub hi on x86 TYP_LONG

When we create the hi operation for add and sub on TYP_LONG, we don't
carry the overflow flag to the hi operation. This change sets the overflow
flag on hiResult in lower if it was set on loResult, and adds GT_ADD_HI
and GT_SUB_HI to the operations that can have overflow. We also need to
pass the unsigned flag to the high part in the instance that we are
dealing with an add or subtract with overflow. Fixes dotnet/coreclr#4596.

Commit migrated from https://github.com/dotnet/coreclr/commit/230d693afc8b253df012fb4569e42ba731e6f5d2
src/coreclr/src/jit/codegenxarch.cpp
src/coreclr/src/jit/compiler.hpp
src/coreclr/src/jit/lower.cpp
src/coreclr/tests/issues.targets
src/coreclr/tests/ryujit_x86_no_fallback_issues.targets