OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |