Stream: git-wasmtime

Topic: wasmtime / issue #1133 Tracking issue for booleans


view this post on Zulip Wasmtime GitHub notifications bot (Sep 30 2021 at 00:42):

StackDoubleFlow commented on issue #1133:

Is the process complete? bnot now panics on an unimplemented! during lowering.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 30 2021 at 02:01):

cfallin commented on issue #1133:

Yes, we're currently using the new backend. It looks like the lowering for bnot for scalar boolean types exists for aarch64 but not for x86-64; a PR to add this on x86-64 would be a welcome contribution and a good first bug if anyone wants to try this!

(We still have some holes in supported-operand-types coverage for CLIF that is outside of what the Wasm frontend generates, and the Wasm frontend doesn't use Cranelift-level bools, so that's probably why this still isn't implemented. Sorry about that!)

view this post on Zulip Wasmtime GitHub notifications bot (Oct 01 2021 at 19:19):

akirilov-arm commented on issue #1133:

And looking at the other items in this issue - currently we do not allow loads and stores of scalar booleans; this has been discussed at length in #3205, together with other aspects of the boolean types.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 23 2021 at 13:57):

pnevyk commented on issue #1133:

It seems that bnot no longer panics on x86_64 target since #3592 . I tried to allow x86_64 target in this runtest and it does not fail, while it fails before the PR.

Not sure if that was intentional given the ongoing (?) discussion on representation of b1.

view this post on Zulip Wasmtime GitHub notifications bot (May 04 2022 at 23:02):

cfallin commented on issue #1133:

Indeed (re: above), bools are fairly well supported now; I think we can probably close this tracking issue. The broader issue of what we want to do about bool representations in #3205 should continue regardless, as we still need to pin down some details of what we want at the CLIF-semantics level.

view this post on Zulip Wasmtime GitHub notifications bot (May 04 2022 at 23:02):

cfallin closed issue #1133:

See vaguely bytecodealliance/wasmtime#1110, bytecodealliance/wasmtime#1045, and https://github.com/jyn514/rcc/issues/92. An easy way to do this might be to convert from bool -> int -> bool and back as suggested in https://github.com/CraneStation/cranelift/issues/922#issuecomment-523931097.

function u0:0() -> i32 system_v {
ebb0:
    v0 = iconst.i32 1
    v1 = icmp_imm ne v0, 0
    v2 = bnot v1
    v3 = bint.i32 v2
    return v3
}

codegen error: Compilation error: Verifier errors:

- inst2: v2 is a real GPR value defined by a ghost instruction
function u0:0() system_v {
ebb0:
    v0 = iconst.i8 0
    v1 = iconst.i8 0
    v2 = icmp ne v0, v1
    brz v2, ebb1
    return

ebb1:
    return
}

codegen error: Compilation error: Verifier errors:

- inst3: Branch must have an encoding
function u0:0() -> i32 system_v {
    ss0 = explicit_slot 1

ebb0:
    v0 = bconst.b1 true
    v1 = stack_addr.i64 ss0
    store v0, v1
    v2 = iconst.i32 0
    return v2
}

fatal: - inst2: has an invalid controlling type b1

function u0:0() -> i32 system_v {
    ss0 = explicit_slot 1

ebb0:
    v0 = stack_addr.i64 ss0
    v1 = bconst.b1 true
    v2 = load.b1 v0
    v3 = bor v2, v1
    store v3, v0
    v4 = iconst.i32 0
    return v4
}

fatal: - inst2: has an invalid controlling type b1

- inst4: has an invalid controlling type b1


Last updated: Nov 22 2024 at 17:03 UTC