Skip to content

Commit dfbbb4a

Browse files
ngzhianCommit Bot
authored andcommitted
[wasm-simd] Add bitmask to SIMD MVP
This removes the post-mvp flag for bitmask, since it was accepted into the proposal, see WebAssembly/simd#201. Bug: v8:10308 Change-Id: I4ced43a6484660125d773bc9de46bdea9f72b13b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2216532 Reviewed-by: Deepti Gandluri <[email protected]> Commit-Queue: Zhi An Ng <[email protected]> Cr-Commit-Position: refs/heads/master@{#67993}
1 parent dd04f25 commit dfbbb4a

File tree

3 files changed

+3
-15
lines changed

3 files changed

+3
-15
lines changed

src/compiler/backend/instruction-selector.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2654,11 +2654,6 @@ void InstructionSelector::VisitI64x2MaxU(Node* node) { UNIMPLEMENTED(); }
26542654

26552655
#if !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_IA32 && \
26562656
!V8_TARGET_ARCH_X64
2657-
// TODO(v8:10308) Bitmask operations are in prototype now, we can remove these
2658-
// guards when they go into the proposal.
2659-
void InstructionSelector::VisitI8x16BitMask(Node* node) { UNIMPLEMENTED(); }
2660-
void InstructionSelector::VisitI16x8BitMask(Node* node) { UNIMPLEMENTED(); }
2661-
void InstructionSelector::VisitI32x4BitMask(Node* node) { UNIMPLEMENTED(); }
26622657
// TODO(v8:10501) Prototyping pmin and pmax instructions.
26632658
void InstructionSelector::VisitF32x4Pmin(Node* node) { UNIMPLEMENTED(); }
26642659
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
@@ -346,6 +346,7 @@ bool IsJSCompatibleSignature(const FunctionSig* sig, const WasmFeatures&);
346346
V(I8x16Neg, 0xfd61, s_s) \
347347
V(V8x16AnyTrue, 0xfd62, i_s) \
348348
V(V8x16AllTrue, 0xfd63, i_s) \
349+
V(I8x16BitMask, 0xfd64, i_s) \
349350
V(I8x16SConvertI16x8, 0xfd65, s_ss) \
350351
V(I8x16UConvertI16x8, 0xfd66, s_ss) \
351352
V(I8x16Shl, 0xfd6b, s_si) \
@@ -366,6 +367,7 @@ bool IsJSCompatibleSignature(const FunctionSig* sig, const WasmFeatures&);
366367
V(I16x8Neg, 0xfd81, s_s) \
367368
V(V16x8AnyTrue, 0xfd82, i_s) \
368369
V(V16x8AllTrue, 0xfd83, i_s) \
370+
V(I16x8BitMask, 0xfd84, i_s) \
369371
V(I16x8SConvertI32x4, 0xfd85, s_ss) \
370372
V(I16x8UConvertI32x4, 0xfd86, s_ss) \
371373
V(I16x8SConvertI8x16Low, 0xfd87, s_s) \
@@ -391,6 +393,7 @@ bool IsJSCompatibleSignature(const FunctionSig* sig, const WasmFeatures&);
391393
V(I32x4Neg, 0xfda1, s_s) \
392394
V(V32x4AnyTrue, 0xfda2, i_s) \
393395
V(V32x4AllTrue, 0xfda3, i_s) \
396+
V(I32x4BitMask, 0xfda4, i_s) \
394397
V(I32x4SConvertI16x8Low, 0xfda7, s_s) \
395398
V(I32x4SConvertI16x8High, 0xfda8, s_s) \
396399
V(I32x4UConvertI16x8Low, 0xfda9, s_s) \
@@ -437,9 +440,6 @@ bool IsJSCompatibleSignature(const FunctionSig* sig, const WasmFeatures&);
437440

438441
#define FOREACH_SIMD_POST_MVP_OPCODE(V) \
439442
V(I8x16Mul, 0xfd75, s_ss) \
440-
V(I8x16BitMask, 0xfd64, i_s) \
441-
V(I16x8BitMask, 0xfd84, i_s) \
442-
V(I32x4BitMask, 0xfda4, i_s) \
443443
V(V64x2AnyTrue, 0xfdc2, i_s) \
444444
V(V64x2AllTrue, 0xfdc3, i_s) \
445445
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
@@ -1621,10 +1621,7 @@ WASM_SIMD_TEST(I16x8ReplaceLane) {
16211621
}
16221622
}
16231623

1624-
#if V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_IA32 || \
1625-
V8_TARGET_ARCH_X64
16261624
WASM_SIMD_TEST_NO_LOWERING(I8x16BitMask) {
1627-
FLAG_SCOPE(wasm_simd_post_mvp);
16281625
WasmRunner<int32_t, int32_t> r(execution_tier, lower_simd);
16291626
byte value1 = r.AllocateLocal(kWasmS128);
16301627

@@ -1644,7 +1641,6 @@ WASM_SIMD_TEST_NO_LOWERING(I8x16BitMask) {
16441641
}
16451642

16461643
WASM_SIMD_TEST_NO_LOWERING(I16x8BitMask) {
1647-
FLAG_SCOPE(wasm_simd_post_mvp);
16481644
WasmRunner<int32_t, int32_t> r(execution_tier, lower_simd);
16491645
byte value1 = r.AllocateLocal(kWasmS128);
16501646

@@ -1664,7 +1660,6 @@ WASM_SIMD_TEST_NO_LOWERING(I16x8BitMask) {
16641660
}
16651661

16661662
WASM_SIMD_TEST_NO_LOWERING(I32x4BitMask) {
1667-
FLAG_SCOPE(wasm_simd_post_mvp);
16681663
WasmRunner<int32_t, int32_t> r(execution_tier, lower_simd);
16691664
byte value1 = r.AllocateLocal(kWasmS128);
16701665

@@ -1682,8 +1677,6 @@ WASM_SIMD_TEST_NO_LOWERING(I32x4BitMask) {
16821677
CHECK_EQ(actual, expected);
16831678
}
16841679
}
1685-
#endif // V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_IA32 ||
1686-
// V8_TARGET_ARCH_X64
16871680

16881681
WASM_SIMD_TEST(I8x16Splat) {
16891682
WasmRunner<int32_t, int32_t> r(execution_tier, lower_simd);

0 commit comments

Comments
 (0)