diff --git a/src/compiler/backend/arm/code-generator-arm.cc b/src/compiler/backend/arm/code-generator-arm.cc index f654af4295..74215cac30 100644 --- a/src/compiler/backend/arm/code-generator-arm.cc +++ b/src/compiler/backend/arm/code-generator-arm.cc @@ -2202,6 +2202,26 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( __ add(dst, dst, Operand(tmp, LSL, 1)); break; } + case kArmI64x2SConvertI32x4Low: { + __ vmovl(NeonS32, i.OutputSimd128Register(), + i.InputSimd128Register(0).low()); + break; + } + case kArmI64x2SConvertI32x4High: { + __ vmovl(NeonS32, i.OutputSimd128Register(), + i.InputSimd128Register(0).high()); + break; + } + case kArmI64x2UConvertI32x4Low: { + __ vmovl(NeonU32, i.OutputSimd128Register(), + i.InputSimd128Register(0).low()); + break; + } + case kArmI64x2UConvertI32x4High: { + __ vmovl(NeonU32, i.OutputSimd128Register(), + i.InputSimd128Register(0).high()); + break; + } case kArmF32x4Splat: { int src_code = i.InputFloatRegister(0).code(); __ vdup(Neon32, i.OutputSimd128Register(), diff --git a/src/compiler/backend/arm/instruction-codes-arm.h b/src/compiler/backend/arm/instruction-codes-arm.h index 1713985124..b5a77a1a10 100644 --- a/src/compiler/backend/arm/instruction-codes-arm.h +++ b/src/compiler/backend/arm/instruction-codes-arm.h @@ -188,6 +188,10 @@ namespace compiler { V(ArmI64x2ShrU) \ V(ArmI64x2BitMask) \ V(ArmI64x2Eq) \ + V(ArmI64x2SConvertI32x4Low) \ + V(ArmI64x2SConvertI32x4High) \ + V(ArmI64x2UConvertI32x4Low) \ + V(ArmI64x2UConvertI32x4High) \ V(ArmI32x4Splat) \ V(ArmI32x4ExtractLane) \ V(ArmI32x4ReplaceLane) \ diff --git a/src/compiler/backend/arm/instruction-scheduler-arm.cc b/src/compiler/backend/arm/instruction-scheduler-arm.cc index d913bea70b..8b52a18482 100644 --- a/src/compiler/backend/arm/instruction-scheduler-arm.cc +++ b/src/compiler/backend/arm/instruction-scheduler-arm.cc @@ -168,6 +168,10 @@ int InstructionScheduler::GetTargetInstructionFlags( case kArmI64x2ShrU: case kArmI64x2BitMask: case kArmI64x2Eq: + case kArmI64x2SConvertI32x4Low: + case kArmI64x2SConvertI32x4High: + case kArmI64x2UConvertI32x4Low: + case kArmI64x2UConvertI32x4High: case kArmI32x4Splat: case kArmI32x4ExtractLane: case kArmI32x4ReplaceLane: diff --git a/src/compiler/backend/arm/instruction-selector-arm.cc b/src/compiler/backend/arm/instruction-selector-arm.cc index 41821f6c4f..bd1e7c4b4f 100644 --- a/src/compiler/backend/arm/instruction-selector-arm.cc +++ b/src/compiler/backend/arm/instruction-selector-arm.cc @@ -2605,6 +2605,10 @@ void InstructionSelector::VisitWord32AtomicPairCompareExchange(Node* node) { V(F32x4Neg, kArmF32x4Neg) \ V(F32x4RecipApprox, kArmF32x4RecipApprox) \ V(F32x4RecipSqrtApprox, kArmF32x4RecipSqrtApprox) \ + V(I64x2SConvertI32x4Low, kArmI64x2SConvertI32x4Low) \ + V(I64x2SConvertI32x4High, kArmI64x2SConvertI32x4High) \ + V(I64x2UConvertI32x4Low, kArmI64x2UConvertI32x4Low) \ + V(I64x2UConvertI32x4High, kArmI64x2UConvertI32x4High) \ V(I32x4SConvertF32x4, kArmI32x4SConvertF32x4) \ V(I32x4SConvertI16x8Low, kArmI32x4SConvertI16x8Low) \ V(I32x4SConvertI16x8High, kArmI32x4SConvertI16x8High) \ diff --git a/src/compiler/backend/instruction-selector.cc b/src/compiler/backend/instruction-selector.cc index a02a46a840..a9b2010b7e 100644 --- a/src/compiler/backend/instruction-selector.cc +++ b/src/compiler/backend/instruction-selector.cc @@ -2748,7 +2748,8 @@ void InstructionSelector::VisitI64x2Eq(Node* node) { UNIMPLEMENTED(); } // && !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_ARM // && !V8_TARGET_ARCH_MIPS64 && !V8_TARGET_ARCH_MIPS -#if !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32 +#if !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32 && \ + !V8_TARGET_ARCH_ARM // TODO(v8:10972) Prototype i64x2 widen i32x4. void InstructionSelector::VisitI64x2SConvertI32x4Low(Node* node) { UNIMPLEMENTED(); @@ -2766,6 +2767,7 @@ void InstructionSelector::VisitI64x2UConvertI32x4High(Node* node) { UNIMPLEMENTED(); } #endif // !V8_TARGET_ARCH_ARM64 || !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32 + // && !V8_TARGET_ARCH_ARM #if !V8_TARGET_ARCH_ARM64 // TODO(v8:11168): Prototyping prefetch. diff --git a/test/cctest/wasm/test-run-wasm-simd.cc b/test/cctest/wasm/test-run-wasm-simd.cc index 2945160a9a..c6be948954 100644 --- a/test/cctest/wasm/test-run-wasm-simd.cc +++ b/test/cctest/wasm/test-run-wasm-simd.cc @@ -1806,7 +1806,8 @@ WASM_SIMD_TEST(I32x4ConvertI16x8) { // TODO(v8:10972) Prototyping i64x2 convert from i32x4. // Tests both signed and unsigned conversion from I32x4 (unpacking). -#if V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_IA32 +#if V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_IA32 || \ + V8_TARGET_ARCH_ARM WASM_SIMD_TEST_NO_LOWERING(I64x2ConvertI32x4) { FLAG_SCOPE(wasm_simd_post_mvp); WasmRunner r(execution_tier, lower_simd); @@ -1841,7 +1842,8 @@ WASM_SIMD_TEST_NO_LOWERING(I64x2ConvertI32x4) { } } } -#endif // V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_IA32 +#endif // V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_IA32 || + // V8_TARGET_ARCH_ARM void RunI32x4UnOpTest(TestExecutionTier execution_tier, LowerSimd lower_simd, WasmOpcode opcode, Int32UnOp expected_op) {