Stream: git-wasmtime

Topic: wasmtime / issue #9654 Cranelift: `fpromote.f32` seems no...


view this post on Zulip Wasmtime GitHub notifications bot (Nov 22 2024 at 08:35):

abc767234318 opened issue #9654:

I constructed a clif file.
multi_func0.zip
I used the following command to run it.

clif-util run -v file_tests/multi_func0.clif

But I got following error:

thread 'main' panicked at cranelift/codegen/src/machinst/lower.rs:685:21:
should be implemented in ISLE: inst = `v37 = fpromote.f32 v19`, type = `Some(types::F32)`
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

view this post on Zulip Wasmtime GitHub notifications bot (Nov 22 2024 at 08:35):

abc767234318 edited issue #9654:

I constructed a clif file.
multi_func0.zip
I used the following command to run it.

clif-util run -v file_tests/multi_func0.clif

But I got the following error:

thread 'main' panicked at cranelift/codegen/src/machinst/lower.rs:685:21:
should be implemented in ISLE: inst = `v37 = fpromote.f32 v19`, type = `Some(types::F32)`
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

view this post on Zulip Wasmtime GitHub notifications bot (Nov 22 2024 at 09:23):

bjorn3 commented on issue #9654:

fpromote requires a float as input, not an i16. If you run the clif ir verifier on this input file it will likely catch this issue. Also please try to use bugpoint in the future to reduce your test case: https://github.com/bytecodealliance/wasmtime/blob/main/cranelift/src/bugpoint.rs Something like cd cranelift; cargo run -- bugpoint multi_func0.clif x86_64 would have worked in this particular case I think.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 22 2024 at 09:43):

abc767234318 commented on issue #9654:

fpromote requires a float as input, not an i16. If you run the clif ir verifier on this input file it will likely catch this issue. Also please try to use bugpoint in the future to reduce your test case: https://github.com/bytecodealliance/wasmtime/blob/main/cranelift/src/bugpoint.rs Something like cd cranelift; cargo run -- bugpoint multi_func0.clif x86_64 would have worked in this particular case I think.

Why the type of v19 is i16? The v19 is generated by the following two instructions.

line 678:  v7 = f16const -0x1.774p-9
line 741:  v19 = bnot.f16 v7  ; v7 = -0x1.774p-9

My understanding is that the type of v19 is f16, not sure what is wrong

view this post on Zulip Wasmtime GitHub notifications bot (Nov 22 2024 at 10:12):

bjorn3 commented on issue #9654:

I didn't notice that you had multiple functions in the clif file.

f16 and f128 is currently basically unsupported in Cranelift. Anything beyond passing around f16 and f128 values should be assumed to not yet be implemented.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 26 2024 at 08:14):

abc767234318 closed issue #9654:

I constructed a clif file.
multi_func0.zip
I used the following command to run it.

clif-util run -v file_tests/multi_func0.clif

But I got the following error:

thread 'main' panicked at cranelift/codegen/src/machinst/lower.rs:685:21:
should be implemented in ISLE: inst = `v37 = fpromote.f32 v19`, type = `Some(types::F32)`
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

view this post on Zulip Wasmtime GitHub notifications bot (Nov 26 2024 at 08:15):

abc767234318 commented on issue #9654:

I didn't notice that you had multiple functions in the clif file.

f16 and f128 is currently basically unsupported in Cranelift. Anything beyond passing around f16 and f128 values should be assumed to not yet be implemented.

Thank you very much, I will close this issue.


Last updated: Dec 23 2024 at 12:05 UTC