Stream: git-wasmtime

Topic: wasmtime / issue #5497 Cranelift: `smin.i128` wrong resul...


view this post on Zulip Wasmtime GitHub notifications bot (Dec 29 2022 at 01:14):

afonso360 labeled issue #5497:

:wave: Hey,

smin here returns the wrong result, but removing the v0 argument makes the test pass.

.clif Test Case

This fails:

test interpret
test run
target riscv64

function %a(i16, i128) -> i128 system_v {
block0(v0: i16, v1: i128):
    v2 = smin v1, v1
    return v2
}

; run: %a(0, 1) == 1

This passes:

test interpret
test run
target riscv64

function %a(i128) -> i128 system_v {
block0(v1: i128):
    v2 = smin v1, v1
    return v2
}

; run: %a(1) == 1

Steps to Reproduce

Expected Results

Both tests to pass

Actual Results

     Running `qemu-riscv64 -L /usr/riscv64-linux-gnu -E LD_LIBRARY_PATH=/usr/riscv64-linux-gnu/lib /home/afonso/git/wasmtime/target/riscv64gc-unknown-linux-gnu/debug/clif-util test ./lmao.clif`
 ERROR cranelift_filetests::concurrent > FAIL: run
FAIL ./lmao.clif: run

Caused by:
    Failed test: run: %a(0, 1) == 1, actual: 18446744073709551617
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 (Dec 29 2022 at 01:14):

afonso360 opened issue #5497:

:wave: Hey,

smin here returns the wrong result, but removing the v0 argument makes the test pass.

.clif Test Case

This fails:

test interpret
test run
target riscv64

function %a(i16, i128) -> i128 system_v {
block0(v0: i16, v1: i128):
    v2 = smin v1, v1
    return v2
}

; run: %a(0, 1) == 1

This passes:

test interpret
test run
target riscv64

function %a(i128) -> i128 system_v {
block0(v1: i128):
    v2 = smin v1, v1
    return v2
}

; run: %a(1) == 1

Steps to Reproduce

Expected Results

Both tests to pass

Actual Results

     Running `qemu-riscv64 -L /usr/riscv64-linux-gnu -E LD_LIBRARY_PATH=/usr/riscv64-linux-gnu/lib /home/afonso/git/wasmtime/target/riscv64gc-unknown-linux-gnu/debug/clif-util test ./lmao.clif`
 ERROR cranelift_filetests::concurrent > FAIL: run
FAIL ./lmao.clif: run

Caused by:
    Failed test: run: %a(0, 1) == 1, actual: 18446744073709551617
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 (Dec 29 2022 at 01:14):

afonso360 labeled issue #5497:

:wave: Hey,

smin here returns the wrong result, but removing the v0 argument makes the test pass.

.clif Test Case

This fails:

test interpret
test run
target riscv64

function %a(i16, i128) -> i128 system_v {
block0(v0: i16, v1: i128):
    v2 = smin v1, v1
    return v2
}

; run: %a(0, 1) == 1

This passes:

test interpret
test run
target riscv64

function %a(i128) -> i128 system_v {
block0(v1: i128):
    v2 = smin v1, v1
    return v2
}

; run: %a(1) == 1

Steps to Reproduce

Expected Results

Both tests to pass

Actual Results

     Running `qemu-riscv64 -L /usr/riscv64-linux-gnu -E LD_LIBRARY_PATH=/usr/riscv64-linux-gnu/lib /home/afonso/git/wasmtime/target/riscv64gc-unknown-linux-gnu/debug/clif-util test ./lmao.clif`
 ERROR cranelift_filetests::concurrent > FAIL: run
FAIL ./lmao.clif: run

Caused by:
    Failed test: run: %a(0, 1) == 1, actual: 18446744073709551617
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 (Dec 29 2022 at 01:15):

afonso360 edited issue #5497:

:wave: Hey,

smin here returns the wrong result, but removing the v0 argument makes the test pass.

.clif Test Case

This fails:

test interpret
test run
target riscv64

function %a(i16, i128) -> i128 system_v {
block0(v0: i16, v1: i128):
    v2 = smin v1, v1
    return v2
}

; run: %a(0, 1) == 1

This passes:

test interpret
test run
target riscv64

function %a(i128) -> i128 system_v {
block0(v1: i128):
    v2 = smin v1, v1
    return v2
}

; run: %a(1) == 1

Steps to Reproduce

Expected Results

Both tests to pass

Actual Results

     Running `qemu-riscv64 -L /usr/riscv64-linux-gnu -E LD_LIBRARY_PATH=/usr/riscv64-linux-gnu/lib /home/afonso/git/wasmtime/target/riscv64gc-unknown-linux-gnu/debug/clif-util test ./lmao.clif`
 ERROR cranelift_filetests::concurrent > FAIL: run
FAIL ./lmao.clif: run

Caused by:
    Failed test: run: %a(0, 1) == 1, actual: 18446744073709551617
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 (Dec 29 2022 at 01:17):

afonso360 edited issue #5497:

:wave: Hey,

smin here returns the wrong result, but removing the v0 argument makes the test pass.

.clif Test Case

This fails:

test interpret
test run
target riscv64

function %a(i16, i128) -> i128 system_v {
block0(v0: i16, v1: i128):
    v2 = smin v1, v1
    return v2
}

; run: %a(0, 1) == 1

This passes:

test interpret
test run
target riscv64

function %a(i128) -> i128 system_v {
block0(v1: i128):
    v2 = smin v1, v1
    return v2
}

; run: %a(1) == 1

Steps to Reproduce

Expected Results

Both tests to pass

Actual Results

     Running `qemu-riscv64 -L /usr/riscv64-linux-gnu -E LD_LIBRARY_PATH=/usr/riscv64-linux-gnu/lib /home/afonso/git/wasmtime/target/riscv64gc-unknown-linux-gnu/debug/clif-util test ./lmao.clif`
 ERROR cranelift_filetests::concurrent > FAIL: run
FAIL ./lmao.clif: run

Caused by:
    Failed test: run: %a(0, 1) == 1, actual: 18446744073709551617
1 tests
Error: 1 failure

Versions and Environment

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

Additional Information

Disassembly:

Disassembly of 28 bytes:
   0:   63 46 c6 00             blt     a2, a2, 0xc
   4:   63 18 c6 00             bne     a2, a2, 0x10
   8:   63 f6 b5 00             bgeu    a1, a1, 0xc
   c:   13 e5 05 00             ori     a0, a1, 0
  10:   6f 00 80 00             j       8
  14:   13 e5 05 00             ori     a0, a1, 0
  18:   67 80 00 00             ret

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

elliottt labeled issue #5497:

:wave: Hey,

smin here returns the wrong result, but removing the v0 argument makes the test pass.

.clif Test Case

This fails:

test interpret
test run
target riscv64

function %a(i16, i128) -> i128 system_v {
block0(v0: i16, v1: i128):
    v2 = smin v1, v1
    return v2
}

; run: %a(0, 1) == 1

This passes:

test interpret
test run
target riscv64

function %a(i128) -> i128 system_v {
block0(v1: i128):
    v2 = smin v1, v1
    return v2
}

; run: %a(1) == 1

Steps to Reproduce

Expected Results

Both tests to pass

Actual Results

     Running `qemu-riscv64 -L /usr/riscv64-linux-gnu -E LD_LIBRARY_PATH=/usr/riscv64-linux-gnu/lib /home/afonso/git/wasmtime/target/riscv64gc-unknown-linux-gnu/debug/clif-util test ./lmao.clif`
 ERROR cranelift_filetests::concurrent > FAIL: run
FAIL ./lmao.clif: run

Caused by:
    Failed test: run: %a(0, 1) == 1, actual: 18446744073709551617
1 tests
Error: 1 failure

Versions and Environment

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

Additional Information

Disassembly:

Disassembly of 28 bytes:
   0:   63 46 c6 00             blt     a2, a2, 0xc
   4:   63 18 c6 00             bne     a2, a2, 0x10
   8:   63 f6 b5 00             bgeu    a1, a1, 0xc
   c:   13 e5 05 00             ori     a0, a1, 0
  10:   6f 00 80 00             j       8
  14:   13 e5 05 00             ori     a0, a1, 0
  18:   67 80 00 00             ret

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

yuyang-ok commented on issue #5497:

Sorry, I am getting covid-19 those days,I think I will try to fix this issue recently.

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

cfallin commented on issue #5497:

@yuyang-ok we hope you feel better soon; there's no rush or pressure on these issues!

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

yuyang-ok commented on issue #5497:

ok.

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

yuyang-ok edited a comment on issue #5497:

@cfallin ok.

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

cfallin closed issue #5497:

:wave: Hey,

smin here returns the wrong result, but removing the v0 argument makes the test pass.

.clif Test Case

This fails:

test interpret
test run
target riscv64

function %a(i16, i128) -> i128 system_v {
block0(v0: i16, v1: i128):
    v2 = smin v1, v1
    return v2
}

; run: %a(0, 1) == 1

This passes:

test interpret
test run
target riscv64

function %a(i128) -> i128 system_v {
block0(v1: i128):
    v2 = smin v1, v1
    return v2
}

; run: %a(1) == 1

Steps to Reproduce

Expected Results

Both tests to pass

Actual Results

     Running `qemu-riscv64 -L /usr/riscv64-linux-gnu -E LD_LIBRARY_PATH=/usr/riscv64-linux-gnu/lib /home/afonso/git/wasmtime/target/riscv64gc-unknown-linux-gnu/debug/clif-util test ./lmao.clif`
 ERROR cranelift_filetests::concurrent > FAIL: run
FAIL ./lmao.clif: run

Caused by:
    Failed test: run: %a(0, 1) == 1, actual: 18446744073709551617
1 tests
Error: 1 failure

Versions and Environment

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

Additional Information

Disassembly:

Disassembly of 28 bytes:
   0:   63 46 c6 00             blt     a2, a2, 0xc
   4:   63 18 c6 00             bne     a2, a2, 0x10
   8:   63 f6 b5 00             bgeu    a1, a1, 0xc
   c:   13 e5 05 00             ori     a0, a1, 0
  10:   6f 00 80 00             j       8
  14:   13 e5 05 00             ori     a0, a1, 0
  18:   67 80 00 00             ret

Last updated: Dec 23 2024 at 12:05 UTC