projects
/
platform
/
upstream
/
dotnet
/
runtime.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd6db88
)
add comment
author
Hyeongseok Oh
<hseok82.oh@samsung.com>
Wed, 7 Sep 2016 04:18:39 +0000
(13:18 +0900)
committer
GitHub
<noreply@github.com>
Wed, 7 Sep 2016 04:18:39 +0000
(13:18 +0900)
Commit migrated from https://github.com/dotnet/coreclr/commit/
1fd05c6120036bf180b595aa2321d8656a02c3d7
src/coreclr/src/jit/gentree.cpp
patch
|
blob
|
history
diff --git
a/src/coreclr/src/jit/gentree.cpp
b/src/coreclr/src/jit/gentree.cpp
index
39245ba
..
dd244b7
100644
(file)
--- a/
src/coreclr/src/jit/gentree.cpp
+++ b/
src/coreclr/src/jit/gentree.cpp
@@
-12049,6
+12049,9
@@
GenTreePtr Compiler::gtFoldExprConst(GenTreePtr tree)
if (d1 <= -1.0 && varTypeIsUnsigned(tree->CastToType()))
{
+ // Don't fold conversions of these cases becasue the result is unspecified per ECMA spec
+ // and the native math doing the fold doesn't match the run-time computation on all platforms.
+ // We want the behavior to be same with or without folding.
return tree;
}