bytecodealliance / bytecodealliance/wasmtime

Cranelift: Optimization results in IR unsupported by x86_64 backend

Open
#13,790 1 comment 1 reaction 0 assignees View on GitHub
bug cranelift cranelift:area:x64
Dominant language
Rust
Stars
18.6k
Forks
1.8k
Avg merge
1d 19h
Merged PRs (30d)
121

Description

### `.clif` Test Case

```
test compile
set enable_llvm_abi_extensions
set opt_level=speed_and_size
target x86_64

function u0:0() -> i128 system_v {
block1:
v0 = iconst.i64 0
v1 = uextend.i128 v0 ; v0 = 0
v2 = iconst.i64 0
v3 = iconcat v2, v2 ; v2 = 0, v2 = 0
v4 = isub v3, v1
v5 = icmp ugt v4, v3
v14 = select v5, v3, v4
return v14
}
```

### Expected Results

Compiles like it does without optimizations.

### Actual Results

```
Unsupported feature: should be implemented in ISLE: inst = `v18 = umin.i128 v4, v1`, type = `Some(types::I128)`
```

### Versions and Environment

Cranelift version or commit: 0.133 and main

Operating system: Not relevant

Architecture: x86_64

### Extra Info

This was originally reported as https://github.com/rust-lang/rustc_codegen_cranelift/issues/1670.

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.