Skip to content

Commit 6da647f

Browse files
ngzhianCommit Bot
authored and
Commit Bot
committed
[wasm-simd] Move bitmask into SIMD MVP
Now that 86 has branched, we can move bitmask into the SIMD MVP, it will not affect the current OT. (We want any OT extension to include bitmask.) Bitmask was accepted into the proposal in WebAssembly/simd#201. Bug: v8:10308 Change-Id: Ib61190fcea2bfc0ce7bf733086e1a81388216a59 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2378290 Reviewed-by: Bill Budge <[email protected]> Commit-Queue: Zhi An Ng <[email protected]> Cr-Commit-Position: refs/heads/master@{#69577}
1 parent 9eb090d commit 6da647f

File tree

4 files changed

+3
-19
lines changed

4 files changed

+3
-19
lines changed

src/compiler/backend/instruction-selector.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2684,11 +2684,6 @@ void InstructionSelector::VisitI64x2MaxU(Node* node) { UNIMPLEMENTED(); }
26842684
#if !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_IA32 && \
26852685
!V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_S390X && !V8_TARGET_ARCH_MIPS && \
26862686
!V8_TARGET_ARCH_MIPS64
2687-
// TODO(v8:10308) Bitmask operations are in prototype now, we can remove these
2688-
// guards when they go into the proposal.
2689-
void InstructionSelector::VisitI8x16BitMask(Node* node) { UNIMPLEMENTED(); }
2690-
void InstructionSelector::VisitI16x8BitMask(Node* node) { UNIMPLEMENTED(); }
2691-
void InstructionSelector::VisitI32x4BitMask(Node* node) { UNIMPLEMENTED(); }
26922687
// TODO(v8:10501) Prototyping pmin and pmax instructions.
26932688
void InstructionSelector::VisitF32x4Pmin(Node* node) { UNIMPLEMENTED(); }
26942689
void InstructionSelector::VisitF32x4Pmax(Node* node) { UNIMPLEMENTED(); }

src/wasm/wasm-opcodes.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ bool IsJSCompatibleSignature(const FunctionSig* sig, const WasmFeatures&);
351351
V(I8x16Neg, 0xfd61, s_s) \
352352
V(V8x16AnyTrue, 0xfd62, i_s) \
353353
V(V8x16AllTrue, 0xfd63, i_s) \
354+
V(I8x16BitMask, 0xfd64, i_s) \
354355
V(I8x16SConvertI16x8, 0xfd65, s_ss) \
355356
V(I8x16UConvertI16x8, 0xfd66, s_ss) \
356357
V(I8x16Shl, 0xfd6b, s_si) \
@@ -371,6 +372,7 @@ bool IsJSCompatibleSignature(const FunctionSig* sig, const WasmFeatures&);
371372
V(I16x8Neg, 0xfd81, s_s) \
372373
V(V16x8AnyTrue, 0xfd82, i_s) \
373374
V(V16x8AllTrue, 0xfd83, i_s) \
375+
V(I16x8BitMask, 0xfd84, i_s) \
374376
V(I16x8SConvertI32x4, 0xfd85, s_ss) \
375377
V(I16x8UConvertI32x4, 0xfd86, s_ss) \
376378
V(I16x8SConvertI8x16Low, 0xfd87, s_s) \
@@ -396,6 +398,7 @@ bool IsJSCompatibleSignature(const FunctionSig* sig, const WasmFeatures&);
396398
V(I32x4Neg, 0xfda1, s_s) \
397399
V(V32x4AnyTrue, 0xfda2, i_s) \
398400
V(V32x4AllTrue, 0xfda3, i_s) \
401+
V(I32x4BitMask, 0xfda4, i_s) \
399402
V(I32x4SConvertI16x8Low, 0xfda7, s_s) \
400403
V(I32x4SConvertI16x8High, 0xfda8, s_s) \
401404
V(I32x4UConvertI16x8Low, 0xfda9, s_s) \
@@ -446,9 +449,6 @@ bool IsJSCompatibleSignature(const FunctionSig* sig, const WasmFeatures&);
446449

447450
#define FOREACH_SIMD_POST_MVP_OPCODE(V) \
448451
V(I8x16Mul, 0xfd75, s_ss) \
449-
V(I8x16BitMask, 0xfd64, i_s) \
450-
V(I16x8BitMask, 0xfd84, i_s) \
451-
V(I32x4BitMask, 0xfda4, i_s) \
452452
V(V64x2AnyTrue, 0xfdc2, i_s) \
453453
V(V64x2AllTrue, 0xfdc3, i_s) \
454454
V(I64x2Eq, 0xfdc0, s_ss) \

test/cctest/wasm/test-run-wasm-simd.cc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1670,10 +1670,7 @@ WASM_SIMD_TEST(I16x8ReplaceLane) {
16701670
}
16711671
}
16721672

1673-
#if V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_IA32 || \
1674-
V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
16751673
WASM_SIMD_TEST(I8x16BitMask) {
1676-
FLAG_SCOPE(wasm_simd_post_mvp);
16771674
WasmRunner<int32_t, int32_t> r(execution_tier, lower_simd);
16781675
byte value1 = r.AllocateLocal(kWasmS128);
16791676

@@ -1693,7 +1690,6 @@ WASM_SIMD_TEST(I8x16BitMask) {
16931690
}
16941691

16951692
WASM_SIMD_TEST(I16x8BitMask) {
1696-
FLAG_SCOPE(wasm_simd_post_mvp);
16971693
WasmRunner<int32_t, int32_t> r(execution_tier, lower_simd);
16981694
byte value1 = r.AllocateLocal(kWasmS128);
16991695

@@ -1713,7 +1709,6 @@ WASM_SIMD_TEST(I16x8BitMask) {
17131709
}
17141710

17151711
WASM_SIMD_TEST(I32x4BitMask) {
1716-
FLAG_SCOPE(wasm_simd_post_mvp);
17171712
WasmRunner<int32_t, int32_t> r(execution_tier, lower_simd);
17181713
byte value1 = r.AllocateLocal(kWasmS128);
17191714

@@ -1731,8 +1726,6 @@ WASM_SIMD_TEST(I32x4BitMask) {
17311726
CHECK_EQ(actual, expected);
17321727
}
17331728
}
1734-
#endif // V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_IA32 ||
1735-
// V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
17361729

17371730
WASM_SIMD_TEST(I8x16Splat) {
17381731
WasmRunner<int32_t, int32_t> r(execution_tier, lower_simd);

test/fuzzer/wasm-fuzzer-common.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,6 @@ void WasmExecutionFuzzer::FuzzWasmModule(Vector<const uint8_t> data,
318318
#undef ENABLE_STAGED_FEATURES
319319
// SIMD is not included in staging yet, so we enable it here for fuzzing.
320320
EXPERIMENTAL_FLAG_SCOPE(simd);
321-
// TODO(v8:10308): Bitmask was merged into proposal after 84 cut, so it was
322-
// left gated by this flag. In order to fuzz it, we need this flag. This
323-
// should be removed once we move bitmask out of post mvp.
324-
FLAG_SCOPE(wasm_simd_post_mvp);
325321

326322
// Strictly enforce the input size limit. Note that setting "max_len" on the
327323
// fuzzer target is not enough, since different fuzzers are used and not all

0 commit comments

Comments
 (0)