Stream: git-wasmtime

Topic: wasmtime / issue #5531 Cranelift: Compile failure with ar...


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

afonso360 labeled issue #5531:

:wave: Hey,

It looks like both riscv64 and s390x fail to compile a call to a function with a sext or uext argument extension on a floating point argument.

I don't even know what those are supposed to do for floating point arguments, but they work on x86_64 and AArch64.

.clif Test Case

test compile
target riscv64
target s390x

function %f4(f32) -> f32 {
    fn0 = %g(f32 sext) -> f32

block0(v0: f32):
    v1 = call fn0(v0)
    return v1
}

Steps to Reproduce

Expected Results

The test to compile

Actual Results

thread 'worker #1' panicked at 'assertion failed: `(left == right)`
  left: `Int`,
 right: `Float`', cranelift/codegen/src/machinst/abi.rs:2223:33
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 ERROR cranelift_filetests::concurrent > FAIL: panicked in worker #1: assertion failed: `(left == right)`
  left: `Int`,
 right: `Float`
FAIL ./lmao.clif: panicked in worker #1: assertion failed: `(left == right)`
  left: `Int`,
 right: `Float`
1 tests
Error: 1 failure

Versions and Environment

Cranelift version or commit: main
Operating system: Linux
Architecture: riscv64

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

afonso360 labeled issue #5531:

:wave: Hey,

It looks like both riscv64 and s390x fail to compile a call to a function with a sext or uext argument extension on a floating point argument.

I don't even know what those are supposed to do for floating point arguments, but they work on x86_64 and AArch64.

.clif Test Case

test compile
target riscv64
target s390x

function %f4(f32) -> f32 {
    fn0 = %g(f32 sext) -> f32

block0(v0: f32):
    v1 = call fn0(v0)
    return v1
}

Steps to Reproduce

Expected Results

The test to compile

Actual Results

thread 'worker #1' panicked at 'assertion failed: `(left == right)`
  left: `Int`,
 right: `Float`', cranelift/codegen/src/machinst/abi.rs:2223:33
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 ERROR cranelift_filetests::concurrent > FAIL: panicked in worker #1: assertion failed: `(left == right)`
  left: `Int`,
 right: `Float`
FAIL ./lmao.clif: panicked in worker #1: assertion failed: `(left == right)`
  left: `Int`,
 right: `Float`
1 tests
Error: 1 failure

Versions and Environment

Cranelift version or commit: main
Operating system: Linux
Architecture: riscv64

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

afonso360 opened issue #5531:

:wave: Hey,

It looks like both riscv64 and s390x fail to compile a call to a function with a sext or uext argument extension on a floating point argument.

I don't even know what those are supposed to do for floating point arguments, but they work on x86_64 and AArch64.

.clif Test Case

test compile
target riscv64
target s390x

function %f4(f32) -> f32 {
    fn0 = %g(f32 sext) -> f32

block0(v0: f32):
    v1 = call fn0(v0)
    return v1
}

Steps to Reproduce

Expected Results

The test to compile

Actual Results

thread 'worker #1' panicked at 'assertion failed: `(left == right)`
  left: `Int`,
 right: `Float`', cranelift/codegen/src/machinst/abi.rs:2223:33
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 ERROR cranelift_filetests::concurrent > FAIL: panicked in worker #1: assertion failed: `(left == right)`
  left: `Int`,
 right: `Float`
FAIL ./lmao.clif: panicked in worker #1: assertion failed: `(left == right)`
  left: `Int`,
 right: `Float`
1 tests
Error: 1 failure

Versions and Environment

Cranelift version or commit: main
Operating system: Linux
Architecture: riscv64

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

bjorn3 commented on issue #5531:

I don't think this should be allowed. LLVM doesn't allow it either. It gives Attribute 'signext' applied to incompatible type! as error. Maybe add a verifier check?

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

afonso360 commented on issue #5531:

Yeah, that sounds like the way to go. I'll put up a PR soon

view this post on Zulip Wasmtime GitHub notifications bot (Jan 06 2023 at 18:38):

elliottt labeled issue #5531:

:wave: Hey,

It looks like both riscv64 and s390x fail to compile a call to a function with a sext or uext argument extension on a floating point argument.

I don't even know what those are supposed to do for floating point arguments, but they work on x86_64 and AArch64.

.clif Test Case

test compile
target riscv64
target s390x

function %f4(f32) -> f32 {
    fn0 = %g(f32 sext) -> f32

block0(v0: f32):
    v1 = call fn0(v0)
    return v1
}

Steps to Reproduce

Expected Results

The test to compile

Actual Results

thread 'worker #1' panicked at 'assertion failed: `(left == right)`
  left: `Int`,
 right: `Float`', cranelift/codegen/src/machinst/abi.rs:2223:33
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 ERROR cranelift_filetests::concurrent > FAIL: panicked in worker #1: assertion failed: `(left == right)`
  left: `Int`,
 right: `Float`
FAIL ./lmao.clif: panicked in worker #1: assertion failed: `(left == right)`
  left: `Int`,
 right: `Float`
1 tests
Error: 1 failure

Versions and Environment

Cranelift version or commit: main
Operating system: Linux
Architecture: riscv64

view this post on Zulip Wasmtime GitHub notifications bot (Jan 10 2023 at 18:26):

fitzgen closed issue #5531:

:wave: Hey,

It looks like both riscv64 and s390x fail to compile a call to a function with a sext or uext argument extension on a floating point argument.

I don't even know what those are supposed to do for floating point arguments, but they work on x86_64 and AArch64.

.clif Test Case

test compile
target riscv64
target s390x

function %f4(f32) -> f32 {
    fn0 = %g(f32 sext) -> f32

block0(v0: f32):
    v1 = call fn0(v0)
    return v1
}

Steps to Reproduce

Expected Results

The test to compile

Actual Results

thread 'worker #1' panicked at 'assertion failed: `(left == right)`
  left: `Int`,
 right: `Float`', cranelift/codegen/src/machinst/abi.rs:2223:33
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 ERROR cranelift_filetests::concurrent > FAIL: panicked in worker #1: assertion failed: `(left == right)`
  left: `Int`,
 right: `Float`
FAIL ./lmao.clif: panicked in worker #1: assertion failed: `(left == right)`
  left: `Int`,
 right: `Float`
1 tests
Error: 1 failure

Versions and Environment

Cranelift version or commit: main
Operating system: Linux
Architecture: riscv64


Last updated: Nov 22 2024 at 17:03 UTC