Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not all WebAssembly SIMD ops are being generated correctly #5130

Open
steven-johnson opened this issue Jul 20, 2020 · 2 comments
Open

Not all WebAssembly SIMD ops are being generated correctly #5130

steven-johnson opened this issue Jul 20, 2020 · 2 comments
Assignees

Comments

@steven-johnson
Copy link
Contributor

This is a tracking bug for SIMD generation in the wasm backend; there are a number of SIMD opcodes in the final wasm-simd spec that we should be generating, but aren't. The bulk of these appear to be suboptimal code generation by the wasm backend in LLVM trunk (12.x) and have been reported to the relevant people, along with repro cases, and work is being done to improve them; it may be that some of them require additional effort or special-casing on Halide's side. At present, the instructions known missing are:

  • v128.constant
  • SIMD left-shift (i8x16.shl, etc) and right-shift (i8x16.shr_s, i8x16.shr_u, etc) when the RHS is not a constant
  • integer narrowing (eg i8x16.narrow_i16x8_s)
  • integer widening (eg i16x8.widen_low_i8x16_s)

Additionally, the wasm sign-extension opcodes (eg i32.extend8_s, not part of the SIMD spec) aren't reliably emitted.

@steven-johnson steven-johnson self-assigned this Jul 20, 2020
@steven-johnson
Copy link
Contributor Author

steven-johnson commented Jan 28, 2021

due to recent churn in the wasm-simd spec, more stuff is broken and will need attention; some things in simd_op_check that no longer get emitted (and may no longer exist):

  • v8x16.shuffle
  • v16x8.load_splat

(Basically, all of the wasm-simd ops need to be revisited once LLVM stabilizes generation of the final spec.)

@steven-johnson
Copy link
Contributor Author

Work on this is on hold until WABT gets updated to understand all the final-spec simd opcodes; see WebAssembly/simd#480 for status.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant