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

Side by Side Diff: test/cctest/compiler/test-branch-combine.cc

Issue 813813003: Revert of Remove obsolete V8_INFINITY macro. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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 unified diff | Download patch
« no previous file with comments | « test/cctest/compiler/function-tester.h ('k') | test/cctest/compiler/test-js-constant-cache.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "test/cctest/cctest.h" 7 #include "test/cctest/cctest.h"
8 #include "test/cctest/compiler/codegen-tester.h" 8 #include "test/cctest/compiler/codegen-tester.h"
9 #include "test/cctest/compiler/value-helper.h" 9 #include "test/cctest/compiler/value-helper.h"
10 10
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 TEST(BranchCombineInt32CmpAllInputShapes_inverse_branch_false) { 407 TEST(BranchCombineInt32CmpAllInputShapes_inverse_branch_false) {
408 for (int i = 0; i < static_cast<int>(arraysize(int32cmp_opcodes)); i++) { 408 for (int i = 0; i < static_cast<int>(arraysize(int32cmp_opcodes)); i++) {
409 CmpBranchGen gen(int32cmp_opcodes[i], true, true, 595 + i, -4011 - i); 409 CmpBranchGen gen(int32cmp_opcodes[i], true, true, 595 + i, -4011 - i);
410 Int32BinopInputShapeTester tester(&gen); 410 Int32BinopInputShapeTester tester(&gen);
411 tester.TestAllInputShapes(); 411 tester.TestAllInputShapes();
412 } 412 }
413 } 413 }
414 414
415 415
416 TEST(BranchCombineFloat64Compares) { 416 TEST(BranchCombineFloat64Compares) {
417 double inf = std::numeric_limits<double>::infinity(); 417 double inf = V8_INFINITY;
418 double nan = v8::base::OS::nan_value(); 418 double nan = v8::base::OS::nan_value();
419 double inputs[] = {0.0, 1.0, -1.0, -inf, inf, nan}; 419 double inputs[] = {0.0, 1.0, -1.0, -inf, inf, nan};
420 420
421 int32_t eq_constant = -1733; 421 int32_t eq_constant = -1733;
422 int32_t ne_constant = 915118; 422 int32_t ne_constant = 915118;
423 423
424 double input_a = 0.0; 424 double input_a = 0.0;
425 double input_b = 0.0; 425 double input_b = 0.0;
426 426
427 CompareWrapper cmps[] = {CompareWrapper(IrOpcode::kFloat64Equal), 427 CompareWrapper cmps[] = {CompareWrapper(IrOpcode::kFloat64Equal),
(...skipping 25 matching lines...) Expand all
453 : eq_constant) 453 : eq_constant)
454 : (cmp.Float64Compare(input_a, input_b) ? eq_constant 454 : (cmp.Float64Compare(input_a, input_b) ? eq_constant
455 : ne_constant); 455 : ne_constant);
456 CHECK_EQ(expected, m.Call()); 456 CHECK_EQ(expected, m.Call());
457 } 457 }
458 } 458 }
459 } 459 }
460 } 460 }
461 } 461 }
462 #endif // V8_TURBOFAN_TARGET 462 #endif // V8_TURBOFAN_TARGET
OLDNEW
« no previous file with comments | « test/cctest/compiler/function-tester.h ('k') | test/cctest/compiler/test-js-constant-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698