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

Unified Diff: tests/lib/typed_data/float32x4_unbox_regress_test.dart

Issue 14288006: Inline Float32x4 comparison. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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/intermediate_language_x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/typed_data/float32x4_unbox_regress_test.dart
diff --git a/tests/lib/typed_data/float32x4_unbox_regress_test.dart b/tests/lib/typed_data/float32x4_unbox_regress_test.dart
index e166c3f561204b5c727406da909b2dd4808e4047..c20a6eab4b667333241d72f67597a2997dcb836b 100644
--- a/tests/lib/typed_data/float32x4_unbox_regress_test.dart
+++ b/tests/lib/typed_data/float32x4_unbox_regress_test.dart
@@ -73,8 +73,45 @@ void testGetDeopt() {
}
}
+void testComparison(a, b) {
+ Uint32x4 r = a.equal(b);
+ Expect.equals(true, r.flagX);
+ Expect.equals(false, r.flagY);
+ Expect.equals(false, r.flagZ);
+ Expect.equals(true, r.flagW);
+}
+
+void testComparisonDeopt() {
+ var a = new Float32x4(1.0, 2.0, 3.0, 4.0);
+ var b = new Float32x4(1.0, 2.1, 3.1, 4.0);
+ var smi = 12;
+
+ for (int i = 0; i < 2000; i++) {
+ testComparison(a, b);
+ }
+
+ try {
+ testComparison(a, smi);
+ } catch (_) {
+ }
+
+ for (int i = 0; i < 2000; i++) {
+ testComparison(a, b);
+ }
+
+ try {
+ testComparison(smi, a);
+ } catch (_) {
+ }
+
+ for (int i = 0; i < 2000; i++) {
+ testComparison(a, b);
+ }
+}
+
main() {
testListStoreDeopt();
testAddDeopt();
testGetDeopt();
+ testComparisonDeopt();
}
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698