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

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

Issue 1852553003: [builtins] Migrate Math.clz32 to a TurboFan builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « src/compiler/representation-change.cc ('k') | src/compiler/simplified-operator.h » ('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 944 matching lines...) Expand 10 before | Expand all | Expand 10 after
955 } 955 }
956 case IrOpcode::kNumberShiftRightLogical: { 956 case IrOpcode::kNumberShiftRightLogical: {
957 Type* rhs_type = GetUpperBound(node->InputAt(1)); 957 Type* rhs_type = GetUpperBound(node->InputAt(1));
958 VisitBinop(node, UseInfo::TruncatingWord32(), 958 VisitBinop(node, UseInfo::TruncatingWord32(),
959 UseInfo::TruncatingWord32(), MachineRepresentation::kWord32); 959 UseInfo::TruncatingWord32(), MachineRepresentation::kWord32);
960 if (lower()) { 960 if (lower()) {
961 lowering->DoShift(node, lowering->machine()->Word32Shr(), rhs_type); 961 lowering->DoShift(node, lowering->machine()->Word32Shr(), rhs_type);
962 } 962 }
963 break; 963 break;
964 } 964 }
965 case IrOpcode::kNumberClz32: {
966 VisitUnop(node, UseInfo::TruncatingWord32(),
967 MachineRepresentation::kWord32);
968 if (lower()) NodeProperties::ChangeOp(node, Uint32Op(node));
969 break;
970 }
965 case IrOpcode::kNumberCeil: { 971 case IrOpcode::kNumberCeil: {
966 VisitUnop(node, UseInfo::Float64(), MachineRepresentation::kFloat64); 972 VisitUnop(node, UseInfo::Float64(), MachineRepresentation::kFloat64);
967 if (lower()) DeferReplacement(node, lowering->Float64Ceil(node)); 973 if (lower()) DeferReplacement(node, lowering->Float64Ceil(node));
968 break; 974 break;
969 } 975 }
970 case IrOpcode::kNumberFloor: { 976 case IrOpcode::kNumberFloor: {
971 VisitUnop(node, UseInfo::Float64(), MachineRepresentation::kFloat64); 977 VisitUnop(node, UseInfo::Float64(), MachineRepresentation::kFloat64);
972 if (lower()) DeferReplacement(node, lowering->Float64Floor(node)); 978 if (lower()) DeferReplacement(node, lowering->Float64Floor(node));
973 break; 979 break;
974 } 980 }
(...skipping 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after
2184 if (!rhs_type->Is(type_cache_.kZeroToThirtyOne)) { 2190 if (!rhs_type->Is(type_cache_.kZeroToThirtyOne)) {
2185 node->ReplaceInput(1, graph()->NewNode(machine()->Word32And(), rhs, 2191 node->ReplaceInput(1, graph()->NewNode(machine()->Word32And(), rhs,
2186 jsgraph()->Int32Constant(0x1f))); 2192 jsgraph()->Int32Constant(0x1f)));
2187 } 2193 }
2188 NodeProperties::ChangeOp(node, op); 2194 NodeProperties::ChangeOp(node, op);
2189 } 2195 }
2190 2196
2191 } // namespace compiler 2197 } // namespace compiler
2192 } // namespace internal 2198 } // namespace internal
2193 } // namespace v8 2199 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/representation-change.cc ('k') | src/compiler/simplified-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698