Commit e9caa2d0 authored by Deepti Gandluri's avatar Deepti Gandluri Committed by V8 LUCI CQ

[wasm-relaxed-simd] Enable relaxed conversions on ARM

Codegen details detailed in the relevant github issue.
https://github.com/WebAssembly/relaxed-simd/issues/21

Bug: v8:12284
Change-Id: I06c8859035abae775269bdf949ff0f1c2e262859
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3508560Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79410}
parent 0d1ffe30
......@@ -2588,10 +2588,12 @@ void InstructionSelector::VisitWord32AtomicPairCompareExchange(Node* node) {
V(I64x2UConvertI32x4Low, kArmI64x2UConvertI32x4Low) \
V(I64x2UConvertI32x4High, kArmI64x2UConvertI32x4High) \
V(I32x4SConvertF32x4, kArmI32x4SConvertF32x4) \
V(I32x4RelaxedTruncF32x4S, kArmI32x4SConvertF32x4) \
V(I32x4SConvertI16x8Low, kArmI32x4SConvertI16x8Low) \
V(I32x4SConvertI16x8High, kArmI32x4SConvertI16x8High) \
V(I32x4Neg, kArmI32x4Neg) \
V(I32x4UConvertF32x4, kArmI32x4UConvertF32x4) \
V(I32x4RelaxedTruncF32x4U, kArmI32x4UConvertF32x4) \
V(I32x4UConvertI16x8Low, kArmI32x4UConvertI16x8Low) \
V(I32x4UConvertI16x8High, kArmI32x4UConvertI16x8High) \
V(I32x4Abs, kArmI32x4Abs) \
......@@ -3255,6 +3257,14 @@ void InstructionSelector::VisitF64x2PromoteLowF32x4(Node* node) {
g.UseFixed(node->InputAt(0), q0));
}
void InstructionSelector::VisitI32x4RelaxedTruncF64x2SZero(Node* node) {
VisitI32x4TruncSatF64x2SZero(node);
}
void InstructionSelector::VisitI32x4RelaxedTruncF64x2UZero(Node* node) {
VisitI32x4TruncSatF64x2UZero(node);
}
void InstructionSelector::AddOutputToSelectContinuation(OperandGenerator* g,
int first_input_index,
Node* node) {
......
......@@ -2813,11 +2813,6 @@ void InstructionSelector::VisitF32x4RelaxedMin(Node* node) { UNIMPLEMENTED(); }
void InstructionSelector::VisitF32x4RelaxedMax(Node* node) { UNIMPLEMENTED(); }
void InstructionSelector::VisitF64x2RelaxedMin(Node* node) { UNIMPLEMENTED(); }
void InstructionSelector::VisitF64x2RelaxedMax(Node* node) { UNIMPLEMENTED(); }
#endif // !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_ARM64
// && !V8_TARGET_ARCH_RISCV64 && !V8_TARGET_ARM
#if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_ARM64 && \
!V8_TARGET_ARCH_RISCV64
void InstructionSelector::VisitI32x4RelaxedTruncF64x2SZero(Node* node) {
UNIMPLEMENTED();
}
......@@ -2830,6 +2825,11 @@ void InstructionSelector::VisitI32x4RelaxedTruncF32x4S(Node* node) {
void InstructionSelector::VisitI32x4RelaxedTruncF32x4U(Node* node) {
UNIMPLEMENTED();
}
#endif // !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_ARM64
// && !V8_TARGET_ARCH_RISCV64 && !V8_TARGET_ARM
#if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_ARM64 && \
!V8_TARGET_ARCH_RISCV64
#endif // !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_ARM64
// && !V8_TARGET_ARCH_RISCV64
......
......@@ -330,11 +330,7 @@ WASM_RELAXED_SIMD_TEST(F64x2RelaxedMin) {
WASM_RELAXED_SIMD_TEST(F64x2RelaxedMax) {
RunF64x2BinOpTest(execution_tier, kExprF64x2RelaxedMax, Maximum);
}
#endif // V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM64 ||
// V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_RISCV64
#if V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM64 || \
V8_TARGET_ARCH_RISCV64
namespace {
// For relaxed trunc instructions, don't test out of range values.
// FloatType comes later so caller can rely on template argument deduction and
......@@ -390,7 +386,11 @@ WASM_RELAXED_SIMD_TEST(I32x4RelaxedTruncF32x4U) {
IntRelaxedTruncFloatTest<uint32_t, float>(
execution_tier, kExprI32x4RelaxedTruncF32x4U, kExprF32x4Splat);
}
#endif // V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM64 ||
// V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_RISCV64
#if V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM64 || \
V8_TARGET_ARCH_RISCV64
WASM_RELAXED_SIMD_TEST(I8x16RelaxedSwizzle) {
// Output is only defined for indices in the range [0,15].
WasmRunner<int32_t> r(execution_tier);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment