Stream: git-wasmtime

Topic: wasmtime / issue #13790 Cranelift: Optimization results i...


view this post on Zulip Wasmtime GitHub notifications bot (Jul 01 2026 at 14:16):

bjorn3 opened issue #13790:

Thanks for filing an issue! Please fill out the TODOs below.

.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.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 01 2026 at 14:16):

bjorn3 added the bug label to Issue #13790.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 01 2026 at 14:16):

bjorn3 added the cranelift label to Issue #13790.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 01 2026 at 14:16):

bjorn3 edited issue #13790:

.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.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 01 2026 at 17:05):

fitzgen added the cranelift:area:x64 label to Issue #13790.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 03 2026 at 09:31):

hiSandog commented on issue #13790:

This seems like a case where an optimization pass produces IR that is legal in the mid-end but not supported by the selected x86_64 lowering path. A reduced CLIF test plus a verifier/check after the relevant optimization would help pin down whether the pass should be target-aware or the backend should handle the new shape. The regression should assert a normal compile error or successful lowering, never a backend-internal unsupported IR failure.


Last updated: Jul 29 2026 at 05:03 UTC