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

Unified Diff: src/compiler/common-operator.cc

Issue 2638133002: [Turbofan] Add other integer SIMD types, add more integer ops. (Closed)
Patch Set: Fix value helper. Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: src/compiler/common-operator.cc
diff --git a/src/compiler/common-operator.cc b/src/compiler/common-operator.cc
index 2cd63314cff790a5a68a113a4e44a7e59e63d46f..4b71f84903e80be5b3f0e15edfc58590d3b097ad 100644
--- a/src/compiler/common-operator.cc
+++ b/src/compiler/common-operator.cc
@@ -1353,6 +1353,26 @@ const Operator* CommonOperatorBuilder::ResizeMergeOrPhi(const Operator* op,
}
}
+const Operator* CommonOperatorBuilder::Float32x4ExtractLane(
+ int32_t lane_number) {
+ DCHECK(0 <= lane_number && lane_number < 4);
+ return new (zone()) Operator1<int32_t>( // --
+ IrOpcode::kFloat32x4ExtractLane, Operator::kPure, // opcode
+ "Float32x4ExtractLane", // name
+ 1, 0, 0, 1, 0, 0, // counts
+ lane_number); // parameter
+}
+
+const Operator* CommonOperatorBuilder::Float32x4ReplaceLane(
+ int32_t lane_number) {
+ DCHECK(0 <= lane_number && lane_number < 4);
+ return new (zone()) Operator1<int32_t>( // --
+ IrOpcode::kFloat32x4ReplaceLane, Operator::kPure, // opcode
+ "Float32x4ReplaceLane", // name
+ 2, 0, 0, 1, 0, 0, // counts
+ lane_number); // parameter
+}
+
const Operator* CommonOperatorBuilder::Int32x4ExtractLane(int32_t lane_number) {
DCHECK(0 <= lane_number && lane_number < 4);
return new (zone()) Operator1<int32_t>( // --
@@ -1371,24 +1391,40 @@ const Operator* CommonOperatorBuilder::Int32x4ReplaceLane(int32_t lane_number) {
lane_number); // parameter
}
-const Operator* CommonOperatorBuilder::Float32x4ExtractLane(
- int32_t lane_number) {
- DCHECK(0 <= lane_number && lane_number < 4);
- return new (zone()) Operator1<int32_t>( // --
- IrOpcode::kFloat32x4ExtractLane, Operator::kPure, // opcode
- "Float32x4ExtractLane", // name
- 1, 0, 0, 1, 0, 0, // counts
- lane_number); // parameter
+const Operator* CommonOperatorBuilder::Int16x8ExtractLane(int32_t lane_number) {
+ DCHECK(0 <= lane_number && lane_number < 8);
+ return new (zone()) Operator1<int32_t>( // --
+ IrOpcode::kInt16x8ExtractLane, Operator::kPure, // opcode
+ "Int16x8ExtractLane", // name
+ 1, 0, 0, 1, 0, 0, // counts
+ lane_number); // parameter
}
-const Operator* CommonOperatorBuilder::Float32x4ReplaceLane(
- int32_t lane_number) {
- DCHECK(0 <= lane_number && lane_number < 4);
- return new (zone()) Operator1<int32_t>( // --
- IrOpcode::kFloat32x4ReplaceLane, Operator::kPure, // opcode
- "Float32x4ReplaceLane", // name
- 2, 0, 0, 1, 0, 0, // counts
- lane_number); // parameter
+const Operator* CommonOperatorBuilder::Int16x8ReplaceLane(int32_t lane_number) {
+ DCHECK(0 <= lane_number && lane_number < 8);
+ return new (zone()) Operator1<int32_t>( // --
+ IrOpcode::kInt16x8ReplaceLane, Operator::kPure, // opcode
+ "Int16x8ReplaceLane", // name
+ 2, 0, 0, 1, 0, 0, // counts
+ lane_number); // parameter
+}
+
+const Operator* CommonOperatorBuilder::Int8x16ExtractLane(int32_t lane_number) {
+ DCHECK(0 <= lane_number && lane_number < 16);
+ return new (zone()) Operator1<int32_t>( // --
+ IrOpcode::kInt8x16ExtractLane, Operator::kPure, // opcode
+ "Int8x16ExtractLane", // name
+ 1, 0, 0, 1, 0, 0, // counts
+ lane_number); // parameter
+}
+
+const Operator* CommonOperatorBuilder::Int8x16ReplaceLane(int32_t lane_number) {
+ DCHECK(0 <= lane_number && lane_number < 16);
+ return new (zone()) Operator1<int32_t>( // --
+ IrOpcode::kInt8x16ReplaceLane, Operator::kPure, // opcode
+ "Int8x16ReplaceLane", // name
+ 2, 0, 0, 1, 0, 0, // counts
+ lane_number); // parameter
}
const FrameStateFunctionInfo*

Powered by Google App Engine
This is Rietveld 408576698