Stream: git-wasmtime

Topic: wasmtime / issue #5923 Cranelift: `sqmul_round_sat.{i16,i...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 03 2023 at 19:16):

afonso360 opened issue #5923:

:wave: Hey,

This is probably a docs issue.

The docs for this instruction state that it is "Polymorphic over all integer types (scalar and vector) with 16- or 32-bit numbers.".

But it isn't, and trying to compile it with either i32 / i16 causes a verifier error.

Do we want to enable this instruction for scalars? Or should we update the docs so that they are SIMD only?

.clif Test Case

test run
target x86_64
target aarch64
target s390x

function %a() -> i32 system_v {
block0:
    v0 = iconst.i32 0
    v1 = sqmul_round_sat v0, v0
    return v1
}

; run: %a() == 0

Steps to Reproduce

Expected Results

The test to pass.

Actual Results

 ERROR cranelift_filetests::concurrent > FAIL: failed to parse ./lmao.clif
FAIL ./lmao.clif: failed to parse ./lmao.clif

Caused by:
    11: i32 is not a valid typevar for sqmul_round_sat
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 (Mar 03 2023 at 19:16):

afonso360 labeled issue #5923:

:wave: Hey,

This is probably a docs issue.

The docs for this instruction state that it is "Polymorphic over all integer types (scalar and vector) with 16- or 32-bit numbers.".

But it isn't, and trying to compile it with either i32 / i16 causes a verifier error.

Do we want to enable this instruction for scalars? Or should we update the docs so that they are SIMD only?

.clif Test Case

test run
target x86_64
target aarch64
target s390x

function %a() -> i32 system_v {
block0:
    v0 = iconst.i32 0
    v1 = sqmul_round_sat v0, v0
    return v1
}

; run: %a() == 0

Steps to Reproduce

Expected Results

The test to pass.

Actual Results

 ERROR cranelift_filetests::concurrent > FAIL: failed to parse ./lmao.clif
FAIL ./lmao.clif: failed to parse ./lmao.clif

Caused by:
    11: i32 is not a valid typevar for sqmul_round_sat
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 (Mar 03 2023 at 19:16):

afonso360 labeled issue #5923:

:wave: Hey,

This is probably a docs issue.

The docs for this instruction state that it is "Polymorphic over all integer types (scalar and vector) with 16- or 32-bit numbers.".

But it isn't, and trying to compile it with either i32 / i16 causes a verifier error.

Do we want to enable this instruction for scalars? Or should we update the docs so that they are SIMD only?

.clif Test Case

test run
target x86_64
target aarch64
target s390x

function %a() -> i32 system_v {
block0:
    v0 = iconst.i32 0
    v1 = sqmul_round_sat v0, v0
    return v1
}

; run: %a() == 0

Steps to Reproduce

Expected Results

The test to pass.

Actual Results

 ERROR cranelift_filetests::concurrent > FAIL: failed to parse ./lmao.clif
FAIL ./lmao.clif: failed to parse ./lmao.clif

Caused by:
    11: i32 is not a valid typevar for sqmul_round_sat
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 (Mar 06 2023 at 16:58):

abrown commented on issue #5923:

I think the conservative thing to do is to restrict this to SIMD types since this is a lowering for i16x8.q15mulr_sat_s (originally added in https://github.com/bytecodealliance/wasmtime/pull/3035).

view this post on Zulip Wasmtime GitHub notifications bot (Mar 06 2023 at 19:03):

afonso360 closed issue #5923:

:wave: Hey,

This is probably a docs issue.

The docs for this instruction state that it is "Polymorphic over all integer types (scalar and vector) with 16- or 32-bit numbers.".

But it isn't, and trying to compile it with either i32 / i16 causes a verifier error.

Do we want to enable this instruction for scalars? Or should we update the docs so that they are SIMD only?

.clif Test Case

test run
target x86_64
target aarch64
target s390x

function %a() -> i32 system_v {
block0:
    v0 = iconst.i32 0
    v1 = sqmul_round_sat v0, v0
    return v1
}

; run: %a() == 0

Steps to Reproduce

Expected Results

The test to pass.

Actual Results

 ERROR cranelift_filetests::concurrent > FAIL: failed to parse ./lmao.clif
FAIL ./lmao.clif: failed to parse ./lmao.clif

Caused by:
    11: i32 is not a valid typevar for sqmul_round_sat
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