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

Side by Side Diff: src/compiler/wasm-compiler.cc

Issue 2728823005: [wasm] Implement simd lowering for F32x4 and I32x4 compare ops (Closed)
Patch Set: Created 3 years, 9 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/simd-scalar-lowering.cc ('k') | test/cctest/wasm/test-run-wasm-simd.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/wasm-compiler.h" 5 #include "src/compiler/wasm-compiler.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "src/assembler-inl.h" 9 #include "src/assembler-inl.h"
10 #include "src/base/platform/elapsed-timer.h" 10 #include "src/base/platform/elapsed-timer.h"
(...skipping 3389 matching lines...) Expand 10 before | Expand all | Expand 10 after
3400 inputs[1]); 3400 inputs[1]);
3401 case wasm::kExprF32x4Max: 3401 case wasm::kExprF32x4Max:
3402 return graph()->NewNode(jsgraph()->machine()->Float32x4Max(), inputs[0], 3402 return graph()->NewNode(jsgraph()->machine()->Float32x4Max(), inputs[0],
3403 inputs[1]); 3403 inputs[1]);
3404 case wasm::kExprF32x4Eq: 3404 case wasm::kExprF32x4Eq:
3405 return graph()->NewNode(jsgraph()->machine()->Float32x4Equal(), inputs[0], 3405 return graph()->NewNode(jsgraph()->machine()->Float32x4Equal(), inputs[0],
3406 inputs[1]); 3406 inputs[1]);
3407 case wasm::kExprF32x4Ne: 3407 case wasm::kExprF32x4Ne:
3408 return graph()->NewNode(jsgraph()->machine()->Float32x4NotEqual(), 3408 return graph()->NewNode(jsgraph()->machine()->Float32x4NotEqual(),
3409 inputs[0], inputs[1]); 3409 inputs[0], inputs[1]);
3410 case wasm::kExprF32x4Gt:
3411 return graph()->NewNode(jsgraph()->machine()->Float32x4GreaterThan(),
3412 inputs[0], inputs[1]);
3413 case wasm::kExprF32x4Ge:
3414 return graph()->NewNode(
3415 jsgraph()->machine()->Float32x4GreaterThanOrEqual(), inputs[0],
3416 inputs[1]);
3417 case wasm::kExprF32x4Lt:
3418 return graph()->NewNode(jsgraph()->machine()->Float32x4LessThan(),
3419 inputs[0], inputs[1]);
3420 case wasm::kExprF32x4Le:
3421 return graph()->NewNode(jsgraph()->machine()->Float32x4LessThanOrEqual(),
3422 inputs[0], inputs[1]);
bbudge 2017/03/02 18:29:09 Follow the pattern below where Lt and Le are imple
bbudge 2017/03/02 23:10:59 Just add a TODO to make the machine operators mini
3410 case wasm::kExprI32x4Splat: 3423 case wasm::kExprI32x4Splat:
3411 return graph()->NewNode(jsgraph()->machine()->Int32x4Splat(), inputs[0]); 3424 return graph()->NewNode(jsgraph()->machine()->Int32x4Splat(), inputs[0]);
3412 case wasm::kExprI32x4SConvertF32x4: 3425 case wasm::kExprI32x4SConvertF32x4:
3413 return graph()->NewNode(jsgraph()->machine()->Int32x4FromFloat32x4(), 3426 return graph()->NewNode(jsgraph()->machine()->Int32x4FromFloat32x4(),
3414 inputs[0]); 3427 inputs[0]);
3415 case wasm::kExprI32x4UConvertF32x4: 3428 case wasm::kExprI32x4UConvertF32x4:
3416 return graph()->NewNode(jsgraph()->machine()->Uint32x4FromFloat32x4(), 3429 return graph()->NewNode(jsgraph()->machine()->Uint32x4FromFloat32x4(),
3417 inputs[0]); 3430 inputs[0]);
3418 case wasm::kExprI32x4Neg: 3431 case wasm::kExprI32x4Neg:
3419 return graph()->NewNode(jsgraph()->machine()->Int32x4Neg(), inputs[0]); 3432 return graph()->NewNode(jsgraph()->machine()->Int32x4Neg(), inputs[0]);
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
4162 function_->code_end_offset - function_->code_start_offset, 4175 function_->code_end_offset - function_->code_start_offset,
4163 codegen_ms); 4176 codegen_ms);
4164 } 4177 }
4165 4178
4166 return code; 4179 return code;
4167 } 4180 }
4168 4181
4169 } // namespace compiler 4182 } // namespace compiler
4170 } // namespace internal 4183 } // namespace internal
4171 } // namespace v8 4184 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/simd-scalar-lowering.cc ('k') | test/cctest/wasm/test-run-wasm-simd.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698