Stream: git-wasmtime

Topic: wasmtime / issue #7696 Cranelift: Unable to compile valid...


view this post on Zulip Wasmtime GitHub notifications bot (Dec 15 2023 at 23:33):

afonso360 added the bug label to Issue #7696.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 15 2023 at 23:33):

afonso360 added the cranelift label to Issue #7696.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 15 2023 at 23:33):

afonso360 opened issue #7696:

:wave: Hey,

I found this today when running the cranelift-fuzzgen fuzzer. This program compiles with opt_level=none but fails with opt_level=speed.

.clif Test Case

test compile
set opt_level=speed
target x86_64 has_sse3 has_ssse3 has_sse41 has_sse42 has_avx has_avx2 has_fma has_popcnt has_bmi1 has_bmi2 has_lzcnt

function %a() -> i64x2 {
    const0 = 0x00000000000000000000000000000000

block0:
    v19 = iconst.i8 96
    v30 = vconst.i64x2 const0
    v31 = ishl v30, v19  ; v30 = const0, v19 = 96
    v35 = sshr v31, v19  ; v19 = 96
    return  v35
}

Steps to Reproduce

Expected Results

The test to pass.

Actual Results

afonso@DESKTOP-1AHKMV2:~/git/wasmtime/cranelift$ cargo run -- test ./lmao.clif
    Finished dev [unoptimized + debuginfo] target(s) in 0.14s
     Running `/home/afonso/git/wasmtime/target/debug/clif-util test ./lmao.clif`
thread 'worker #0' panicked at cranelift/codegen/src/ir/instructions.rs:788:21:
The Narrower constraint only operates on floats or ints
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 ERROR cranelift_filetests::concurrent > FAIL: panicked in worker #0: The Narrower constraint only operates on floats or ints
FAIL ./lmao.clif: panicked in worker #0: The Narrower constraint only operates on floats or ints
1 tests
Error: 1 failure

Versions and Environment

Cranelift version or commit: main (62ad1185bcbf39a2668708c379f850e57e7ce780)

Operating system: Linux

Architecture: x86/64

Extra Info

Bisecting this gives the first bad commit as e39c6b76f9f01b5a5383a62a2a4a12997416cbef (cc: @fitzgen), but I think that just changed the heuristics of how e apply optimizations and It feels like it might be preexisting but only surfaced by that commit.

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

afonso360 edited issue #7696:

:wave: Hey,

I found this today when running the cranelift-fuzzgen fuzzer. This program compiles with opt_level=none but fails with opt_level=speed.

.clif Test Case

test compile
set opt_level=speed
target x86_64 has_sse3 has_ssse3 has_sse41 has_sse42 has_avx has_avx2 has_fma has_popcnt has_bmi1 has_bmi2 has_lzcnt

function %a() -> i64x2 {
    const0 = 0x00000000000000000000000000000000

block0:
    v19 = iconst.i8 96
    v30 = vconst.i64x2 const0
    v31 = ishl v30, v19  ; v30 = const0, v19 = 96
    v35 = sshr v31, v19  ; v19 = 96
    return  v35
}

Steps to Reproduce

Expected Results

The test to pass.

Actual Results

afonso@DESKTOP-1AHKMV2:~/git/wasmtime/cranelift$ cargo run -- test ./lmao.clif
    Finished dev [unoptimized + debuginfo] target(s) in 0.14s
     Running `/home/afonso/git/wasmtime/target/debug/clif-util test ./lmao.clif`
thread 'worker #0' panicked at cranelift/codegen/src/ir/instructions.rs:788:21:
The Narrower constraint only operates on floats or ints
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 ERROR cranelift_filetests::concurrent > FAIL: panicked in worker #0: The Narrower constraint only operates on floats or ints
FAIL ./lmao.clif: panicked in worker #0: The Narrower constraint only operates on floats or ints
1 tests
Error: 1 failure

Versions and Environment

Cranelift version or commit: main (62ad1185bcbf39a2668708c379f850e57e7ce780)

Operating system: Linux

Architecture: x86/64

Extra Info

Bisecting this gives the first bad commit as e39c6b76f9f01b5a5383a62a2a4a12997416cbef (cc: @fitzgen), but I think that just changed the heuristics of how we apply optimizations and It feels like it might be a preexisting issue that is only surfaced by that commit.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 18 2023 at 18:19):

fitzgen commented on issue #7696:

Thanks for the bug report!

view this post on Zulip Wasmtime GitHub notifications bot (May 14 2024 at 14:58):

afonso360 added the cranelift:area:x64 label to Issue #7696.


Last updated: Dec 23 2024 at 12:05 UTC