[wasm-simd] Implement F64x2 min max for arm64
Bug: v8:8460 Change-Id: I16df8eee6146704e26c6e784452ad8dc4621a460 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1749711 Reviewed-by: Bill Budge <bbudge@chromium.org> Commit-Queue: Zhi An Ng <zhin@chromium.org> Cr-Commit-Position: refs/heads/master@{#63354}
This commit is contained in:
parent
f6e08f43fc
commit
573e0cce97
@ -1798,6 +1798,8 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
|
||||
SIMD_BINOP_CASE(kArm64F64x2Sub, Fsub, 2D);
|
||||
SIMD_BINOP_CASE(kArm64F64x2Mul, Fmul, 2D);
|
||||
SIMD_BINOP_CASE(kArm64F64x2Div, Fdiv, 2D);
|
||||
SIMD_BINOP_CASE(kArm64F64x2Min, Fmin, 2D);
|
||||
SIMD_BINOP_CASE(kArm64F64x2Max, Fmax, 2D);
|
||||
case kArm64F32x4Splat: {
|
||||
__ Dup(i.OutputSimd128Register().V4S(), i.InputSimd128Register(0).S(), 0);
|
||||
break;
|
||||
|
@ -179,6 +179,8 @@ namespace compiler {
|
||||
V(Arm64F64x2Sub) \
|
||||
V(Arm64F64x2Mul) \
|
||||
V(Arm64F64x2Div) \
|
||||
V(Arm64F64x2Min) \
|
||||
V(Arm64F64x2Max) \
|
||||
V(Arm64F32x4Splat) \
|
||||
V(Arm64F32x4ExtractLane) \
|
||||
V(Arm64F32x4ReplaceLane) \
|
||||
|
@ -146,6 +146,8 @@ int InstructionScheduler::GetTargetInstructionFlags(
|
||||
case kArm64F64x2Sub:
|
||||
case kArm64F64x2Mul:
|
||||
case kArm64F64x2Div:
|
||||
case kArm64F64x2Min:
|
||||
case kArm64F64x2Max:
|
||||
case kArm64F32x4Splat:
|
||||
case kArm64F32x4ExtractLane:
|
||||
case kArm64F32x4ReplaceLane:
|
||||
|
@ -3103,6 +3103,8 @@ void InstructionSelector::VisitInt64AbsWithOverflow(Node* node) {
|
||||
V(F64x2Sub, kArm64F64x2Sub) \
|
||||
V(F64x2Mul, kArm64F64x2Mul) \
|
||||
V(F64x2Div, kArm64F64x2Div) \
|
||||
V(F64x2Min, kArm64F64x2Min) \
|
||||
V(F64x2Max, kArm64F64x2Max) \
|
||||
V(F32x4Add, kArm64F32x4Add) \
|
||||
V(F32x4AddHoriz, kArm64F32x4AddHoriz) \
|
||||
V(F32x4Sub, kArm64F32x4Sub) \
|
||||
|
@ -2600,8 +2600,6 @@ void InstructionSelector::VisitWord64AtomicCompareExchange(Node* node) {
|
||||
// !V8_TARGET_ARCH_MIPS64 && !V8_TARGET_ARCH_S390
|
||||
|
||||
#if !V8_TARGET_ARCH_X64
|
||||
void InstructionSelector::VisitF64x2Min(Node* node) { UNIMPLEMENTED(); }
|
||||
void InstructionSelector::VisitF64x2Max(Node* node) { UNIMPLEMENTED(); }
|
||||
void InstructionSelector::VisitF64x2Eq(Node* node) { UNIMPLEMENTED(); }
|
||||
void InstructionSelector::VisitF64x2Ne(Node* node) { UNIMPLEMENTED(); }
|
||||
void InstructionSelector::VisitF64x2Lt(Node* node) { UNIMPLEMENTED(); }
|
||||
@ -2616,6 +2614,8 @@ void InstructionSelector::VisitF64x2Add(Node* node) { UNIMPLEMENTED(); }
|
||||
void InstructionSelector::VisitF64x2Sub(Node* node) { UNIMPLEMENTED(); }
|
||||
void InstructionSelector::VisitF64x2Mul(Node* node) { UNIMPLEMENTED(); }
|
||||
void InstructionSelector::VisitF64x2Div(Node* node) { UNIMPLEMENTED(); }
|
||||
void InstructionSelector::VisitF64x2Min(Node* node) { UNIMPLEMENTED(); }
|
||||
void InstructionSelector::VisitF64x2Max(Node* node) { UNIMPLEMENTED(); }
|
||||
void InstructionSelector::VisitI64x2Splat(Node* node) { UNIMPLEMENTED(); }
|
||||
void InstructionSelector::VisitI64x2ExtractLane(Node* node) { UNIMPLEMENTED(); }
|
||||
void InstructionSelector::VisitI64x2ReplaceLane(Node* node) { UNIMPLEMENTED(); }
|
||||
|
@ -1185,6 +1185,7 @@ WASM_SIMD_TEST_NO_LOWERING(F64x2Div) {
|
||||
}
|
||||
#endif // V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_ARM64
|
||||
|
||||
#if V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_ARM64
|
||||
#if V8_TARGET_ARCH_X64
|
||||
void RunF64x2CompareOpTest(ExecutionTier execution_tier, LowerSimd lower_simd,
|
||||
WasmOpcode opcode, DoubleCompareOp expected_op) {
|
||||
@ -1239,6 +1240,7 @@ WASM_SIMD_TEST_NO_LOWERING(F64x2Lt) {
|
||||
WASM_SIMD_TEST_NO_LOWERING(F64x2Le) {
|
||||
RunF64x2CompareOpTest(execution_tier, lower_simd, kExprF64x2Le, LessEqual);
|
||||
}
|
||||
#endif // V8_TARGET_ARCH_X64
|
||||
|
||||
WASM_SIMD_TEST_NO_LOWERING(F64x2Min) {
|
||||
RunF64x2BinOpTest(execution_tier, lower_simd, kExprF64x2Min, JSMin);
|
||||
@ -1248,6 +1250,7 @@ WASM_SIMD_TEST_NO_LOWERING(F64x2Max) {
|
||||
RunF64x2BinOpTest(execution_tier, lower_simd, kExprF64x2Max, JSMax);
|
||||
}
|
||||
|
||||
#if V8_TARGET_ARCH_X64
|
||||
WASM_SIMD_TEST_NO_LOWERING(I64x2Mul) {
|
||||
RunI64x2BinOpTest(execution_tier, lower_simd, kExprI64x2Mul,
|
||||
base::MulWithWraparound);
|
||||
@ -1271,6 +1274,7 @@ WASM_SIMD_TEST_NO_LOWERING(I64x2MaxU) {
|
||||
UnsignedMaximum);
|
||||
}
|
||||
#endif // V8_TARGET_ARCH_X64
|
||||
#endif // V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_ARM64
|
||||
|
||||
WASM_SIMD_TEST(I32x4Splat) {
|
||||
WasmRunner<int32_t, int32_t> r(execution_tier, lower_simd);
|
||||
|
Loading…
Reference in New Issue
Block a user