Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(566)

Side by Side Diff: test/mjsunit/compiler/regress-639210.js

Issue 2270793004: [turbofan] Fix merging of empty and non-empty state in load elimination. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/load-elimination.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Flags: --allow-natives-syntax
6
7 var m = (function m() {
8 "use asm"
9 var i32 = new Int32Array(4);
10 var f64 = new Float64Array(4);
11
12 function init() {
13 i32[0] = 1;
14 f64[0] = 0.1;
15 }
16
17 function load(b) {
18 return (b ? 0 : i32[0]) + i32[0];
19 }
20
21 function store(b) {
22 if (b|0) {
23 } else {
24 f64[0] = 42;
25 }
26 return f64[0];
27 }
28
29 return { init : init, load : load, store : store };
30 })();
31
32 m.init();
33
34 %OptimizeFunctionOnNextCall(m.load);
35 assertEquals(2, m.load());
36
37 %OptimizeFunctionOnNextCall(m.store);
38 assertEquals(0.1, m.store(1));
OLDNEW
« no previous file with comments | « src/compiler/load-elimination.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698