Stream: git-wasmtime

Topic: wasmtime / issue #12165 Cranelift: should be implemented ...


view this post on Zulip Wasmtime GitHub notifications bot (Dec 15 2025 at 13:34):

abc767234318 opened issue #12165:

I constructed a CLIF test case that triggers an error on x86_64 but not on AArch64. I suspect this may be a bug.

.clif Test Case

test compile
target x86_64 sse42 has_avx

function %main() -> i32x4 {
    const0 = 0x7e2ac3193c260db87e307092f0285f4c
block0:
    v0 = vconst.f64x2 const0
    v1 = fcvt_to_uint_sat.i64x2 v0
    v2= vconst.i64x2 [1 1]
    v3 = uunarrow v1, v2

    jump block1

block1:
    return v3
}

; print: %main()

Steps to Reproduce

My command is as follows:

clif-util test -v ./test.clif

Got the following outputs:

 ERROR cranelift_filetests::concurrent] FAIL: compile
FAIL ./output/x86_64/cranelift_ir_5_none.clif: compile

Caused by:
    Unsupported feature: should be implemented in ISLE: inst = `v3 = uunarrow.i64x2 v1, v2  ; v2 = const1`, type = `Some(types::I32X4)`
1 tests
Error: 1 failure

And if I modify the target x86_64 sse42 has_avx to target aarch64, it processed successfully.

TODO: What actually happens? Panic? Segfault? Incorrect result?

Versions and Environment

Cranelift version or commit: TODO

Operating system: TODO

Architecture: TODO

Extra Info

Anything else you'd like to add?

view this post on Zulip Wasmtime GitHub notifications bot (Dec 15 2025 at 13:34):

abc767234318 added the bug label to Issue #12165.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 15 2025 at 13:34):

abc767234318 added the cranelift label to Issue #12165.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 15 2025 at 13:34):

abc767234318 edited issue #12165:

I constructed a CLIF test case that triggers an error on x86_64 but not on AArch64. I suspect this may be a bug.

.clif Test Case

test compile
target x86_64 sse42 has_avx

function %main() -> i32x4 {
    const0 = 0x7e2ac3193c260db87e307092f0285f4c
block0:
    v0 = vconst.f64x2 const0
    v1 = fcvt_to_uint_sat.i64x2 v0
    v2= vconst.i64x2 [1 1]
    v3 = uunarrow v1, v2

    jump block1

block1:
    return v3
}

; print: %main()

Steps to Reproduce

My command is as follows:

clif-util test -v ./test.clif

Got the following outputs:

 ERROR cranelift_filetests::concurrent] FAIL: compile
FAIL ./output/x86_64/cranelift_ir_5_none.clif: compile

Caused by:
    Unsupported feature: should be implemented in ISLE: inst = `v3 = uunarrow.i64x2 v1, v2  ; v2 = const1`, type = `Some(types::I32X4)`
1 tests
Error: 1 failure

And if I modify the target x86_64 sse42 has_avx to target aarch64, it processed successfully.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 15 2025 at 20:02):

fitzgen commented on issue #12165:

Looks like we are missing a uunarrow lowering for i64x2 on x86-64. Reading the code, we only support what Wasm's SIMD instructions require. Should be relatively easy to add additional rules here:

https://github.com/bytecodealliance/wasmtime/blob/ab030780b67ce79c8567cd245353a0e7f1e05d27/cranelift/codegen/src/isa/x64/lower.isle#L5023

@abc767234318, is this something you would be interested in contributing?

view this post on Zulip Wasmtime GitHub notifications bot (Dec 15 2025 at 20:02):

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

view this post on Zulip Wasmtime GitHub notifications bot (Dec 15 2025 at 20:02):

fitzgen added the isle label to Issue #12165.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 16 2025 at 02:48):

abc767234318 commented on issue #12165:

Looks like we are missing a uunarrow lowering for i64x2 on x86-64. Reading the code, we only support what Wasm's SIMD instructions require. Should be relatively easy to add additional rules here:

wasmtime/cranelift/codegen/src/isa/x64/lower.isle

Line 5023 in ab03078

;; Rules for uunarrow ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@abc767234318, is this something you would be interested in contributing?

Sorry, although I have read the ISLE documentation many times, I still don't understand most of it well enough to contribute effectively. (・_・;)

view this post on Zulip Wasmtime GitHub notifications bot (Dec 22 2025 at 07:06):

abc767234318 closed issue #12165:

I constructed a CLIF test case that triggers an error on x86_64 but not on AArch64. I suspect this may be a bug.

.clif Test Case

test compile
target x86_64 sse42 has_avx

function %main() -> i32x4 {
    const0 = 0x7e2ac3193c260db87e307092f0285f4c
block0:
    v0 = vconst.f64x2 const0
    v1 = fcvt_to_uint_sat.i64x2 v0
    v2= vconst.i64x2 [1 1]
    v3 = uunarrow v1, v2

    jump block1

block1:
    return v3
}

; print: %main()

Steps to Reproduce

My command is as follows:

clif-util test -v ./test.clif

Got the following outputs:

 ERROR cranelift_filetests::concurrent] FAIL: compile
FAIL ./output/x86_64/cranelift_ir_5_none.clif: compile

Caused by:
    Unsupported feature: should be implemented in ISLE: inst = `v3 = uunarrow.i64x2 v1, v2  ; v2 = const1`, type = `Some(types::I32X4)`
1 tests
Error: 1 failure

And if I modify the target x86_64 sse42 has_avx to target aarch64, it processed successfully.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 22 2025 at 07:06):

abc767234318 commented on issue #12165:

As suggested, I've moved this case to the new tracking list here: https://github.com/bytecodealliance/wasmtime/issues/12197 . I'll close this one now


Last updated: Jan 09 2026 at 13:15 UTC