projects
/
platform
/
upstream
/
coreclr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7512213
)
JIT: add a bit more importer folding (#16111)
author
Andy Ayers
<andya@microsoft.com>
Wed, 31 Jan 2018 22:06:59 +0000
(14:06 -0800)
committer
GitHub
<noreply@github.com>
Wed, 31 Jan 2018 22:06:59 +0000
(14:06 -0800)
Eagerly fold expression trees for non-branch conditional operations.
Leads to elimination of boxes in some idiomatic uses. See notes and
examples in #14472.
src/jit/importer.cpp
patch
|
blob
|
history
diff --git
a/src/jit/importer.cpp
b/src/jit/importer.cpp
index
0c7b560
..
4c3ea55
100644
(file)
--- a/
src/jit/importer.cpp
+++ b/
src/jit/importer.cpp
@@
-12054,6
+12054,9
@@
void Compiler::impImportBlockCode(BasicBlock* block)
op1->gtFlags |= GTF_RELOP_NAN_UN | GTF_UNSIGNED;
}
+ // Fold result, if possible.
+ op1 = gtFoldExpr(op1);
+
impPushOnStack(op1, tiRetVal);
break;