- 06 Jun, 2022 1 commit
-
-
Fanchen Kong authored
When a 8x16 shuffle matches a packed byte to dword zero extension, 1. input1 is S128Zero after canonicalization, 2. the indices {0,4,8,16} are consecutive value in the range [0-15] and other indices are in the range [16-31], the shuffle can be matched to packed byte to dword zero extend. These shuffles are commonly used in image processing. Change-Id: I14d1e35401dbc5ecd91f67c46ea9762628835d01 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3547667Reviewed-by: Deepti Gandluri <gdeepti@chromium.org> Commit-Queue: Fanchen Kong <fanchen.kong@intel.com> Cr-Commit-Position: refs/heads/main@{#80953}
-
- 22 Mar, 2021 1 commit
-
-
Ng Zhi An authored
When swizzle is called with a v128.const node, we can check that the indices are either all in bounds, or if they are out of bounds the top bit of each byte is set. This will match exactly pshufb behavior, and so we can omit the paddusb (and getting external reference). Bug: v8:10992 Change-Id: I5479a9eb92ebcfc12bedff5efd3e72bb4a43ff40 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2766222Reviewed-by: Deepti Gandluri <gdeepti@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Commit-Queue: Zhi An Ng <zhin@chromium.org> Cr-Commit-Position: refs/heads/master@{#73583}
-
- 16 Mar, 2021 1 commit
-
-
Clemens Backes authored
This will make accidental includes much easier to see and fix. Without this, you might get compiler or linker errors instead. R=jkummerow@chromium.org Bug: v8:11238 Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel Change-Id: I235d779f9c1ed3af5d736f1554ded427935ddc9b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2756531 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#73422}
-
- 15 Dec, 2020 1 commit
-
-
Zhi An Ng authored
Code like: x = wasm_v32x4_shuffle(x, x, 1, 2, 3, 0); is currently matched by S8x16Concat, which lowers to two instructions: movapd xmm_dst, xmm_src palignr xmm_dst, xmm_src, 0x4 There is a special case after a S8x16Concat is matched:. - is_swizzle, the inputs are the same - it is a 32x4 shuffle (offset % 4 == 0) Which can have a better codegen: - (dst == src) shufps dst, src, 0b00111001 - (dst != src) pshufd dst, src, 0b00111001 Add a new simd shuffle matcher which will match 32x4 rotate, and construct the appropriate indices referring to the 32x4 elements. pshufd for the given example. However, this matching happens after S8x16Concat, so we get the palignr first. We could move the pattern matching cases around, but it will lead to some cases where where it would have matched a S8x16Concat, but now matches a S32x4shuffle instead, leading to worse codegen. Note: we also pattern match on 32x4Swizzle, which correctly generates Change-Id: Ie3aca53bbc06826be2cf49632de4c24ec73d0a9a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2589062Reviewed-by: Bill Budge <bbudge@chromium.org> Commit-Queue: Zhi An Ng <zhin@chromium.org> Cr-Commit-Position: refs/heads/master@{#71754}
-
- 04 Aug, 2020 1 commit
-
-
Ng Zhi An authored
Swizzles are shuffles that only use values from 1 operand, e.g. v8x16.shuffle 0 1 2 3 0 0 0 0 4 5 6 7 0 0 0 0 (all the values are < 16). Match such patterns and emit an optimized codegen that uses less registers and instructions. Only implemented for x64 for now, the other backends will come in follow-up patches. Bug: v8:10696 Change-Id: Iffa694b04c97313eab7d138e4bdad7c0c85cda89 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2335419Reviewed-by: Clemens Backes <clemensb@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Bill Budge <bbudge@chromium.org> Commit-Queue: Zhi An Ng <zhin@chromium.org> Cr-Commit-Position: refs/heads/master@{#69231}
-
- 31 Jul, 2020 2 commits
-
-
Ng Zhi An authored
Also add some simple unittests for these functions. Bug: v8:10696 Change-Id: Ic7607780b4eaf275b20d0937bf214846bf51d539 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2330806Reviewed-by: Bill Budge <bbudge@chromium.org> Commit-Queue: Zhi An Ng <zhin@chromium.org> Cr-Commit-Position: refs/heads/master@{#69183}
-
Ng Zhi An authored
Some of these functions will be reused by Liftoff. Move them into simd-shuffle for sharing (even though these only apply to ia32 and x64). Bug: v8:10696 Change-Id: Ib83a2fcd443f93f86d7a4c85898205edb8c3925c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2330796Reviewed-by: Bill Budge <bbudge@chromium.org> Commit-Queue: Zhi An Ng <zhin@chromium.org> Cr-Commit-Position: refs/heads/master@{#69180}
-
- 30 Jul, 2020 2 commits
-
-
Ng Zhi An authored
Change all the callers in backend specific instruction-selector to call the functions in simd-shuffle.h Also copy over the documentation that was in instruction-selector.h to simd-shuffle.h. Bug: v8:10696 Change-Id: Ic9339d6481316f18c19f35c45460e700b45ec38e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2327182 Commit-Queue: Zhi An Ng <zhin@chromium.org> Reviewed-by: Bill Budge <bbudge@chromium.org> Cr-Commit-Position: refs/heads/master@{#69150}
-
Ng Zhi An authored
These are no longer tied to instruction-selector, so move them out into their own unittests. We can then remove the *ForTesting methods. Bug: v8:10696 Change-Id: I387cf38290d9602b011ee1d13ee5285ac660f208 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2326951Reviewed-by: Bill Budge <bbudge@chromium.org> Commit-Queue: Zhi An Ng <zhin@chromium.org> Cr-Commit-Position: refs/heads/master@{#69149}
-
- 24 Jul, 2020 1 commit
-
-
Ng Zhi An authored
These functions match on specific patterns of shuffle that have more optimized implementations. Moving them out of instruction-selector allows us to reuse them in Liftoff. Most of these pattern matching functions do not depend on InstructionSelector, since they work on byte arrays. (The only one is CanonicalizeShuffle, which swaps node inputs.) This is only the first pass of moving those functions out. In particular we can clean things up more by moving the tests out of instruction-selector as well. Those will come in follow-up changes. Bug: v8:10696 Change-Id: I4a4333cd8c0259875a672179e72d34dad5f7a008 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2308057 Commit-Queue: Zhi An Ng <zhin@chromium.org> Reviewed-by: Bill Budge <bbudge@chromium.org> Cr-Commit-Position: refs/heads/master@{#69051}
-