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

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

Issue 961443005: Fix Range::Mul for fully non-positive ranges. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 | « runtime/vm/flow_graph_range_analysis.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/vm/regress_22541_vm_test.dart
diff --git a/tests/language/vm/regress_22541_vm_test.dart b/tests/language/vm/regress_22541_vm_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..21b8991e5499b1955c175edf8183e2bfb3fee9b5
--- /dev/null
+++ b/tests/language/vm/regress_22541_vm_test.dart
@@ -0,0 +1,22 @@
+// Copyright (c) 2015, 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 allocation sinking optimization.
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+
+import 'package:expect/expect.dart';
+
+test(a) {
+ var x = a ? -1 : -2;
+ if (0 < (x * x)) {
+ return "ok";
+ } else {
+ return "fail";
+ }
+}
+
+main() {
+ for (var j = 0; j < 20; j++) {
+ Expect.equals("ok", test(false));
+ }
+}
« no previous file with comments | « runtime/vm/flow_graph_range_analysis.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698