bytecodealliance / bytecodealliance/wasmtime

Cranelift: isplit and iconcat only support i128

Open
#6,073 0 comments 4 reactions 0 assignees View on GitHub
bug cranelift
Dominant language
Rust
Stars
18.6k
Forks
1.8k
Avg merge
1d 19h
Merged PRs (30d)
121

Description

`isplit` and `iconcat` lack implementations for instantiations that don't end up involving i128.

### `.clif` Test Case

```
test compile
target x86_64
target aarch64
target s390x
target riscv64

function %f(i64) -> i32, i32 {
block0(v0: i64):
v1, v2 = isplit v0
return v1, v2
}
```

```
test compile
target x86_64
target aarch64
target s390x
target riscv64

function %f(i32, i32) -> i64 {
block0(v0: i32, v1: i32):
v2 = iconcat v0, v1
return v2
}
```

### Steps to Reproduce

```
cargo run -p cranelift-tools -- test bug.clif
```

### Expected Results

Both functions should compile.

### Actual Results

```
thread 'worker #3' panicked at 'should be implemented in ISLE: inst = `v1, v2 = isplit.i64 v0`, type = `Some(types::I32)`', cranelift/codegen/src/machinst/lower.rs:750:21
```

### Versions and Environment

Cranelift version or commit: b5a2d536acb2a8a8a505116302b36173bb713748
Operating system: Linux
Architecture: x86_64

### Extra Info

This problem is pretty uniform across the backends, with implementations of `isplit` and `iconcat` only being present for `i128`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.