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:
9af8d30
)
JIT: remove loop if `lpTop` becomes unreachable (#70324)
author
Andy Ayers
<andya@microsoft.com>
Tue, 7 Jun 2022 20:56:31 +0000
(13:56 -0700)
committer
GitHub
<noreply@github.com>
Tue, 7 Jun 2022 20:56:31 +0000
(13:56 -0700)
We may be able to prune the backedge of a middle-entry loop (one where
`lpEntry != lpTop`). Extend `optUpdateLoopsBeforeRemoveBlock` to handle
this case.
Fixes #69938.
src/coreclr/jit/optimizer.cpp
patch
|
blob
|
history
diff --git
a/src/coreclr/jit/optimizer.cpp
b/src/coreclr/jit/optimizer.cpp
index
ca034a1
..
b848d64
100644
(file)
--- a/
src/coreclr/jit/optimizer.cpp
+++ b/
src/coreclr/jit/optimizer.cpp
@@
-443,7
+443,7
@@
void Compiler::optUpdateLoopsBeforeRemoveBlock(BasicBlock* block, bool skipUnmar
#endif // DEBUG
};
- if (
block == loop.lpEntry || block == loop.lpBottom
)
+ if (
(block == loop.lpEntry) || (block == loop.lpBottom) || (block == loop.lpTop)
)
{
reportBefore();
optMarkLoopRemoved(loopNum);