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

Unified Diff: tests/language/vm/load_to_load_unaligned_forwarding_vm_test.dart

Issue 868283002: Fix LoadOptimizer's handling of load/stores with constant indices for TypedData. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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 | « tests/language/vm/load_to_load_forwarding_vm_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/vm/load_to_load_unaligned_forwarding_vm_test.dart
diff --git a/tests/language/vm/load_to_load_unaligned_forwarding_vm_test.dart b/tests/language/vm/load_to_load_unaligned_forwarding_vm_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..0d9790fff0d8264c8c5a9f71a473f38a54fda33e
--- /dev/null
+++ b/tests/language/vm/load_to_load_unaligned_forwarding_vm_test.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// Test correctness of side effects tracking used by load to load forwarding.
+// Should be merged into load_to_load_forwarding once Issue 22151 is fixed.
+
+// VMOptions=--optimization-counter-threshold=10
+
+import "package:expect/expect.dart";
+import "dart:typed_data";
+
+testViewAliasing5() {
+ final f32 = new Float32List(2);
+ final raw = f32.buffer.asByteData();
+ f32[0] = 1.5; // Aliased by unaligned write of the same size.
+ raw.setInt32(1, 0x00400000, Endianness.LITTLE_ENDIAN);
+ return f32[0];
+}
+
+main() {
+ for (var i = 0; i < 20; i++) {
+ Expect.equals(2.0, testViewAliasing5());
+ }
+}
« no previous file with comments | « tests/language/vm/load_to_load_forwarding_vm_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698