bytecodealliance / bytecodealliance/wasmtime
Cranelift: `ssub_sat` unimplmented for `i32x4` and `i64x2` types in x64 backend
- Dominant language
- Rust
- Stars
- 18.6k
- Forks
- 1.8k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 126
Description
### `.clif` Test Case
```
test run
target aarch64
target x86_64
target s390x
function %ssubsat_i32x4(i32x4, i32x4) -> i32x4 {
block0(v0: i32x4, v1: i32x4):
v2 = ssub_sat v0, v1
return v2
}
; run: %ssubsat_i32x4([256 -2147483000 2147483000 2147483000], [256 1000 -1000 -1000]) == [0 -2147483648 2147483647 2147483647]
function %ssubsat_i64x2(i64x2, i64x2) -> i64x2 {
block0(v0: i64x2, v1: i64x2):
v2 = ssub_sat v0, v1
return v2
}
; run: %ssubsat_i64x2([-9223372036854775000 9223372036854775000], [1000 -1000]) == [-9223372036854775808 9223372036854775807]
```
### Steps to Reproduce
`clif-util test ./the-above.clif`
### Expected Results
The test to pass.
### Actual Results
```
thread 'worker #0' panicked at 'Unsupported type for packed ssub_sat instruction: i32x4', cranelift\codegen\src\isa\x64\lower.rs:1554:30
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
FAIL .\filetests\filetests\runtests\test.clif: panicked in worker #0: Unsupported type for packed ssub_sat instruction: i32x4
1 tests
```
### Versions and Environment
Cranelift version or commit: main
Operating system: Windows
Architecture: x64
### Extra Info
This test case was added in #3290
Contributor guide
Assessment
This issue has not been assessed yet.