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:
69241aa
)
JIT: update switch flags after peel (#53570)
author
Andy Ayers
<andya@microsoft.com>
Wed, 2 Jun 2021 16:38:53 +0000
(09:38 -0700)
committer
GitHub
<noreply@github.com>
Wed, 2 Jun 2021 16:38:53 +0000
(09:38 -0700)
If we introduce a temp for the switch operand, the switch node may have extra flags
set that it doesn't need. Reset these based on the operand.
Closes #53548.
src/coreclr/jit/fgopt.cpp
patch
|
blob
|
history
diff --git
a/src/coreclr/jit/fgopt.cpp
b/src/coreclr/jit/fgopt.cpp
index
985b7e8
..
5f029de
100644
(file)
--- a/
src/coreclr/jit/fgopt.cpp
+++ b/
src/coreclr/jit/fgopt.cpp
@@
-3799,6
+3799,7
@@
bool Compiler::fgOptimizeSwitchJumps()
// Update flags
//
+ switchTree->gtFlags = switchTree->AsOp()->gtOp1->gtFlags;
dominantCaseCompare->gtFlags |= dominantCaseCompare->AsOp()->gtOp1->gtFlags;
jmpTree->gtFlags |= dominantCaseCompare->gtFlags;
dominantCaseCompare->gtFlags |= GTF_RELOP_JMP_USED | GTF_DONT_CSE;