Stream: git-wasmtime

Topic: wasmtime / issue #5979 Cranelift: `fcvt_to_uint.i16` fail...


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

afonso360 opened issue #5979:

:wave: Hey,

I'm working on adding ISA extensions to the fuzzer (cc: #5816) and this popped out.

This compiles without has_vxrs_ext2, so perhaps we might just need to ensure has_mie2 on that particular lowering?

I'm also not 100% sure if this is a valid configuration of ISA flags, are these two independent or does vxrs_ext2 always imply mie2?

.clif Test Case

test compile
target s390x has_vxrs_ext2=true

function u1:0() system_v {
block0:
    v37 = f32const 0.0
    v21 = fcvt_to_uint.i16 v37  ; v37 = 0.0
    return
}

Steps to Reproduce

Expected Results

The test to pass.

Actual Results

thread 'worker #0' panicked at 'Cannot emit inst 'FpuRound { op: ToUInt32, mode: ToZero, rd: Writable { reg: v133 }, rn: v130 }' for target; failed to match ISA requirements: MIE2', cranelift/codegen/src/isa/s390x/inst/emit.rs:1436:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 ERROR cranelift_filetests::concurrent > FAIL: panicked in worker #0: Cannot emit inst 'FpuRound { op: ToUInt32, mode: ToZero, rd: Writable { reg: v133 }, rn: v130 }' for target; failed to match ISA requirements: MIE2
FAIL ./lmao.clif: panicked in worker #0: Cannot emit inst 'FpuRound { op: ToUInt32, mode: ToZero, rd: Writable { reg: v133 }, rn: v130 }' for target; failed to match ISA requirements: MIE2
1 tests
Error: 1 failure

Versions and Environment

Cranelift version or commit: main

Operating system: Linux

Architecture: s390x

cc: @uweigand

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

afonso360 labeled issue #5979:

:wave: Hey,

I'm working on adding ISA extensions to the fuzzer (cc: #5816) and this popped out.

This compiles without has_vxrs_ext2, so perhaps we might just need to ensure has_mie2 on that particular lowering?

I'm also not 100% sure if this is a valid configuration of ISA flags, are these two independent or does vxrs_ext2 always imply mie2?

.clif Test Case

test compile
target s390x has_vxrs_ext2=true

function u1:0() system_v {
block0:
    v37 = f32const 0.0
    v21 = fcvt_to_uint.i16 v37  ; v37 = 0.0
    return
}

Steps to Reproduce

Expected Results

The test to pass.

Actual Results

thread 'worker #0' panicked at 'Cannot emit inst 'FpuRound { op: ToUInt32, mode: ToZero, rd: Writable { reg: v133 }, rn: v130 }' for target; failed to match ISA requirements: MIE2', cranelift/codegen/src/isa/s390x/inst/emit.rs:1436:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 ERROR cranelift_filetests::concurrent > FAIL: panicked in worker #0: Cannot emit inst 'FpuRound { op: ToUInt32, mode: ToZero, rd: Writable { reg: v133 }, rn: v130 }' for target; failed to match ISA requirements: MIE2
FAIL ./lmao.clif: panicked in worker #0: Cannot emit inst 'FpuRound { op: ToUInt32, mode: ToZero, rd: Writable { reg: v133 }, rn: v130 }' for target; failed to match ISA requirements: MIE2
1 tests
Error: 1 failure

Versions and Environment

Cranelift version or commit: main

Operating system: Linux

Architecture: s390x

cc: @uweigand

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

afonso360 labeled issue #5979:

:wave: Hey,

I'm working on adding ISA extensions to the fuzzer (cc: #5816) and this popped out.

This compiles without has_vxrs_ext2, so perhaps we might just need to ensure has_mie2 on that particular lowering?

I'm also not 100% sure if this is a valid configuration of ISA flags, are these two independent or does vxrs_ext2 always imply mie2?

.clif Test Case

test compile
target s390x has_vxrs_ext2=true

function u1:0() system_v {
block0:
    v37 = f32const 0.0
    v21 = fcvt_to_uint.i16 v37  ; v37 = 0.0
    return
}

Steps to Reproduce

Expected Results

The test to pass.

Actual Results

thread 'worker #0' panicked at 'Cannot emit inst 'FpuRound { op: ToUInt32, mode: ToZero, rd: Writable { reg: v133 }, rn: v130 }' for target; failed to match ISA requirements: MIE2', cranelift/codegen/src/isa/s390x/inst/emit.rs:1436:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 ERROR cranelift_filetests::concurrent > FAIL: panicked in worker #0: Cannot emit inst 'FpuRound { op: ToUInt32, mode: ToZero, rd: Writable { reg: v133 }, rn: v130 }' for target; failed to match ISA requirements: MIE2
FAIL ./lmao.clif: panicked in worker #0: Cannot emit inst 'FpuRound { op: ToUInt32, mode: ToZero, rd: Writable { reg: v133 }, rn: v130 }' for target; failed to match ISA requirements: MIE2
1 tests
Error: 1 failure

Versions and Environment

Cranelift version or commit: main

Operating system: Linux

Architecture: s390x

cc: @uweigand

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

afonso360 labeled issue #5979:

:wave: Hey,

I'm working on adding ISA extensions to the fuzzer (cc: #5816) and this popped out.

This compiles without has_vxrs_ext2, so perhaps we might just need to ensure has_mie2 on that particular lowering?

I'm also not 100% sure if this is a valid configuration of ISA flags, are these two independent or does vxrs_ext2 always imply mie2?

.clif Test Case

test compile
target s390x has_vxrs_ext2=true

function u1:0() system_v {
block0:
    v37 = f32const 0.0
    v21 = fcvt_to_uint.i16 v37  ; v37 = 0.0
    return
}

Steps to Reproduce

Expected Results

The test to pass.

Actual Results

thread 'worker #0' panicked at 'Cannot emit inst 'FpuRound { op: ToUInt32, mode: ToZero, rd: Writable { reg: v133 }, rn: v130 }' for target; failed to match ISA requirements: MIE2', cranelift/codegen/src/isa/s390x/inst/emit.rs:1436:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 ERROR cranelift_filetests::concurrent > FAIL: panicked in worker #0: Cannot emit inst 'FpuRound { op: ToUInt32, mode: ToZero, rd: Writable { reg: v133 }, rn: v130 }' for target; failed to match ISA requirements: MIE2
FAIL ./lmao.clif: panicked in worker #0: Cannot emit inst 'FpuRound { op: ToUInt32, mode: ToZero, rd: Writable { reg: v133 }, rn: v130 }' for target; failed to match ISA requirements: MIE2
1 tests
Error: 1 failure

Versions and Environment

Cranelift version or commit: main

Operating system: Linux

Architecture: s390x

cc: @uweigand

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

uweigand commented on issue #5979:

These instructions are part of VXRS_EXT2, it seems the sanity check in inst/mod.rs is just wrong here. I'll post a fix.

Generally speaking, VXRS_EXT2 and MIE2 are specified as two separate optional facilities in the ISA docs, so in theory it would be possible to build a s390x processor that supports just one of them. However, all s390x processors that actually exist support either both of them or none of them - that's probably why this error wasn't noticed previously.

As an aside, while looking at the ISA docs to verify, I noticed that MIE2 is actually a misnomer - these instruction are part of the "Miscellaneous-Instruction-Extension Facility 3", not 2, so this probably should be renamed to MIE3 everywhere. I'll submit a separate PR for that as well.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 10 2023 at 20:21):

cfallin closed issue #5979:

:wave: Hey,

I'm working on adding ISA extensions to the fuzzer (cc: #5816) and this popped out.

This compiles without has_vxrs_ext2, so perhaps we might just need to ensure has_mie2 on that particular lowering?

I'm also not 100% sure if this is a valid configuration of ISA flags, are these two independent or does vxrs_ext2 always imply mie2?

.clif Test Case

test compile
target s390x has_vxrs_ext2=true

function u1:0() system_v {
block0:
    v37 = f32const 0.0
    v21 = fcvt_to_uint.i16 v37  ; v37 = 0.0
    return
}

Steps to Reproduce

Expected Results

The test to pass.

Actual Results

thread 'worker #0' panicked at 'Cannot emit inst 'FpuRound { op: ToUInt32, mode: ToZero, rd: Writable { reg: v133 }, rn: v130 }' for target; failed to match ISA requirements: MIE2', cranelift/codegen/src/isa/s390x/inst/emit.rs:1436:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 ERROR cranelift_filetests::concurrent > FAIL: panicked in worker #0: Cannot emit inst 'FpuRound { op: ToUInt32, mode: ToZero, rd: Writable { reg: v133 }, rn: v130 }' for target; failed to match ISA requirements: MIE2
FAIL ./lmao.clif: panicked in worker #0: Cannot emit inst 'FpuRound { op: ToUInt32, mode: ToZero, rd: Writable { reg: v133 }, rn: v130 }' for target; failed to match ISA requirements: MIE2
1 tests
Error: 1 failure

Versions and Environment

Cranelift version or commit: main

Operating system: Linux

Architecture: s390x

cc: @uweigand


Last updated: Oct 23 2024 at 20:03 UTC