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

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

Issue 28633003: Fix bugs in load elimination and type propagation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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
Index: tests/language/vm/load_to_load_forwarding_vm_test.dart
===================================================================
--- tests/language/vm/load_to_load_forwarding_vm_test.dart (revision 28924)
+++ tests/language/vm/load_to_load_forwarding_vm_test.dart (working copy)
@@ -195,6 +195,24 @@
Expect.equals(2, u.y);
}
+
+testPhiMultipleRepresentations(f, arr) {
+ var w;
+ if (f) {
+ w = arr[0] + arr[1];
+ } else {
+ w = arr[0] - arr[1];
+ }
+ var v;
+ if (f) {
+ v = arr[0];
+ } else {
+ v = arr[0];
+ }
+ return v + w;
+}
+
+
main() {
final fixed = new List(10);
final growable = [];
@@ -236,6 +254,11 @@
testPhiConvertions(false, u32List);
}
+ for (var i = 0; i < 20; i++) {
+ Expect.equals(0.0, testPhiMultipleRepresentations(true, f64List));
+ Expect.equals(0, testPhiMultipleRepresentations(false, const [1,2]));
+ }
+
final escape = new List(1);
for (var i = 0; i < 20; i++) {
fakeAliasing(escape);
« runtime/vm/flow_graph_type_propagator.cc ('K') | « runtime/vm/flow_graph_type_propagator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698