Index: tests/language/vm/load_to_load_forwarding_vm_test.dart |
diff --git a/tests/language/vm/load_to_load_forwarding_vm_test.dart b/tests/language/vm/load_to_load_forwarding_vm_test.dart |
index 5926305c36f8c7f76ddb37fcaba08d85e3d3fbf0..01dcabd48736baffd3b668dcd04180623da14f56 100644 |
--- a/tests/language/vm/load_to_load_forwarding_vm_test.dart |
+++ b/tests/language/vm/load_to_load_forwarding_vm_test.dart |
@@ -284,6 +284,63 @@ testIndexedAliasedStore4(b) { |
} |
+testIndexedAliasedStore5(b) { |
+ var a = new List(2), |
+ c = new List(2); |
+ a[0] = 1; |
+ b[0] = 3; |
+ c[0] = 4; |
+ b[0] = 5; |
+ return a[0] << 8 | c[0]; |
+} |
+ |
+ |
+testIndexedAliasedStore6(x, b) { |
+ var a = new List(2), |
+ c = new List(2); |
+ b = x ? b : c; |
+ a[0] = 1; |
+ b[0] = 3; |
+ c[0] = 4; |
+ b[0] = 5; |
+ return a[0] << 8 | c[0]; |
+} |
+ |
+testIndexedAliasedStore7(x, b, i) { |
+ var a = new List(2), |
+ c = new List(2); |
+ b = x ? b : c; |
+ a[0] = 1; |
+ b[0] = 3; |
+ c[0] = 4; |
+ b[i] = 5; |
+ return a[0] << 8 | c[0]; |
+} |
+ |
+ |
+testIndexedAliasedStore8(x, b, i) { |
+ var a = new List(2), |
+ c = new List(2); |
+ b = x ? b : c; |
+ a[i] = 1; |
+ b[0] = 3; |
+ c[i] = 4; |
+ b[0] = 5; |
+ return a[i] << 8 | c[i]; |
+} |
+ |
+ |
+testIndexedAliasedStore9(b, i) { |
+ var a = new List(2), |
+ c = new List(2); |
+ a[i] = 1; |
+ b[0] = 3; |
+ c[i] = 4; |
+ b[0] = 5; |
+ return a[i] << 8 | c[i]; |
+} |
+ |
+ |
var indices = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; |
class Z { |
@@ -316,7 +373,7 @@ main() { |
final obj = new X(new X(new X(null))); |
- final cs = new C(0, new C(1, new C(2, null))); |
+ final cs = new C(0, new C(1, new C(2, null))); |
for (var i = 0; i < 20; i++) { |
Expect.listEquals([0x02010000, 0x03020100], foo(new A(0, 0))); |
@@ -378,6 +435,34 @@ main() { |
Expect.equals(1, testIndexedAliasedStore4(array)); |
} |
+ for (var i = 0; i < 20; i++) { |
+ Expect.equals(1 << 8 | 4, testIndexedAliasedStore5(array)); |
+ } |
+ |
+ for (var i = 0; i < 20; i++) { |
+ Expect.equals(1 << 8 | 4, testIndexedAliasedStore6(true, array)); |
+ Expect.equals(1 << 8 | 5, testIndexedAliasedStore6(false, array)); |
+ } |
+ |
+ for (var i = 0; i < 20; i++) { |
+ Expect.equals(1 << 8 | 4, testIndexedAliasedStore7(true, array, 0)); |
+ Expect.equals(1 << 8 | 4, testIndexedAliasedStore7(true, array, 1)); |
+ Expect.equals(1 << 8 | 5, testIndexedAliasedStore7(false, array, 0)); |
+ Expect.equals(1 << 8 | 4, testIndexedAliasedStore7(false, array, 1)); |
+ } |
+ |
+ for (var i = 0; i < 20; i++) { |
+ Expect.equals(1 << 8 | 4, testIndexedAliasedStore8(true, array, 0)); |
+ Expect.equals(1 << 8 | 4, testIndexedAliasedStore8(true, array, 1)); |
+ Expect.equals(1 << 8 | 5, testIndexedAliasedStore8(false, array, 0)); |
+ Expect.equals(1 << 8 | 4, testIndexedAliasedStore8(false, array, 1)); |
+ } |
+ |
+ for (var i = 0; i < 20; i++) { |
+ Expect.equals(1 << 8 | 4, testIndexedAliasedStore9(array, 0)); |
+ Expect.equals(1 << 8 | 4, testIndexedAliasedStore9(array, 1)); |
+ } |
+ |
var test_array = new List(1); |
for (var i = 0; i < 20; i++) { |
Expect.equals(43, testAliasingStoreIndexed(global_array)); |