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

Unified Diff: test/mjsunit/compiler/regress-694088.js

Issue 2725593002: [turbofan] Fix handling of typed array loads in load elimination. (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/load-elimination.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/compiler/regress-694088.js
diff --git a/test/mjsunit/compiler/regress-694088.js b/test/mjsunit/compiler/regress-694088.js
new file mode 100644
index 0000000000000000000000000000000000000000..42817092a0cf14e3710d23fac973093c02224d8e
--- /dev/null
+++ b/test/mjsunit/compiler/regress-694088.js
@@ -0,0 +1,29 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+(function () {
+ var buffer = new ArrayBuffer(8);
+ var i32 = new Int32Array(buffer);
+ var f64 = new Float64Array(buffer);
+
+ function foo() {
+ f64[0] = 1;
+ var x = f64[0];
+ return i32[0];
+ }
+ assertEquals(0, foo());
JaideepBajwa 2017/03/01 21:52:18 The testcase fails on Big Endian platforms, the be
+})();
+
+(function () {
+ var buffer = new ArrayBuffer(8);
+ var i16 = new Int16Array(buffer);
+ var i32 = new Int32Array(buffer);
+
+ function foo() {
+ i32[0] = 0x10001;
+ var x = i32[0];
+ return i16[0];
+ }
+ assertEquals(1, foo());
+})();
« 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