Stream: git-wasmtime

Topic: wasmtime / issue #5528 Cranelift: Wrong result for `fcvt_...


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

afonso360 labeled issue #5528:

:wave: Hey,

.clif Test Case

test interpret
test run
target riscv64

function %a(f32) -> i16 system_v {
block0(v0: f32):
    v1 = fcvt_to_sint_sat.i16 v0
    return  v1
}

; run: %a(-0x1.000006p125) == -32768

Steps to Reproduce

Expected Results

The test to pass.

Actual Results

 ERROR cranelift_filetests::concurrent > FAIL: run
FAIL ./lmao.clif: run

Caused by:
    Failed test: run: %a(-0x1.000006p125) == -32768, actual: 0
1 tests
Error: 1 failure

Versions and Environment

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

Extra Info

Disassembly:

   0:   53 25 a5 a0             feq.s   a0, fa0, fa0
   4:   63 06 05 00             beqz    a0, 0xc
   8:   53 15 25 c0             fcvt.l.s        a0, fa0, rtz
   c:   6f 00 80 00             j       8
  10:   13 05 00 00             mv      a0, zero
  14:   67 80 00 00             ret

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

afonso360 opened issue #5528:

:wave: Hey,

.clif Test Case

test interpret
test run
target riscv64

function %a(f32) -> i16 system_v {
block0(v0: f32):
    v1 = fcvt_to_sint_sat.i16 v0
    return  v1
}

; run: %a(-0x1.000006p125) == -32768

Steps to Reproduce

Expected Results

The test to pass.

Actual Results

 ERROR cranelift_filetests::concurrent > FAIL: run
FAIL ./lmao.clif: run

Caused by:
    Failed test: run: %a(-0x1.000006p125) == -32768, actual: 0
1 tests
Error: 1 failure

Versions and Environment

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

Extra Info

Disassembly:

   0:   53 25 a5 a0             feq.s   a0, fa0, fa0
   4:   63 06 05 00             beqz    a0, 0xc
   8:   53 15 25 c0             fcvt.l.s        a0, fa0, rtz
   c:   6f 00 80 00             j       8
  10:   13 05 00 00             mv      a0, zero
  14:   67 80 00 00             ret

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

afonso360 labeled issue #5528:

:wave: Hey,

.clif Test Case

test interpret
test run
target riscv64

function %a(f32) -> i16 system_v {
block0(v0: f32):
    v1 = fcvt_to_sint_sat.i16 v0
    return  v1
}

; run: %a(-0x1.000006p125) == -32768

Steps to Reproduce

Expected Results

The test to pass.

Actual Results

 ERROR cranelift_filetests::concurrent > FAIL: run
FAIL ./lmao.clif: run

Caused by:
    Failed test: run: %a(-0x1.000006p125) == -32768, actual: 0
1 tests
Error: 1 failure

Versions and Environment

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

Extra Info

Disassembly:

   0:   53 25 a5 a0             feq.s   a0, fa0, fa0
   4:   63 06 05 00             beqz    a0, 0xc
   8:   53 15 25 c0             fcvt.l.s        a0, fa0, rtz
   c:   6f 00 80 00             j       8
  10:   13 05 00 00             mv      a0, zero
  14:   67 80 00 00             ret

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

fitzgen commented on issue #5528:

cc @yuyang-ok

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

elliottt labeled issue #5528:

:wave: Hey,

.clif Test Case

test interpret
test run
target riscv64

function %a(f32) -> i16 system_v {
block0(v0: f32):
    v1 = fcvt_to_sint_sat.i16 v0
    return  v1
}

; run: %a(-0x1.000006p125) == -32768

Steps to Reproduce

Expected Results

The test to pass.

Actual Results

 ERROR cranelift_filetests::concurrent > FAIL: run
FAIL ./lmao.clif: run

Caused by:
    Failed test: run: %a(-0x1.000006p125) == -32768, actual: 0
1 tests
Error: 1 failure

Versions and Environment

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

Extra Info

Disassembly:

   0:   53 25 a5 a0             feq.s   a0, fa0, fa0
   4:   63 06 05 00             beqz    a0, 0xc
   8:   53 15 25 c0             fcvt.l.s        a0, fa0, rtz
   c:   6f 00 80 00             j       8
  10:   13 05 00 00             mv      a0, zero
  14:   67 80 00 00             ret

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

yuyang-ok commented on issue #5528:

@fitzgen I am on this.

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

yuyang-ok commented on issue #5528:

@fitzgen I think this is fixed.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 31 2023 at 17:13):

fitzgen commented on issue #5528:

Great! Thanks @yuyang-ok!

view this post on Zulip Wasmtime GitHub notifications bot (Jan 31 2023 at 17:13):

fitzgen closed issue #5528:

:wave: Hey,

.clif Test Case

test interpret
test run
target riscv64

function %a(f32) -> i16 system_v {
block0(v0: f32):
    v1 = fcvt_to_sint_sat.i16 v0
    return  v1
}

; run: %a(-0x1.000006p125) == -32768

Steps to Reproduce

Expected Results

The test to pass.

Actual Results

 ERROR cranelift_filetests::concurrent > FAIL: run
FAIL ./lmao.clif: run

Caused by:
    Failed test: run: %a(-0x1.000006p125) == -32768, actual: 0
1 tests
Error: 1 failure

Versions and Environment

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

Extra Info

Disassembly:

   0:   53 25 a5 a0             feq.s   a0, fa0, fa0
   4:   63 06 05 00             beqz    a0, 0xc
   8:   53 15 25 c0             fcvt.l.s        a0, fa0, rtz
   c:   6f 00 80 00             j       8
  10:   13 05 00 00             mv      a0, zero
  14:   67 80 00 00             ret


Last updated: Dec 23 2024 at 12:05 UTC