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

Side by Side Diff: src/compiler/representation-change.cc

Issue 2410883003: [turbofan] Remove minus zero check for rhs of CheckedInt32Sub. (Closed)
Patch Set: Adding TODO. Created 4 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 unified diff | Download patch
« no previous file with comments | « src/compiler/representation-change.h ('k') | src/compiler/simplified-lowering.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/representation-change.h" 5 #include "src/compiler/representation-change.h"
6 6
7 #include <sstream> 7 #include <sstream>
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 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 if (output_type->Is(Type::Unsigned32())) { 580 if (output_type->Is(Type::Unsigned32())) {
581 op = machine()->ChangeFloat64ToUint32(); 581 op = machine()->ChangeFloat64ToUint32();
582 } else if (output_type->Is(Type::Signed32())) { 582 } else if (output_type->Is(Type::Signed32())) {
583 op = machine()->ChangeFloat64ToInt32(); 583 op = machine()->ChangeFloat64ToInt32();
584 } else if (use_info.truncation().IsUsedAsWord32()) { 584 } else if (use_info.truncation().IsUsedAsWord32()) {
585 op = machine()->TruncateFloat64ToWord32(); 585 op = machine()->TruncateFloat64ToWord32();
586 } else if (use_info.type_check() == TypeCheckKind::kSignedSmall || 586 } else if (use_info.type_check() == TypeCheckKind::kSignedSmall ||
587 use_info.type_check() == TypeCheckKind::kSigned32) { 587 use_info.type_check() == TypeCheckKind::kSigned32) {
588 op = simplified()->CheckedFloat64ToInt32( 588 op = simplified()->CheckedFloat64ToInt32(
589 output_type->Maybe(Type::MinusZero()) 589 output_type->Maybe(Type::MinusZero())
590 ? CheckForMinusZeroMode::kCheckForMinusZero 590 ? use_info.minus_zero_check()
591 : CheckForMinusZeroMode::kDontCheckForMinusZero); 591 : CheckForMinusZeroMode::kDontCheckForMinusZero);
592 } 592 }
593 } else if (output_rep == MachineRepresentation::kFloat32) { 593 } else if (output_rep == MachineRepresentation::kFloat32) {
594 node = InsertChangeFloat32ToFloat64(node); // float32 -> float64 -> int32 594 node = InsertChangeFloat32ToFloat64(node); // float32 -> float64 -> int32
595 if (output_type->Is(Type::Unsigned32())) { 595 if (output_type->Is(Type::Unsigned32())) {
596 op = machine()->ChangeFloat64ToUint32(); 596 op = machine()->ChangeFloat64ToUint32();
597 } else if (output_type->Is(Type::Signed32())) { 597 } else if (output_type->Is(Type::Signed32())) {
598 op = machine()->ChangeFloat64ToInt32(); 598 op = machine()->ChangeFloat64ToInt32();
599 } else if (use_info.truncation().IsUsedAsWord32()) { 599 } else if (use_info.truncation().IsUsedAsWord32()) {
600 op = machine()->TruncateFloat64ToWord32(); 600 op = machine()->TruncateFloat64ToWord32();
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 } 989 }
990 990
991 Node* RepresentationChanger::InsertChangeTaggedToFloat64(Node* node) { 991 Node* RepresentationChanger::InsertChangeTaggedToFloat64(Node* node) {
992 return jsgraph()->graph()->NewNode(simplified()->ChangeTaggedToFloat64(), 992 return jsgraph()->graph()->NewNode(simplified()->ChangeTaggedToFloat64(),
993 node); 993 node);
994 } 994 }
995 995
996 } // namespace compiler 996 } // namespace compiler
997 } // namespace internal 997 } // namespace internal
998 } // namespace v8 998 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/representation-change.h ('k') | src/compiler/simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698