Bug 248995
| Summary: | [WebAssembly SIMD] Emulate 8-bit shift instructions and i8x16.popcnt on Intel | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | David Degazio <d_degazio> |
| Component: | WebAssembly | Assignee: | David Degazio <d_degazio> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=248639 | ||
| Bug Depends on: | |||
| Bug Blocks: | 246345 | ||
David Degazio
While most other SIMD bitwise operations are tracked in https://bugs.webkit.org/show_bug.cgi?id=248639, I'm splitting off the following instructions:
- i8x16.shl, i8x16.shr_s, i8x16.shr_u
- i8x16.popcnt
into this bug so they don't hold up the other patch. None of these instructions are supported natively on Intel, at least without AVX-512, and they also
aren't easy to emulate. So they require some additional effort to implement necessary supporting instructions and figure out the best isel.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
David Degazio
rdar://103159176
David Degazio
Looks like despite logical right-shift being supported for 64-bit elements, arithmetic right-shift is only supported with AVX-512 (which we really can't assume will be present). So we also need to emulate i64x2.shr_s.
David Degazio
Pull request: https://github.com/WebKit/WebKit/pull/7777
EWS
Committed 258089@main (7d8a35c36444): <https://commits.webkit.org/258089@main>
Reviewed commits have been landed. Closing PR #7777 and removing active labels.