| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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/simd-scalar-lowering.h" | 5 #include "src/compiler/simd-scalar-lowering.h" |
| 6 #include "src/compiler/diamond.h" | 6 #include "src/compiler/diamond.h" |
| 7 #include "src/compiler/linkage.h" | 7 #include "src/compiler/linkage.h" |
| 8 #include "src/compiler/node-matchers.h" | 8 #include "src/compiler/node-matchers.h" |
| 9 #include "src/compiler/node-properties.h" | 9 #include "src/compiler/node-properties.h" |
| 10 | 10 |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 Node* rep_node[kMaxLanes]; | 244 Node* rep_node[kMaxLanes]; |
| 245 for (int i = 0; i < kMaxLanes; i++) { | 245 for (int i = 0; i < kMaxLanes; i++) { |
| 246 DCHECK(!HasReplacement(1, node->InputAt(i))); | 246 DCHECK(!HasReplacement(1, node->InputAt(i))); |
| 247 rep_node[i] = node->InputAt(i); | 247 rep_node[i] = node->InputAt(i); |
| 248 } | 248 } |
| 249 ReplaceNode(node, rep_node); | 249 ReplaceNode(node, rep_node); |
| 250 break; | 250 break; |
| 251 } | 251 } |
| 252 | 252 |
| 253 case IrOpcode::kInt32x4ExtractLane: { | 253 case IrOpcode::kInt32x4ExtractLane: { |
| 254 Node* laneNode = node->InputAt(1); | 254 int32_t lane = OpParameter<int32_t>(node); |
| 255 DCHECK_EQ(laneNode->opcode(), IrOpcode::kInt32Constant); | |
| 256 int32_t lane = OpParameter<int32_t>(laneNode); | |
| 257 Node* rep_node[kMaxLanes] = { | 255 Node* rep_node[kMaxLanes] = { |
| 258 GetReplacementsWithType(node->InputAt(0), rep_type)[lane], nullptr, | 256 GetReplacementsWithType(node->InputAt(0), rep_type)[lane], nullptr, |
| 259 nullptr, nullptr}; | 257 nullptr, nullptr}; |
| 260 ReplaceNode(node, rep_node); | 258 ReplaceNode(node, rep_node); |
| 261 break; | 259 break; |
| 262 } | 260 } |
| 263 | 261 |
| 264 case IrOpcode::kFloat32x4Add: { | 262 case IrOpcode::kFloat32x4Add: { |
| 265 DCHECK(node->InputCount() == 2); | 263 DCHECK(node->InputCount() == 2); |
| 266 Node** rep_left = GetReplacementsWithType(node->InputAt(0), rep_type); | 264 Node** rep_left = GetReplacementsWithType(node->InputAt(0), rep_type); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 278 Node* rep_node[kMaxLanes]; | 276 Node* rep_node[kMaxLanes]; |
| 279 for (int i = 0; i < kMaxLanes; i++) { | 277 for (int i = 0; i < kMaxLanes; i++) { |
| 280 DCHECK(!HasReplacement(1, node->InputAt(i))); | 278 DCHECK(!HasReplacement(1, node->InputAt(i))); |
| 281 rep_node[i] = node->InputAt(i); | 279 rep_node[i] = node->InputAt(i); |
| 282 } | 280 } |
| 283 ReplaceNode(node, rep_node); | 281 ReplaceNode(node, rep_node); |
| 284 break; | 282 break; |
| 285 } | 283 } |
| 286 | 284 |
| 287 case IrOpcode::kFloat32x4ExtractLane: { | 285 case IrOpcode::kFloat32x4ExtractLane: { |
| 288 Node* laneNode = node->InputAt(1); | 286 int32_t lane = OpParameter<int32_t>(node); |
| 289 DCHECK_EQ(laneNode->opcode(), IrOpcode::kInt32Constant); | |
| 290 int32_t lane = OpParameter<int32_t>(laneNode); | |
| 291 Node* rep_node[kMaxLanes] = { | 287 Node* rep_node[kMaxLanes] = { |
| 292 GetReplacementsWithType(node->InputAt(0), rep_type)[lane], nullptr, | 288 GetReplacementsWithType(node->InputAt(0), rep_type)[lane], nullptr, |
| 293 nullptr, nullptr}; | 289 nullptr, nullptr}; |
| 294 ReplaceNode(node, rep_node); | 290 ReplaceNode(node, rep_node); |
| 295 break; | 291 break; |
| 296 } | 292 } |
| 297 | 293 |
| 298 default: { DefaultLowering(node); } | 294 default: { DefaultLowering(node); } |
| 299 } | 295 } |
| 300 } | 296 } |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 } else { | 397 } else { |
| 402 UNREACHABLE(); | 398 UNREACHABLE(); |
| 403 } | 399 } |
| 404 } | 400 } |
| 405 ReplaceNode(phi, rep_nodes); | 401 ReplaceNode(phi, rep_nodes); |
| 406 } | 402 } |
| 407 } | 403 } |
| 408 } // namespace compiler | 404 } // namespace compiler |
| 409 } // namespace internal | 405 } // namespace internal |
| 410 } // namespace v8 | 406 } // namespace v8 |
| OLD | NEW |