Index: test/cctest/wasm/test-run-wasm-simd.cc |
diff --git a/test/cctest/wasm/test-run-wasm-simd.cc b/test/cctest/wasm/test-run-wasm-simd.cc |
index 02e86f37711eae2f0a13d8061c3f92cdf1af1964..ab7a621f25a9464afe0d8c88752d1157fad41409 100644 |
--- a/test/cctest/wasm/test-run-wasm-simd.cc |
+++ b/test/cctest/wasm/test-run-wasm-simd.cc |
@@ -1710,6 +1710,12 @@ WASM_EXEC_COMPILED_TEST(S32x2Reverse) { |
RunBinaryLaneOpTest<int32_t>(kExprS32x4Shuffle, {{1, 0, 3, 2}}); |
} |
+// Test irregular shuffle. |
+WASM_EXEC_COMPILED_TEST(S32x4Irregular) { |
+ RunBinaryLaneOpTest<int32_t>(kExprS32x4Shuffle, {{0, 4, 4, 5}}); |
+ RunBinaryLaneOpTest<int32_t>(kExprS32x4Shuffle, {{0, 0, 0, 1}}); |
+} |
+ |
WASM_EXEC_COMPILED_TEST(S16x8ZipLeft) { |
RunBinaryLaneOpTest<int16_t>(kExprS16x8Shuffle, {{0, 8, 1, 9, 2, 10, 3, 11}}); |
RunBinaryLaneOpTest<int16_t>(kExprS16x8Shuffle, {{0, 0, 1, 1, 2, 2, 3, 3}}); |
@@ -1753,6 +1759,11 @@ WASM_EXEC_COMPILED_TEST(S16x2Reverse) { |
RunBinaryLaneOpTest<int16_t>(kExprS16x8Shuffle, {{1, 0, 3, 2, 5, 4, 7, 6}}); |
} |
+WASM_EXEC_COMPILED_TEST(S16x8Irregular) { |
+ RunBinaryLaneOpTest<int16_t>(kExprS16x8Shuffle, {{0, 8, 8, 0, 2, 10, 3, 11}}); |
+ RunBinaryLaneOpTest<int16_t>(kExprS16x8Shuffle, {{0, 0, 0, 0, 2, 2, 3, 3}}); |
+} |
+ |
WASM_EXEC_COMPILED_TEST(S8x16ZipLeft) { |
RunBinaryLaneOpTest<int8_t>( |
kExprS8x16Shuffle, |
@@ -1817,6 +1828,14 @@ WASM_EXEC_COMPILED_TEST(S8x2Reverse) { |
11, 10, 13, 12, 15, 14}}); |
} |
+WASM_EXEC_COMPILED_TEST(S8x16Irregular) { |
+ RunBinaryLaneOpTest<int8_t>( |
+ kExprS8x16Shuffle, |
+ {{0, 16, 0, 16, 2, 18, 3, 19, 4, 20, 5, 21, 6, 22, 7, 23}}); |
+ RunBinaryLaneOpTest<int8_t>( |
+ kExprS8x16Shuffle, {{0, 0, 0, 0, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7}}); |
+} |
+ |
// Test shuffles that concatenate the two vectors. |
template <typename T> |
void RunConcatOpTest(WasmOpcode simd_op) { |