mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1054601 - Don't unroll loops which aren't actually loops, r=jandem.
This commit is contained in:
parent
377633cc99
commit
4c9269f85a
8
js/src/jit-test/tests/ion/bug1054601.js
Normal file
8
js/src/jit-test/tests/ion/bug1054601.js
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
(function() {
|
||||||
|
for (let x = 0; x < 1; ++x) {
|
||||||
|
if (x % 6 == 4) {} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})()
|
@ -115,7 +115,10 @@ LoopUnroller::go(LoopIterationBound *bound)
|
|||||||
JitSpew(JitSpew_Unrolling, "Attempting to unroll loop");
|
JitSpew(JitSpew_Unrolling, "Attempting to unroll loop");
|
||||||
|
|
||||||
header = bound->header;
|
header = bound->header;
|
||||||
JS_ASSERT(header->isLoopHeader());
|
|
||||||
|
// UCE might have determined this isn't actually a loop.
|
||||||
|
if (!header->isLoopHeader())
|
||||||
|
return;
|
||||||
|
|
||||||
backedge = header->backedge();
|
backedge = header->backedge();
|
||||||
oldPreheader = header->loopPredecessor();
|
oldPreheader = header->loopPredecessor();
|
||||||
|
Loading…
Reference in New Issue
Block a user