Stream: git-wasmtime

Topic: wasmtime / Issue #1505 Cranelift: imax/imin ghost value


view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2020 at 08:51):

RobinTD opened Issue #1505:

Using cranelift 0.62, the following results in this error message:" v5 is a ghost value used by a real [Op1ret#c3] instruction".

function u0:82(i64) -> i64 system_v {
block0(v0: i64):
    v1 = load.i64 notrap aligned v0
    v2 = load.i64 notrap aligned v0+8
    v3 = iconst.i64 1
    v4 = iconst.i64 2
    v5 = imax v3, v4
    return v5
}

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2020 at 08:51):

RobinTD labeled Issue #1505:

Using cranelift 0.62, the following results in this error message:" v5 is a ghost value used by a real [Op1ret#c3] instruction".

function u0:82(i64) -> i64 system_v {
block0(v0: i64):
    v1 = load.i64 notrap aligned v0
    v2 = load.i64 notrap aligned v0+8
    v3 = iconst.i64 1
    v4 = iconst.i64 2
    v5 = imax v3, v4
    return v5
}

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2020 at 08:51):

RobinTD labeled Issue #1505:

Using cranelift 0.62, the following results in this error message:" v5 is a ghost value used by a real [Op1ret#c3] instruction".

function u0:82(i64) -> i64 system_v {
block0(v0: i64):
    v1 = load.i64 notrap aligned v0
    v2 = load.i64 notrap aligned v0+8
    v3 = iconst.i64 1
    v4 = iconst.i64 2
    v5 = imax v3, v4
    return v5
}

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2020 at 08:51):

github-actions[bot] commented on Issue #1505:

Subscribe to Label Action

cc @bnjbvr

<details>
This issue or pull request has been labeled: "cranelift"

Thus the following users have been cc'd because of the following labels:

To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2020 at 08:58):

bjorn3 commented on Issue #1505:

imax is only implemented for 128bit vectors with 8, 16 or 32bit lanes:

https://github.com/bytecodealliance/wasmtime/blob/428449133943213f2edc58ec161efcbb23d0eebd/cranelift/codegen/meta/src/isa/x86/legalize.rs#L634-L635

It makes sense to me to implement it for non-vectors too.

v5 is a ghost value used by a real [Op1ret#c3] instruction

A ghost value is a value which is the output of an instruction without encoding, so this says that the imax which has v5 as output doesn't have an encoding.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2020 at 09:01):

RobinTD commented on Issue #1505:

Thanks. fmin/fmax works for scalars, so making it work for integer scalars too would be less surprising.


Last updated: Dec 23 2024 at 12:05 UTC