Open elliottt opened 2 years ago
Is this because those types are not used by the WebAssembly SIMD instructions for narrowing?
Yep, it appears the ops are only used in particular combinations by cranelift-wasm
and those are the combinations the x64 backend supports. That's OK for now (we're keeping status quo as we migrate lowerings) but we definitely want to support the general case in due time, I think.
.clif
Test CaseSteps to Reproduce
Compile the examples with
clif-util compile --target=x86_64
.Expected Results
The examples should generate code.
Actual Results
There's a panic in the x64 code generator, as these case for
i64x2
input is not implemented forsnarrow
andunarrow
. The following program will compile successfully, as there's a special case for the combination ofsnarrow
andfcvt_to_sint_sat
:https://github.com/bytecodealliance/wasmtime/blob/ca6d648e37c80cb13e5027cc746ec0d2e4bd64d1/cranelift/codegen/src/isa/x64/lower.isle#L3275-L3299
Versions and Environment
Cranelift version or commit: ca6d648e37c80cb13e5027cc746ec0d2e4bd64d1
Operating system: Linux
Architecture: x86_64