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

Side by Side Diff: src/compiler/simplified-lowering.cc

Issue 701813003: [turbofan] Fix recognition of Uint32Div in simplified lowering. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | test/mjsunit/asm/uint32div.js » ('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/compiler/simplified-lowering.h" 5 #include "src/compiler/simplified-lowering.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 if (lower()) node->set_op(Float64Op(node)); 625 if (lower()) node->set_op(Float64Op(node));
626 break; 626 break;
627 } 627 }
628 case IrOpcode::kNumberDivide: { 628 case IrOpcode::kNumberDivide: {
629 if (CanLowerToInt32Binop(node, use)) { 629 if (CanLowerToInt32Binop(node, use)) {
630 // => signed Int32Div 630 // => signed Int32Div
631 VisitInt32Binop(node); 631 VisitInt32Binop(node);
632 if (lower()) DeferReplacement(node, lowering->Int32Div(node)); 632 if (lower()) DeferReplacement(node, lowering->Int32Div(node));
633 break; 633 break;
634 } 634 }
635 if (CanLowerToUint32Binop(node, use)) { 635 if (BothInputsAre(node, Type::Unsigned32()) && !CanObserveNaN(use)) {
636 // => unsigned Uint32Div 636 // => unsigned Uint32Div
637 VisitUint32Binop(node); 637 VisitUint32Binop(node);
638 if (lower()) DeferReplacement(node, lowering->Uint32Div(node)); 638 if (lower()) DeferReplacement(node, lowering->Uint32Div(node));
639 break; 639 break;
640 } 640 }
641 // => Float64Div 641 // => Float64Div
642 VisitFloat64Binop(node); 642 VisitFloat64Binop(node);
643 if (lower()) node->set_op(Float64Op(node)); 643 if (lower()) node->set_op(Float64Op(node));
644 break; 644 break;
645 } 645 }
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
1469 1469
1470 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { 1470 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) {
1471 node->set_op(machine()->IntLessThanOrEqual()); 1471 node->set_op(machine()->IntLessThanOrEqual());
1472 node->ReplaceInput(0, StringComparison(node, true)); 1472 node->ReplaceInput(0, StringComparison(node, true));
1473 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); 1473 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL));
1474 } 1474 }
1475 1475
1476 } // namespace compiler 1476 } // namespace compiler
1477 } // namespace internal 1477 } // namespace internal
1478 } // namespace v8 1478 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/asm/uint32div.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698