abrown closed Issue #1176:
What is the feature or code improvement you would like to do in Cranelift?
I would like to implement the SIMD
load_extend
instructions.What is the value of adding this in Cranelift?
This is necessary for Wasm SIMD spec compliance.
Do you have an implementation plan, and/or ideas for data structures or algorithms to use?
I see that currently
shared/instructions.rs
includes instructions such asuload32
andsload32
; one option is to add the additional instructions[u/s]load8x8
,[u/s]load16x4
, and[u/s]load32x4
. Alternately, @bnjbvr and I had discussed using the IR->IR infrastructure of legalization to implement peephole optimizations; if this was in place and at the right level, I could translate the Wasmload8x8_s
, e.g., to Cranelift'sload.i8x8
anduextend
and then write a peephole optimization to generate the appropriate x86PMOVSXBW
to encode both of these instructions (perhaps with a new Craneliftx86_pmovsxb
instruction). Which approach is better.
Last updated: Dec 23 2024 at 12:05 UTC