Stream: git-wasmtime

Topic: wasmtime / issue #5466 Cranelift: `iabs.i128` not impleme...


view this post on Zulip Wasmtime GitHub notifications bot (Jan 07 2023 at 12:05):

afonso360 edited issue #5466:

:wave: Hey

.clif Test Case

test interpret
test run
target x86_64

function %iabs_i32(i32) -> i32 {
block0(v0: i32):
    v1 = iabs.i32 v0
    return v1
}
; run: %iabs_i32(1) == 1
; run: %iabs_i32(-1) == 1

Steps to Reproduce

Expected Results

The test to pass

Actual Results

The x86 backend has no lowerings for scalar types. The above test case is only for i32, but the same happens for other scalar types.

thread 'worker #0' panicked at 'should be implemented in ISLE: inst = `v1 = iabs.i32 v0`, type = `Some(types::I32)`', cranelift/codegen/src/machinst/lower.rs:753:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 ERROR cranelift_filetests::concurrent > FAIL: panicked in worker #0: should be implemented in ISLE: inst = `v1 = iabs.i32 v0`, type = `Some(types::I32)`
FAIL ./lmao.clif: panicked in worker #0: should be implemented in ISLE: inst = `v1 = iabs.i32 v0`, type = `Some(types::I32)`
1 tests
Error: 1 failure

Versions and Environment

Cranelift version or commit: main
Operating system: linux
Architecture: x86_64

view this post on Zulip Wasmtime GitHub notifications bot (Jan 17 2023 at 21:48):

alexcrichton labeled issue #5466:

:wave: Hey

.clif Test Case

test interpret
test run
target x86_64

function %iabs_i32(i32) -> i32 {
block0(v0: i32):
    v1 = iabs.i32 v0
    return v1
}
; run: %iabs_i32(1) == 1
; run: %iabs_i32(-1) == 1

Steps to Reproduce

Expected Results

The test to pass

Actual Results

The x86 backend has no lowerings for scalar types. The above test case is only for i32, but the same happens for other scalar types.

thread 'worker #0' panicked at 'should be implemented in ISLE: inst = `v1 = iabs.i32 v0`, type = `Some(types::I32)`', cranelift/codegen/src/machinst/lower.rs:753:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 ERROR cranelift_filetests::concurrent > FAIL: panicked in worker #0: should be implemented in ISLE: inst = `v1 = iabs.i32 v0`, type = `Some(types::I32)`
FAIL ./lmao.clif: panicked in worker #0: should be implemented in ISLE: inst = `v1 = iabs.i32 v0`, type = `Some(types::I32)`
1 tests
Error: 1 failure

Versions and Environment

Cranelift version or commit: main
Operating system: linux
Architecture: x86_64

view this post on Zulip Wasmtime GitHub notifications bot (Oct 04 2023 at 21:22):

p3achyjr commented on issue #5466:

Hello! A couple friends and I were looking into this issue, and we ran into issues where x86 doesn't seem to have instructions that operate on i128s as a whole. We were thinking of implementing a rule where we check the upper 64 bits, and then do the condition negation on both segments of the i128 if the check flips the sign flag. What are your thoughts?

view this post on Zulip Wasmtime GitHub notifications bot (Oct 04 2023 at 21:48):

afonso360 commented on issue #5466:

That seems to be what GCC does in these cases, although LLVM has a different implementation (Godbolt). I'm not too much of an x86 expert to be able to tell which one is the better implementation.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2023 at 03:23):

p3achyjr commented on issue #5466:

thanks you! also, for some reason I can't this anywhere--how do you build clif-util?

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2023 at 03:23):

p3achyjr edited a comment on issue #5466:

thank you! also, for some reason I can't this anywhere--how do you build clif-util?

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2023 at 03:37):

cfallin commented on issue #5466:

@p3achyjr you can build clif-util with cargo build -p cranelift-tools (it's a bit confusing, sorry -- cranelift-tools is the name of the crate that lives in cranelift/, and it has a binary named clif-util).

view this post on Zulip Wasmtime GitHub notifications bot (Oct 06 2023 at 01:12):

p3achyjr commented on issue #5466:

Posted https://github.com/bytecodealliance/wasmtime/pull/7166/commits--I'm definitely not a .isle expert, so please leave comments :)

view this post on Zulip Wasmtime GitHub notifications bot (Oct 06 2023 at 01:13):

p3achyjr edited a comment on issue #5466:

Posted https://github.com/bytecodealliance/wasmtime/pull/7166/commits --I'm definitely not a .isle expert, so please leave comments :)

view this post on Zulip Wasmtime GitHub notifications bot (Oct 06 2023 at 10:01):

afonso360 closed issue #5466:

:wave: Hey

.clif Test Case

test interpret
test run
target x86_64

function %iabs_i32(i32) -> i32 {
block0(v0: i32):
    v1 = iabs.i32 v0
    return v1
}
; run: %iabs_i32(1) == 1
; run: %iabs_i32(-1) == 1

Steps to Reproduce

Expected Results

The test to pass

Actual Results

The x86 backend has no lowerings for scalar types. The above test case is only for i32, but the same happens for other scalar types.

thread 'worker #0' panicked at 'should be implemented in ISLE: inst = `v1 = iabs.i32 v0`, type = `Some(types::I32)`', cranelift/codegen/src/machinst/lower.rs:753:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 ERROR cranelift_filetests::concurrent > FAIL: panicked in worker #0: should be implemented in ISLE: inst = `v1 = iabs.i32 v0`, type = `Some(types::I32)`
FAIL ./lmao.clif: panicked in worker #0: should be implemented in ISLE: inst = `v1 = iabs.i32 v0`, type = `Some(types::I32)`
1 tests
Error: 1 failure

Versions and Environment

Cranelift version or commit: main
Operating system: linux
Architecture: x86_64


Last updated: Nov 22 2024 at 17:03 UTC