Skip to content

Commit 2200b10

Browse files
author
Meghana Gupta
committed
[MERGE #6091 @meg-gupta] OS#20500679: Disable addition of masking blocks for speculation hoisting when globopt is off
Merge pull request #6091 from meg-gupta:fixspechoist Addition of masking on blocks for speculation hoisting on loop out edges was turned off for SimpleJit due to reduced perf concerns and issues with assigning regions. However, it was not turned off when globopt is turned off. So we ended up with asserts regarding regions in FlowGraph::Destroy. This changes fixes this.
2 parents 7cb28fa + f2ed9b1 commit 2200b10

File tree

3 files changed

+35
-1
lines changed

3 files changed

+35
-1
lines changed

lib/Backend/BackwardPass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3857,7 +3857,7 @@ BackwardPass::ProcessBlock(BasicBlock * block)
38573857
this->tag == Js::DeadStorePhase
38583858
// We don't do the masking in simplejit due to reduced perf concerns and the issues
38593859
// with handling try/catch structures with late-added blocks
3860-
&& !this->func->IsSimpleJit()
3860+
&& this->func->DoGlobOpt()
38613861
// We don't need the masking blocks in asmjs/wasm mode
38623862
&& !block->GetFirstInstr()->m_func->GetJITFunctionBody()->IsAsmJsMode()
38633863
&& !block->GetFirstInstr()->m_func->GetJITFunctionBody()->IsWasmFunction()

test/EH/regionBugSpecHoisting.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
//-------------------------------------------------------------------------------------------------------
2+
// Copyright (C) Microsoft. All rights reserved.
3+
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
4+
//-------------------------------------------------------------------------------------------------------
5+
6+
function test0() {
7+
var ui8 = new Uint8Array(1);
8+
try {
9+
try {
10+
for (var _strvar28 in ui8) {
11+
try {
12+
return '';
13+
} catch (ex) {
14+
}
15+
try {
16+
} catch (ex) {
17+
}
18+
}
19+
} catch(ex) {
20+
}
21+
} finally {
22+
}
23+
}
24+
test0();
25+
test0();
26+
test0();
27+
test0();
28+
print("Passed\n");

test/EH/rlexe.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,4 +210,10 @@
210210
<compile-flags>-args summary -endargs</compile-flags>
211211
</default>
212212
</test>
213+
<test>
214+
<default>
215+
<files>regionBugSpecHoisting.js</files>
216+
<compile-flags>-mic:1 -off:simplejit</compile-flags>
217+
</default>
218+
</test>
213219
</regress-exe>

0 commit comments

Comments
 (0)