Turbofan: Add MachineOperators for SIMD.

IMPORTANT NOTE: This will likely be macroized to reduce boilerplate. Publishing now to start discussion about approach, which ops are needed, etc. Omitted functions are commented out in machine-operator.h so start there.

Takes the SIMD runtime intrinsics as a starting point for defining TF machine operators. The rationale for omitting functions is:

 - UInt constructors. int and uint aren't distinguished in wasm.
 - Check functions.
 - 'FromXxxBits' functions. These are essentially casts.
 - Simple Load / Store functions. Existing load / store with SIMD type should work.
 - Uint functions, except where their behavior is bitwise different from the Int function.

Skipped fns:

Float32x4Check
Float32x4FromInt32x4Bits
Float32x4FromUint32x4Bits
Float32x4FromInt16x8Bits
Float32x4FromUint16x8Bits
Float32x4FromInt8x16Bits
Float32x4FromUint8x16Bits
Float32x4Load
Float32x4Store

Int32x4Check
Int32x4FromUint32x4
Int32x4FromFloat32x4Bits
Int32x4FromUint32x4Bits
Int32x4FromInt16x8Bits
Int32x4FromUint16x8Bits
Int32x4FromInt8x16Bits
Int32x4FromUint8x16Bits
Int32x4Load
Int32x4Store

CreateUint32x4
Uint32x4Check
Uint32x4ExtractLane
Uint32x4ReplaceLane
Uint32x4Add
Uint32x4Sub
Uint32x4Mul
Uint32x4And
Uint32x4Or
Uint32x4Xor
Uint32x4Not
Uint32x4Equal
Uint32x4NotEqual
Uint32x4Select
Uint32x4Swizzle
Uint32x4Shuffle
Uint32x4FromInt32x4
Uint32x4FromFloat32x4Bits
Uint32x4FromInt32x4Bits
Uint32x4FromInt16x8Bits
Uint32x4FromUint16x8Bits
Uint32x4FromInt8x16Bits
Uint32x4FromUint8x16Bits
Uint32x4Load
Uint32x4Load1
Uint32x4Load2
Uint32x4Load3
Uint32x4Store
Uint32x4Store1
Uint32x4Store2
Uint32x4Store3

Bool32x4Check

Int16x8Check
Int16x8FromUint16x8
Int16x8FromFloat32x4Bits
Int16x8FromInt32x4Bits
Int16x8FromUint32x4Bits
Int16x8FromUint16x8Bits
Int16x8FromInt8x16Bits
Int16x8FromUint8x16Bits
Int16x8Load
Int16x8Store

CreateUint16x8
Uint16x8Check
Uint16x8ExtractLane
Uint16x8ReplaceLane
Uint16x8Add
Uint16x8Sub
Uint16x8Mul
Uint16x8And
Uint16x8Or
Uint16x8Xor
Uint16x8Not
Uint16x8Equal
Uint16x8NotEqual
Uint16x8Select
Uint16x8Swizzle
Uint16x8Shuffle
Uint16x8FromInt16x8
Uint16x8FromFloat32x4Bits
Uint16x8FromInt32x4Bits
Uint16x8FromUint32x4Bits
Uint16x8FromInt16x8Bits
Uint16x8FromInt8x16Bits
Uint16x8FromUint8x16Bits
Uint16x8Load
Uint16x8Store

Bool16x8Check

Int8x16Check
Int8x16FromUint8x16
Int8x16FromFloat32x4Bits
Int8x16FromInt32x4Bits
Int8x16FromUint32x4Bits
Int8x16FromInt16x8Bits
Int8x16FromUint16x8Bits
Int8x16FromUint8x16Bits
Int8x16Load
Int8x16Store

CreateUint8x16
Uint8x16Check
Uint8x16ExtractLane
Uint8x16ReplaceLane
Uint8x16Add
Uint8x16Sub
Uint8x16Mul
Uint8x16And
Uint8x16Or
Uint8x16Xor
Uint8x16Not
Uint8x16Equal
Uint8x16NotEqual
Uint8x16Select
Uint8x16Swizzle
Uint8x16Shuffle
Uint8x16FromInt8x16
Uint8x16FromFloat32x4Bits
Uint8x16FromInt32x4Bits
Uint8x16FromUint32x4Bits
Uint8x16FromInt16x8Bits
Uint8x16FromUint16x8Bits
Uint8x16FromInt8x16Bits
Uint8x16Load
Uint8x16Store

Bool8x16Check

LOG=N
BUG=v8:4124

Review URL: https://codereview.chromium.org/1848433003

Cr-Commit-Position: refs/heads/master@{#35213}
This commit is contained in:
bbudge 2016-04-01 11:07:18 -07:00 committed by Commit bot
parent 3e284d19aa
commit 3831d41e4c
5 changed files with 604 additions and 6 deletions

View File

@ -202,7 +202,191 @@ MachineRepresentation StackSlotRepresentationOf(Operator const* op) {
V(Int32PairMul, Operator::kNoProperties, 4, 0, 2) \
V(Word32PairShl, Operator::kNoProperties, 3, 0, 2) \
V(Word32PairShr, Operator::kNoProperties, 3, 0, 2) \
V(Word32PairSar, Operator::kNoProperties, 3, 0, 2)
V(Word32PairSar, Operator::kNoProperties, 3, 0, 2) \
V(CreateFloat32x4, Operator::kNoProperties, 4, 0, 1) \
V(Float32x4ExtractLane, Operator::kNoProperties, 2, 0, 1) \
V(Float32x4ReplaceLane, Operator::kNoProperties, 3, 0, 1) \
V(Float32x4Abs, Operator::kNoProperties, 1, 0, 1) \
V(Float32x4Neg, Operator::kNoProperties, 1, 0, 1) \
V(Float32x4Sqrt, Operator::kNoProperties, 1, 0, 1) \
V(Float32x4RecipApprox, Operator::kNoProperties, 1, 0, 1) \
V(Float32x4RecipSqrtApprox, Operator::kNoProperties, 1, 0, 1) \
V(Float32x4Add, Operator::kCommutative, 2, 0, 1) \
V(Float32x4Sub, Operator::kNoProperties, 2, 0, 1) \
V(Float32x4Mul, Operator::kCommutative, 2, 0, 1) \
V(Float32x4Div, Operator::kNoProperties, 2, 0, 1) \
V(Float32x4Min, Operator::kCommutative, 2, 0, 1) \
V(Float32x4Max, Operator::kCommutative, 2, 0, 1) \
V(Float32x4MinNum, Operator::kCommutative, 2, 0, 1) \
V(Float32x4MaxNum, Operator::kCommutative, 2, 0, 1) \
V(Float32x4Equal, Operator::kCommutative, 2, 0, 1) \
V(Float32x4NotEqual, Operator::kCommutative, 2, 0, 1) \
V(Float32x4LessThan, Operator::kNoProperties, 2, 0, 1) \
V(Float32x4LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
V(Float32x4GreaterThan, Operator::kNoProperties, 2, 0, 1) \
V(Float32x4GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
V(Float32x4Select, Operator::kNoProperties, 3, 0, 1) \
V(Float32x4Swizzle, Operator::kNoProperties, 5, 0, 1) \
V(Float32x4Shuffle, Operator::kNoProperties, 6, 0, 1) \
V(Float32x4FromInt32x4, Operator::kNoProperties, 1, 0, 1) \
V(Float32x4FromUint32x4, Operator::kNoProperties, 1, 0, 1) \
V(Float32x4Load1, Operator::kNoProperties, 2, 0, 1) \
V(Float32x4Load2, Operator::kNoProperties, 2, 0, 1) \
V(Float32x4Load3, Operator::kNoProperties, 2, 0, 1) \
V(Float32x4Store1, Operator::kNoProperties, 3, 0, 1) \
V(Float32x4Store2, Operator::kNoProperties, 3, 0, 1) \
V(Float32x4Store3, Operator::kNoProperties, 3, 0, 1) \
V(CreateInt32x4, Operator::kNoProperties, 4, 0, 1) \
V(Int32x4ExtractLane, Operator::kNoProperties, 2, 0, 1) \
V(Int32x4ReplaceLane, Operator::kNoProperties, 3, 0, 1) \
V(Int32x4Neg, Operator::kNoProperties, 1, 0, 1) \
V(Int32x4Add, Operator::kCommutative, 2, 0, 1) \
V(Int32x4Sub, Operator::kNoProperties, 2, 0, 1) \
V(Int32x4Mul, Operator::kCommutative, 2, 0, 1) \
V(Int32x4Min, Operator::kCommutative, 2, 0, 1) \
V(Int32x4Max, Operator::kCommutative, 2, 0, 1) \
V(Int32x4And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
V(Int32x4Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
V(Int32x4Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
V(Int32x4Not, Operator::kNoProperties, 1, 0, 1) \
V(Int32x4ShiftLeftByScalar, Operator::kNoProperties, 2, 0, 1) \
V(Int32x4ShiftRightByScalar, Operator::kNoProperties, 2, 0, 1) \
V(Int32x4Equal, Operator::kCommutative, 2, 0, 1) \
V(Int32x4NotEqual, Operator::kCommutative, 2, 0, 1) \
V(Int32x4LessThan, Operator::kNoProperties, 2, 0, 1) \
V(Int32x4LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
V(Int32x4GreaterThan, Operator::kNoProperties, 2, 0, 1) \
V(Int32x4GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
V(Int32x4Select, Operator::kNoProperties, 3, 0, 1) \
V(Int32x4Swizzle, Operator::kNoProperties, 5, 0, 1) \
V(Int32x4Shuffle, Operator::kNoProperties, 6, 0, 1) \
V(Int32x4FromFloat32x4, Operator::kNoProperties, 1, 0, 1) \
V(Int32x4Load1, Operator::kNoProperties, 2, 0, 1) \
V(Int32x4Load2, Operator::kNoProperties, 2, 0, 1) \
V(Int32x4Load3, Operator::kNoProperties, 2, 0, 1) \
V(Int32x4Store1, Operator::kNoProperties, 3, 0, 1) \
V(Int32x4Store2, Operator::kNoProperties, 3, 0, 1) \
V(Int32x4Store3, Operator::kNoProperties, 3, 0, 1) \
V(Uint32x4Min, Operator::kCommutative, 2, 0, 1) \
V(Uint32x4Max, Operator::kCommutative, 2, 0, 1) \
V(Uint32x4ShiftLeftByScalar, Operator::kNoProperties, 2, 0, 1) \
V(Uint32x4ShiftRightByScalar, Operator::kNoProperties, 2, 0, 1) \
V(Uint32x4LessThan, Operator::kNoProperties, 2, 0, 1) \
V(Uint32x4LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
V(Uint32x4GreaterThan, Operator::kNoProperties, 2, 0, 1) \
V(Uint32x4GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
V(Uint32x4FromFloat32x4, Operator::kNoProperties, 1, 0, 1) \
V(CreateBool32x4, Operator::kNoProperties, 4, 0, 1) \
V(Bool32x4ExtractLane, Operator::kNoProperties, 2, 0, 1) \
V(Bool32x4ReplaceLane, Operator::kNoProperties, 3, 0, 1) \
V(Bool32x4And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
V(Bool32x4Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
V(Bool32x4Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
V(Bool32x4Not, Operator::kNoProperties, 1, 0, 1) \
V(Bool32x4AnyTrue, Operator::kNoProperties, 1, 0, 1) \
V(Bool32x4AllTrue, Operator::kNoProperties, 1, 0, 1) \
V(Bool32x4Swizzle, Operator::kNoProperties, 5, 0, 1) \
V(Bool32x4Shuffle, Operator::kNoProperties, 6, 0, 1) \
V(Bool32x4Equal, Operator::kCommutative, 2, 0, 1) \
V(Bool32x4NotEqual, Operator::kCommutative, 2, 0, 1) \
V(CreateInt16x8, Operator::kNoProperties, 8, 0, 1) \
V(Int16x8ExtractLane, Operator::kNoProperties, 2, 0, 1) \
V(Int16x8ReplaceLane, Operator::kNoProperties, 3, 0, 1) \
V(Int16x8Neg, Operator::kNoProperties, 1, 0, 1) \
V(Int16x8Add, Operator::kCommutative, 2, 0, 1) \
V(Int16x8AddSaturate, Operator::kCommutative, 2, 0, 1) \
V(Int16x8Sub, Operator::kNoProperties, 2, 0, 1) \
V(Int16x8SubSaturate, Operator::kNoProperties, 2, 0, 1) \
V(Int16x8Mul, Operator::kCommutative, 2, 0, 1) \
V(Int16x8Min, Operator::kCommutative, 2, 0, 1) \
V(Int16x8Max, Operator::kCommutative, 2, 0, 1) \
V(Int16x8And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
V(Int16x8Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
V(Int16x8Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
V(Int16x8Not, Operator::kNoProperties, 1, 0, 1) \
V(Int16x8ShiftLeftByScalar, Operator::kNoProperties, 2, 0, 1) \
V(Int16x8ShiftRightByScalar, Operator::kNoProperties, 2, 0, 1) \
V(Int16x8Equal, Operator::kCommutative, 2, 0, 1) \
V(Int16x8NotEqual, Operator::kCommutative, 2, 0, 1) \
V(Int16x8LessThan, Operator::kNoProperties, 2, 0, 1) \
V(Int16x8LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
V(Int16x8GreaterThan, Operator::kNoProperties, 2, 0, 1) \
V(Int16x8GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
V(Int16x8Select, Operator::kNoProperties, 3, 0, 1) \
V(Int16x8Swizzle, Operator::kNoProperties, 9, 0, 1) \
V(Int16x8Shuffle, Operator::kNoProperties, 10, 0, 1) \
V(Uint16x8AddSaturate, Operator::kCommutative, 2, 0, 1) \
V(Uint16x8SubSaturate, Operator::kNoProperties, 2, 0, 1) \
V(Uint16x8Min, Operator::kCommutative, 2, 0, 1) \
V(Uint16x8Max, Operator::kCommutative, 2, 0, 1) \
V(Uint16x8ShiftLeftByScalar, Operator::kNoProperties, 2, 0, 1) \
V(Uint16x8ShiftRightByScalar, Operator::kNoProperties, 2, 0, 1) \
V(Uint16x8LessThan, Operator::kNoProperties, 2, 0, 1) \
V(Uint16x8LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
V(Uint16x8GreaterThan, Operator::kNoProperties, 2, 0, 1) \
V(Uint16x8GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
V(CreateBool16x8, Operator::kNoProperties, 8, 0, 1) \
V(Bool16x8ExtractLane, Operator::kNoProperties, 2, 0, 1) \
V(Bool16x8ReplaceLane, Operator::kNoProperties, 3, 0, 1) \
V(Bool16x8And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
V(Bool16x8Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
V(Bool16x8Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
V(Bool16x8Not, Operator::kNoProperties, 1, 0, 1) \
V(Bool16x8AnyTrue, Operator::kNoProperties, 1, 0, 1) \
V(Bool16x8AllTrue, Operator::kNoProperties, 1, 0, 1) \
V(Bool16x8Swizzle, Operator::kNoProperties, 9, 0, 1) \
V(Bool16x8Shuffle, Operator::kNoProperties, 10, 0, 1) \
V(Bool16x8Equal, Operator::kCommutative, 2, 0, 1) \
V(Bool16x8NotEqual, Operator::kCommutative, 2, 0, 1) \
V(CreateInt8x16, Operator::kNoProperties, 16, 0, 1) \
V(Int8x16ExtractLane, Operator::kNoProperties, 2, 0, 1) \
V(Int8x16ReplaceLane, Operator::kNoProperties, 3, 0, 1) \
V(Int8x16Neg, Operator::kNoProperties, 1, 0, 1) \
V(Int8x16Add, Operator::kCommutative, 2, 0, 1) \
V(Int8x16AddSaturate, Operator::kCommutative, 2, 0, 1) \
V(Int8x16Sub, Operator::kNoProperties, 2, 0, 1) \
V(Int8x16SubSaturate, Operator::kNoProperties, 2, 0, 1) \
V(Int8x16Mul, Operator::kCommutative, 2, 0, 1) \
V(Int8x16Min, Operator::kCommutative, 2, 0, 1) \
V(Int8x16Max, Operator::kCommutative, 2, 0, 1) \
V(Int8x16And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
V(Int8x16Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
V(Int8x16Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
V(Int8x16Not, Operator::kNoProperties, 1, 0, 1) \
V(Int8x16ShiftLeftByScalar, Operator::kNoProperties, 2, 0, 1) \
V(Int8x16ShiftRightByScalar, Operator::kNoProperties, 2, 0, 1) \
V(Int8x16Equal, Operator::kCommutative, 2, 0, 1) \
V(Int8x16NotEqual, Operator::kCommutative, 2, 0, 1) \
V(Int8x16LessThan, Operator::kNoProperties, 2, 0, 1) \
V(Int8x16LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
V(Int8x16GreaterThan, Operator::kNoProperties, 2, 0, 1) \
V(Int8x16GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
V(Int8x16Select, Operator::kNoProperties, 3, 0, 1) \
V(Int8x16Swizzle, Operator::kNoProperties, 17, 0, 1) \
V(Int8x16Shuffle, Operator::kNoProperties, 18, 0, 1) \
V(Uint8x16AddSaturate, Operator::kCommutative, 2, 0, 1) \
V(Uint8x16SubSaturate, Operator::kNoProperties, 2, 0, 1) \
V(Uint8x16Min, Operator::kCommutative, 2, 0, 1) \
V(Uint8x16Max, Operator::kCommutative, 2, 0, 1) \
V(Uint8x16ShiftLeftByScalar, Operator::kNoProperties, 2, 0, 1) \
V(Uint8x16ShiftRightByScalar, Operator::kNoProperties, 2, 0, 1) \
V(Uint8x16LessThan, Operator::kNoProperties, 2, 0, 1) \
V(Uint8x16LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
V(Uint8x16GreaterThan, Operator::kNoProperties, 2, 0, 1) \
V(Uint8x16GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
V(CreateBool8x16, Operator::kNoProperties, 16, 0, 1) \
V(Bool8x16ExtractLane, Operator::kNoProperties, 2, 0, 1) \
V(Bool8x16ReplaceLane, Operator::kNoProperties, 3, 0, 1) \
V(Bool8x16And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
V(Bool8x16Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
V(Bool8x16Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
V(Bool8x16Not, Operator::kNoProperties, 1, 0, 1) \
V(Bool8x16AnyTrue, Operator::kNoProperties, 1, 0, 1) \
V(Bool8x16AllTrue, Operator::kNoProperties, 1, 0, 1) \
V(Bool8x16Swizzle, Operator::kNoProperties, 17, 0, 1) \
V(Bool8x16Shuffle, Operator::kNoProperties, 18, 0, 1) \
V(Bool8x16Equal, Operator::kCommutative, 2, 0, 1) \
V(Bool8x16NotEqual, Operator::kCommutative, 2, 0, 1)
#define PURE_OPTIONAL_OP_LIST(V) \
V(Word32Ctz, Operator::kNoProperties, 1, 0, 1) \

View File

@ -317,6 +317,201 @@ class MachineOperatorBuilder final : public ZoneObject {
const Operator* Float64InsertLowWord32();
const Operator* Float64InsertHighWord32();
// SIMD operators.
const Operator* CreateFloat32x4();
const Operator* Float32x4ExtractLane();
const Operator* Float32x4ReplaceLane();
const Operator* Float32x4Abs();
const Operator* Float32x4Neg();
const Operator* Float32x4Sqrt();
const Operator* Float32x4RecipApprox();
const Operator* Float32x4RecipSqrtApprox();
const Operator* Float32x4Add();
const Operator* Float32x4Sub();
const Operator* Float32x4Mul();
const Operator* Float32x4Div();
const Operator* Float32x4Min();
const Operator* Float32x4Max();
const Operator* Float32x4MinNum();
const Operator* Float32x4MaxNum();
const Operator* Float32x4Equal();
const Operator* Float32x4NotEqual();
const Operator* Float32x4LessThan();
const Operator* Float32x4LessThanOrEqual();
const Operator* Float32x4GreaterThan();
const Operator* Float32x4GreaterThanOrEqual();
const Operator* Float32x4Select();
const Operator* Float32x4Swizzle();
const Operator* Float32x4Shuffle();
const Operator* Float32x4FromInt32x4();
const Operator* Float32x4FromUint32x4();
const Operator* Float32x4Load1();
const Operator* Float32x4Load2();
const Operator* Float32x4Load3();
const Operator* Float32x4Store1();
const Operator* Float32x4Store2();
const Operator* Float32x4Store3();
const Operator* CreateInt32x4();
const Operator* Int32x4ExtractLane();
const Operator* Int32x4ReplaceLane();
const Operator* Int32x4Neg();
const Operator* Int32x4Add();
const Operator* Int32x4Sub();
const Operator* Int32x4Mul();
const Operator* Int32x4Min();
const Operator* Int32x4Max();
const Operator* Int32x4And();
const Operator* Int32x4Or();
const Operator* Int32x4Xor();
const Operator* Int32x4Not();
const Operator* Int32x4ShiftLeftByScalar();
const Operator* Int32x4ShiftRightByScalar();
const Operator* Int32x4Equal();
const Operator* Int32x4NotEqual();
const Operator* Int32x4LessThan();
const Operator* Int32x4LessThanOrEqual();
const Operator* Int32x4GreaterThan();
const Operator* Int32x4GreaterThanOrEqual();
const Operator* Int32x4Select();
const Operator* Int32x4Swizzle();
const Operator* Int32x4Shuffle();
const Operator* Int32x4FromFloat32x4();
const Operator* Int32x4Load1();
const Operator* Int32x4Load2();
const Operator* Int32x4Load3();
const Operator* Int32x4Store1();
const Operator* Int32x4Store2();
const Operator* Int32x4Store3();
const Operator* Uint32x4Min();
const Operator* Uint32x4Max();
const Operator* Uint32x4ShiftLeftByScalar();
const Operator* Uint32x4ShiftRightByScalar();
const Operator* Uint32x4LessThan();
const Operator* Uint32x4LessThanOrEqual();
const Operator* Uint32x4GreaterThan();
const Operator* Uint32x4GreaterThanOrEqual();
const Operator* Uint32x4FromFloat32x4();
const Operator* CreateBool32x4();
const Operator* Bool32x4ExtractLane();
const Operator* Bool32x4ReplaceLane();
const Operator* Bool32x4And();
const Operator* Bool32x4Or();
const Operator* Bool32x4Xor();
const Operator* Bool32x4Not();
const Operator* Bool32x4AnyTrue();
const Operator* Bool32x4AllTrue();
const Operator* Bool32x4Swizzle();
const Operator* Bool32x4Shuffle();
const Operator* Bool32x4Equal();
const Operator* Bool32x4NotEqual();
const Operator* CreateInt16x8();
const Operator* Int16x8ExtractLane();
const Operator* Int16x8ReplaceLane();
const Operator* Int16x8Neg();
const Operator* Int16x8Add();
const Operator* Int16x8AddSaturate();
const Operator* Int16x8Sub();
const Operator* Int16x8SubSaturate();
const Operator* Int16x8Mul();
const Operator* Int16x8Min();
const Operator* Int16x8Max();
const Operator* Int16x8And();
const Operator* Int16x8Or();
const Operator* Int16x8Xor();
const Operator* Int16x8Not();
const Operator* Int16x8ShiftLeftByScalar();
const Operator* Int16x8ShiftRightByScalar();
const Operator* Int16x8Equal();
const Operator* Int16x8NotEqual();
const Operator* Int16x8LessThan();
const Operator* Int16x8LessThanOrEqual();
const Operator* Int16x8GreaterThan();
const Operator* Int16x8GreaterThanOrEqual();
const Operator* Int16x8Select();
const Operator* Int16x8Swizzle();
const Operator* Int16x8Shuffle();
const Operator* Uint16x8AddSaturate();
const Operator* Uint16x8SubSaturate();
const Operator* Uint16x8Min();
const Operator* Uint16x8Max();
const Operator* Uint16x8ShiftLeftByScalar();
const Operator* Uint16x8ShiftRightByScalar();
const Operator* Uint16x8LessThan();
const Operator* Uint16x8LessThanOrEqual();
const Operator* Uint16x8GreaterThan();
const Operator* Uint16x8GreaterThanOrEqual();
const Operator* CreateBool16x8();
const Operator* Bool16x8ExtractLane();
const Operator* Bool16x8ReplaceLane();
const Operator* Bool16x8And();
const Operator* Bool16x8Or();
const Operator* Bool16x8Xor();
const Operator* Bool16x8Not();
const Operator* Bool16x8AnyTrue();
const Operator* Bool16x8AllTrue();
const Operator* Bool16x8Swizzle();
const Operator* Bool16x8Shuffle();
const Operator* Bool16x8Equal();
const Operator* Bool16x8NotEqual();
const Operator* CreateInt8x16();
const Operator* Int8x16ExtractLane();
const Operator* Int8x16ReplaceLane();
const Operator* Int8x16Neg();
const Operator* Int8x16Add();
const Operator* Int8x16AddSaturate();
const Operator* Int8x16Sub();
const Operator* Int8x16SubSaturate();
const Operator* Int8x16Mul();
const Operator* Int8x16Min();
const Operator* Int8x16Max();
const Operator* Int8x16And();
const Operator* Int8x16Or();
const Operator* Int8x16Xor();
const Operator* Int8x16Not();
const Operator* Int8x16ShiftLeftByScalar();
const Operator* Int8x16ShiftRightByScalar();
const Operator* Int8x16Equal();
const Operator* Int8x16NotEqual();
const Operator* Int8x16LessThan();
const Operator* Int8x16LessThanOrEqual();
const Operator* Int8x16GreaterThan();
const Operator* Int8x16GreaterThanOrEqual();
const Operator* Int8x16Select();
const Operator* Int8x16Swizzle();
const Operator* Int8x16Shuffle();
const Operator* Uint8x16AddSaturate();
const Operator* Uint8x16SubSaturate();
const Operator* Uint8x16Min();
const Operator* Uint8x16Max();
const Operator* Uint8x16ShiftLeftByScalar();
const Operator* Uint8x16ShiftRightByScalar();
const Operator* Uint8x16LessThan();
const Operator* Uint8x16LessThanOrEqual();
const Operator* Uint8x16GreaterThan();
const Operator* Uint8x16GreaterThanOrEqual();
const Operator* CreateBool8x16();
const Operator* Bool8x16ExtractLane();
const Operator* Bool8x16ReplaceLane();
const Operator* Bool8x16And();
const Operator* Bool8x16Or();
const Operator* Bool8x16Xor();
const Operator* Bool8x16Not();
const Operator* Bool8x16AnyTrue();
const Operator* Bool8x16AllTrue();
const Operator* Bool8x16Swizzle();
const Operator* Bool8x16Shuffle();
const Operator* Bool8x16Equal();
const Operator* Bool8x16NotEqual();
// load [base + index]
const Operator* Load(LoadRepresentation rep);

View File

@ -350,10 +350,206 @@
V(Word32PairShr) \
V(Word32PairSar)
#define VALUE_OP_LIST(V) \
COMMON_OP_LIST(V) \
SIMPLIFIED_OP_LIST(V) \
MACHINE_OP_LIST(V) \
#define MACHINE_SIMD_RETURN_SIMD_OP_LIST(V) \
V(CreateFloat32x4) \
V(Float32x4ReplaceLane) \
V(Float32x4Abs) \
V(Float32x4Neg) \
V(Float32x4Sqrt) \
V(Float32x4RecipApprox) \
V(Float32x4RecipSqrtApprox) \
V(Float32x4Add) \
V(Float32x4Sub) \
V(Float32x4Mul) \
V(Float32x4Div) \
V(Float32x4Min) \
V(Float32x4Max) \
V(Float32x4MinNum) \
V(Float32x4MaxNum) \
V(Float32x4Equal) \
V(Float32x4NotEqual) \
V(Float32x4LessThan) \
V(Float32x4LessThanOrEqual) \
V(Float32x4GreaterThan) \
V(Float32x4GreaterThanOrEqual) \
V(Float32x4Select) \
V(Float32x4Swizzle) \
V(Float32x4Shuffle) \
V(Float32x4FromInt32x4) \
V(Float32x4FromUint32x4) \
V(Float32x4Load1) \
V(Float32x4Load2) \
V(Float32x4Load3) \
V(Float32x4Store1) \
V(Float32x4Store2) \
V(Float32x4Store3) \
V(CreateInt32x4) \
V(Int32x4ReplaceLane) \
V(Int32x4Neg) \
V(Int32x4Add) \
V(Int32x4Sub) \
V(Int32x4Mul) \
V(Int32x4Min) \
V(Int32x4Max) \
V(Int32x4And) \
V(Int32x4Or) \
V(Int32x4Xor) \
V(Int32x4Not) \
V(Int32x4ShiftLeftByScalar) \
V(Int32x4ShiftRightByScalar) \
V(Int32x4Equal) \
V(Int32x4NotEqual) \
V(Int32x4LessThan) \
V(Int32x4LessThanOrEqual) \
V(Int32x4GreaterThan) \
V(Int32x4GreaterThanOrEqual) \
V(Int32x4Select) \
V(Int32x4Swizzle) \
V(Int32x4Shuffle) \
V(Int32x4FromFloat32x4) \
V(Int32x4Load1) \
V(Int32x4Load2) \
V(Int32x4Load3) \
V(Int32x4Store1) \
V(Int32x4Store2) \
V(Int32x4Store3) \
V(Uint32x4Min) \
V(Uint32x4Max) \
V(Uint32x4ShiftLeftByScalar) \
V(Uint32x4ShiftRightByScalar) \
V(Uint32x4LessThan) \
V(Uint32x4LessThanOrEqual) \
V(Uint32x4GreaterThan) \
V(Uint32x4GreaterThanOrEqual) \
V(Uint32x4FromFloat32x4) \
V(CreateBool32x4) \
V(Bool32x4ReplaceLane) \
V(Bool32x4And) \
V(Bool32x4Or) \
V(Bool32x4Xor) \
V(Bool32x4Not) \
V(Bool32x4Swizzle) \
V(Bool32x4Shuffle) \
V(Bool32x4Equal) \
V(Bool32x4NotEqual) \
V(CreateInt16x8) \
V(Int16x8ReplaceLane) \
V(Int16x8Neg) \
V(Int16x8Add) \
V(Int16x8AddSaturate) \
V(Int16x8Sub) \
V(Int16x8SubSaturate) \
V(Int16x8Mul) \
V(Int16x8Min) \
V(Int16x8Max) \
V(Int16x8And) \
V(Int16x8Or) \
V(Int16x8Xor) \
V(Int16x8Not) \
V(Int16x8ShiftLeftByScalar) \
V(Int16x8ShiftRightByScalar) \
V(Int16x8Equal) \
V(Int16x8NotEqual) \
V(Int16x8LessThan) \
V(Int16x8LessThanOrEqual) \
V(Int16x8GreaterThan) \
V(Int16x8GreaterThanOrEqual) \
V(Int16x8Select) \
V(Int16x8Swizzle) \
V(Int16x8Shuffle) \
V(Uint16x8AddSaturate) \
V(Uint16x8SubSaturate) \
V(Uint16x8Min) \
V(Uint16x8Max) \
V(Uint16x8ShiftLeftByScalar) \
V(Uint16x8ShiftRightByScalar) \
V(Uint16x8LessThan) \
V(Uint16x8LessThanOrEqual) \
V(Uint16x8GreaterThan) \
V(Uint16x8GreaterThanOrEqual) \
V(CreateBool16x8) \
V(Bool16x8ReplaceLane) \
V(Bool16x8And) \
V(Bool16x8Or) \
V(Bool16x8Xor) \
V(Bool16x8Not) \
V(Bool16x8Swizzle) \
V(Bool16x8Shuffle) \
V(Bool16x8Equal) \
V(Bool16x8NotEqual) \
V(CreateInt8x16) \
V(Int8x16ReplaceLane) \
V(Int8x16Neg) \
V(Int8x16Add) \
V(Int8x16AddSaturate) \
V(Int8x16Sub) \
V(Int8x16SubSaturate) \
V(Int8x16Mul) \
V(Int8x16Min) \
V(Int8x16Max) \
V(Int8x16And) \
V(Int8x16Or) \
V(Int8x16Xor) \
V(Int8x16Not) \
V(Int8x16ShiftLeftByScalar) \
V(Int8x16ShiftRightByScalar) \
V(Int8x16Equal) \
V(Int8x16NotEqual) \
V(Int8x16LessThan) \
V(Int8x16LessThanOrEqual) \
V(Int8x16GreaterThan) \
V(Int8x16GreaterThanOrEqual) \
V(Int8x16Select) \
V(Int8x16Swizzle) \
V(Int8x16Shuffle) \
V(Uint8x16AddSaturate) \
V(Uint8x16SubSaturate) \
V(Uint8x16Min) \
V(Uint8x16Max) \
V(Uint8x16ShiftLeftByScalar) \
V(Uint8x16ShiftRightByScalar) \
V(Uint8x16LessThan) \
V(Uint8x16LessThanOrEqual) \
V(Uint8x16GreaterThan) \
V(Uint8x16GreaterThanOrEqual) \
V(CreateBool8x16) \
V(Bool8x16ReplaceLane) \
V(Bool8x16And) \
V(Bool8x16Or) \
V(Bool8x16Xor) \
V(Bool8x16Not) \
V(Bool8x16Swizzle) \
V(Bool8x16Shuffle) \
V(Bool8x16Equal) \
V(Bool8x16NotEqual)
#define MACHINE_SIMD_RETURN_NUM_OP_LIST(V) \
V(Float32x4ExtractLane) \
V(Int32x4ExtractLane) \
V(Int16x8ExtractLane) \
V(Int8x16ExtractLane)
#define MACHINE_SIMD_RETURN_BOOL_OP_LIST(V) \
V(Bool32x4ExtractLane) \
V(Bool32x4AnyTrue) \
V(Bool32x4AllTrue) \
V(Bool16x8ExtractLane) \
V(Bool16x8AnyTrue) \
V(Bool16x8AllTrue) \
V(Bool8x16ExtractLane) \
V(Bool8x16AnyTrue) \
V(Bool8x16AllTrue)
#define MACHINE_SIMD_OP_LIST(V) \
MACHINE_SIMD_RETURN_SIMD_OP_LIST(V) \
MACHINE_SIMD_RETURN_NUM_OP_LIST(V) \
MACHINE_SIMD_RETURN_BOOL_OP_LIST(V)
#define VALUE_OP_LIST(V) \
COMMON_OP_LIST(V) \
SIMPLIFIED_OP_LIST(V) \
MACHINE_OP_LIST(V) \
MACHINE_SIMD_OP_LIST(V) \
JS_OP_LIST(V)
// The combination of all operators at all levels and the common operators.

View File

@ -97,6 +97,7 @@ class Typer::Visitor : public Reducer {
COMMON_OP_LIST(DECLARE_CASE)
SIMPLIFIED_OP_LIST(DECLARE_CASE)
MACHINE_OP_LIST(DECLARE_CASE)
MACHINE_SIMD_OP_LIST(DECLARE_CASE)
JS_SIMPLE_UNOP_LIST(DECLARE_CASE)
JS_OBJECT_OP_LIST(DECLARE_CASE)
JS_CONTEXT_OP_LIST(DECLARE_CASE)
@ -143,6 +144,7 @@ class Typer::Visitor : public Reducer {
COMMON_OP_LIST(DECLARE_CASE)
SIMPLIFIED_OP_LIST(DECLARE_CASE)
MACHINE_OP_LIST(DECLARE_CASE)
MACHINE_SIMD_OP_LIST(DECLARE_CASE)
JS_SIMPLE_UNOP_LIST(DECLARE_CASE)
JS_OBJECT_OP_LIST(DECLARE_CASE)
JS_CONTEXT_OP_LIST(DECLARE_CASE)
@ -2519,8 +2521,24 @@ Type* Typer::Visitor::TypeWord32PairShr(Node* node) { return Type::Internal(); }
Type* Typer::Visitor::TypeWord32PairSar(Node* node) { return Type::Internal(); }
// Heap constants.
// SIMD type methods.
#define SIMD_RETURN_SIMD(Name) \
Type* Typer::Visitor::Type##Name(Node* node) { return Type::Simd(); }
MACHINE_SIMD_RETURN_SIMD_OP_LIST(SIMD_RETURN_SIMD)
#undef SIMD_RETURN_SIMD
#define SIMD_RETURN_NUM(Name) \
Type* Typer::Visitor::Type##Name(Node* node) { return Type::Number(); }
MACHINE_SIMD_RETURN_NUM_OP_LIST(SIMD_RETURN_NUM)
#undef SIMD_RETURN_NUM
#define SIMD_RETURN_BOOL(Name) \
Type* Typer::Visitor::Type##Name(Node* node) { return Type::Boolean(); }
MACHINE_SIMD_RETURN_BOOL_OP_LIST(SIMD_RETURN_BOOL)
#undef SIMD_RETURN_BOOL
// Heap constants.
Type* Typer::Visitor::TypeConstant(Handle<Object> value) {
if (value->IsJSTypedArray()) {

View File

@ -984,6 +984,11 @@ void Verifier::Visitor::Check(Node* node) {
case IrOpcode::kLoadParentFramePointer:
case IrOpcode::kCheckedLoad:
case IrOpcode::kCheckedStore:
#define SIMD_MACHINE_OP_CASE(Name) case IrOpcode::k##Name:
MACHINE_SIMD_OP_LIST(SIMD_MACHINE_OP_CASE)
#undef SIMD_MACHINE_OP_CASE
// TODO(rossberg): Check.
break;
}