bytecodealliance / bytecodealliance/wasmtime
Cranelift: x64 backend fails to compile `umulhi` for `i8` values
- Dominant language
- Rust
- Stars
- 18.6k
- Forks
- 1.8k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 126
Description
This was discovered by @dheaton-arm on #3283.
### `.clif` Test Case
```
test run
target x86_64 machinst
function %umulhi_i8(i8, i8) -> i8 {
block0(v0: i8, v1: i8):
v2 = umulhi v0, v1
return v2
}
; run: %umulhi_i8(2, 4) == 0
; run: %umulhi_i8(255, 255) == 254
```
### Steps to Reproduce
`clif-util test the-above.clif`
### Expected Results
A successful result
### Actual Results
```
Running `C:\Users\Afonso\CLionProjects\wasmtime\target\debug\clif-util.exe test .\filetests\filetests\runtests\test.clif`
skipped .\filetests\filetests\runtests\test.clif: host can't run Aarch64(Aarch64) programs
thread 'worker #0' panicked at 'assertion failed: size.is_one_of(&[OperandSize::Size16, OperandSize::Size32,\n OperandSize::Size64])', cranelift\codegen\src\isa\x64\inst\mod.rs:648:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
FAIL .\filetests\filetests\runtests\test.clif: panicked in worker #0: assertion failed: size.is_one_of(&[OperandSize::Size16, OperandSize::Size32,\n OperandSize::Size64])
1 tests
Error: 1 failure
```
### Versions and Environment
Cranelift version or commit: main
Operating system: Windows
Architecture: x64
### Extra Info
A file with this test was added in #3283.
Contributor guide
Assessment
This issue has not been assessed yet.