Stream: git-wasmtime

Topic: wasmtime / issue #5090 Cranelift: s390x fails the filetes...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2022 at 14:31):

afonso360 labeled issue #5090:

:wave: Hey,

I tried running our filetest suite with the regalloc_checker flag enabled. Some errors turned up on s390x, this is one of them. See below for the entire list of tests that fail.

.clif Test Case

This is the same testcase that is available in ./filetests/filetests/runtests/simd-sshr.clif but with regalloc_checker

test run
set enable_simd
set regalloc_checker
target s390x

function %sshr_i16x8(i16x8, i32) -> i16x8 {
block0(v0: i16x8, v1: i32):
    v2 = sshr v0, v1
    return v2
}
; note: because of the shifted-in sign-bit, lane 0 remains -1 == 0xffff, whereas lane 4 has been shifted to -8 == 0xfff8
; run: %sshr_i16x8([-1 2 4 8 -16 32 64 128], 1) == [-1 1 2 4 -8 16 32 64]
; run: %sshr_i16x8([-1 2 4 8 -16 32 64 128], 17) == [-1 1 2 4 -8 16 32 64]

Steps to Reproduce

Expected Results

The test to pass

Actual Results

afonso@DESKTOP-VSTS4BC:~/git/wasmtime/cranelift$ cargo run  --target s390x-unknown-linux-gnu -- test ./lmao.clif
    Finished dev [unoptimized + debuginfo] target(s) in 0.16s
     Running `qemu-s390x -L /usr/s390x-linux-gnu -E LD_LIBRARY_PATH=/usr/s390x-linux-gnu/lib /home/afonso/git/wasmtime/target/s390x-unknown-linux-gnu/debug/clif-util test ./lmao.clif`
 ERROR cranelift_codegen::machinst::compile > Register allocation checker errors:
CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
for vcode:
VCode {
  Entry block: 0
  v130 := v145
  v131 := v139
  v132 := v138
Block 0:
    (original IR block: block0)
    (instruction range: 0 .. 20)
  Inst 0: args %v128=%r2 %v129=%r3
  Inst 1: lrvg %v140, 0(%v129)
  Inst 2: lrvg %v141, 8(%v129)
  Inst 3: vlvgp %v142, %v141, %v140
  Inst 4: vpdi %v143, %v142, %v142, 4
  Inst 5: verllg %v144, %v143, 32
  Inst 6: verllf %v145, %v144, 16
  Inst 7: l %v139, 16(%v129)
  Inst 8: vlr %v24, %v130
  Inst 9: lr %r2, %v131
  Inst 10: basr %r14, %v128
  Inst 11: vlr %v138, %v24
  Inst 12: vpdi %v133, %v132, %v132, 4
  Inst 13: verllg %v134, %v133, 32
  Inst 14: verllf %v135, %v134, 16
  Inst 15: vlgvg %v136, %v135, 1
  Inst 16: vlgvg %v137, %v135, 0
  Inst 17: strvg %v136, 0(%v129)
  Inst 18: strvg %v137, 8(%v129)
  Inst 19: br %r14
}

thread 'worker #0' panicked at 'register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }', cranelift/codegen/src/machinst/compile.rs:70:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 ERROR cranelift_filetests::concurrent      > FAIL: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
FAIL ./lmao.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
1 tests
Error: 1 failure

Versions and Environment

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

Extra Info

<details>
<summary>I ran the entire filetest suite and the following files have errors on them, but I'm not sure how many duplicates there are:</summary>

FAIL filetests/filetests/runtests/simd-wideningpairwisedotproducts.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(19), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(20), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-sqmulroundsat-aarch64.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(17), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-sshr.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-unarrow.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(19), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/conversions-load-store.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(14), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-uwidenhigh.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(9), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-swidenhigh.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(9), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-scalartovector.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(7), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-ishl.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-splat.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(9), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-arithmetic.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(17), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-bitselect-to-vselect.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(17), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-snarrow.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(19), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-saddsat.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(20), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(21), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-insertlane.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-iaddpairwise.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(20), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(21), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-uwidenlow.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(9), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-min-max.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(20), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(21), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-bitselect.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(23), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(24), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-vselect.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(6), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(7), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-uunarrow.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(19), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-scalartovector-aarch64.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { ins
[message truncated]

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2022 at 14:31):

afonso360 opened issue #5090:

:wave: Hey,

I tried running our filetest suite with the regalloc_checker flag enabled. Some errors turned up on s390x, this is one of them. See below for the entire list of tests that fail.

.clif Test Case

This is the same testcase that is available in ./filetests/filetests/runtests/simd-sshr.clif but with regalloc_checker

test run
set enable_simd
set regalloc_checker
target s390x

function %sshr_i16x8(i16x8, i32) -> i16x8 {
block0(v0: i16x8, v1: i32):
    v2 = sshr v0, v1
    return v2
}
; note: because of the shifted-in sign-bit, lane 0 remains -1 == 0xffff, whereas lane 4 has been shifted to -8 == 0xfff8
; run: %sshr_i16x8([-1 2 4 8 -16 32 64 128], 1) == [-1 1 2 4 -8 16 32 64]
; run: %sshr_i16x8([-1 2 4 8 -16 32 64 128], 17) == [-1 1 2 4 -8 16 32 64]

Steps to Reproduce

Expected Results

The test to pass

Actual Results

afonso@DESKTOP-VSTS4BC:~/git/wasmtime/cranelift$ cargo run  --target s390x-unknown-linux-gnu -- test ./lmao.clif
    Finished dev [unoptimized + debuginfo] target(s) in 0.16s
     Running `qemu-s390x -L /usr/s390x-linux-gnu -E LD_LIBRARY_PATH=/usr/s390x-linux-gnu/lib /home/afonso/git/wasmtime/target/s390x-unknown-linux-gnu/debug/clif-util test ./lmao.clif`
 ERROR cranelift_codegen::machinst::compile > Register allocation checker errors:
CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
for vcode:
VCode {
  Entry block: 0
  v130 := v145
  v131 := v139
  v132 := v138
Block 0:
    (original IR block: block0)
    (instruction range: 0 .. 20)
  Inst 0: args %v128=%r2 %v129=%r3
  Inst 1: lrvg %v140, 0(%v129)
  Inst 2: lrvg %v141, 8(%v129)
  Inst 3: vlvgp %v142, %v141, %v140
  Inst 4: vpdi %v143, %v142, %v142, 4
  Inst 5: verllg %v144, %v143, 32
  Inst 6: verllf %v145, %v144, 16
  Inst 7: l %v139, 16(%v129)
  Inst 8: vlr %v24, %v130
  Inst 9: lr %r2, %v131
  Inst 10: basr %r14, %v128
  Inst 11: vlr %v138, %v24
  Inst 12: vpdi %v133, %v132, %v132, 4
  Inst 13: verllg %v134, %v133, 32
  Inst 14: verllf %v135, %v134, 16
  Inst 15: vlgvg %v136, %v135, 1
  Inst 16: vlgvg %v137, %v135, 0
  Inst 17: strvg %v136, 0(%v129)
  Inst 18: strvg %v137, 8(%v129)
  Inst 19: br %r14
}

thread 'worker #0' panicked at 'register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }', cranelift/codegen/src/machinst/compile.rs:70:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 ERROR cranelift_filetests::concurrent      > FAIL: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
FAIL ./lmao.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
1 tests
Error: 1 failure

Versions and Environment

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

Extra Info

<details>
<summary>I ran the entire filetest suite and the following files have errors on them, but I'm not sure how many duplicates there are:</summary>

FAIL filetests/filetests/runtests/simd-wideningpairwisedotproducts.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(19), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(20), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-sqmulroundsat-aarch64.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(17), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-sshr.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-unarrow.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(19), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/conversions-load-store.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(14), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-uwidenhigh.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(9), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-swidenhigh.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(9), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-scalartovector.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(7), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-ishl.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-splat.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(9), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-arithmetic.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(17), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-bitselect-to-vselect.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(17), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-snarrow.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(19), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-saddsat.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(20), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(21), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-insertlane.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-iaddpairwise.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(20), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(21), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-uwidenlow.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(9), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-min-max.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(20), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(21), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-bitselect.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(23), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(24), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-vselect.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(6), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(7), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-uunarrow.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(19), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-scalartovector-aarch64.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst
[message truncated]

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2022 at 14:31):

afonso360 labeled issue #5090:

:wave: Hey,

I tried running our filetest suite with the regalloc_checker flag enabled. Some errors turned up on s390x, this is one of them. See below for the entire list of tests that fail.

.clif Test Case

This is the same testcase that is available in ./filetests/filetests/runtests/simd-sshr.clif but with regalloc_checker

test run
set enable_simd
set regalloc_checker
target s390x

function %sshr_i16x8(i16x8, i32) -> i16x8 {
block0(v0: i16x8, v1: i32):
    v2 = sshr v0, v1
    return v2
}
; note: because of the shifted-in sign-bit, lane 0 remains -1 == 0xffff, whereas lane 4 has been shifted to -8 == 0xfff8
; run: %sshr_i16x8([-1 2 4 8 -16 32 64 128], 1) == [-1 1 2 4 -8 16 32 64]
; run: %sshr_i16x8([-1 2 4 8 -16 32 64 128], 17) == [-1 1 2 4 -8 16 32 64]

Steps to Reproduce

Expected Results

The test to pass

Actual Results

afonso@DESKTOP-VSTS4BC:~/git/wasmtime/cranelift$ cargo run  --target s390x-unknown-linux-gnu -- test ./lmao.clif
    Finished dev [unoptimized + debuginfo] target(s) in 0.16s
     Running `qemu-s390x -L /usr/s390x-linux-gnu -E LD_LIBRARY_PATH=/usr/s390x-linux-gnu/lib /home/afonso/git/wasmtime/target/s390x-unknown-linux-gnu/debug/clif-util test ./lmao.clif`
 ERROR cranelift_codegen::machinst::compile > Register allocation checker errors:
CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
for vcode:
VCode {
  Entry block: 0
  v130 := v145
  v131 := v139
  v132 := v138
Block 0:
    (original IR block: block0)
    (instruction range: 0 .. 20)
  Inst 0: args %v128=%r2 %v129=%r3
  Inst 1: lrvg %v140, 0(%v129)
  Inst 2: lrvg %v141, 8(%v129)
  Inst 3: vlvgp %v142, %v141, %v140
  Inst 4: vpdi %v143, %v142, %v142, 4
  Inst 5: verllg %v144, %v143, 32
  Inst 6: verllf %v145, %v144, 16
  Inst 7: l %v139, 16(%v129)
  Inst 8: vlr %v24, %v130
  Inst 9: lr %r2, %v131
  Inst 10: basr %r14, %v128
  Inst 11: vlr %v138, %v24
  Inst 12: vpdi %v133, %v132, %v132, 4
  Inst 13: verllg %v134, %v133, 32
  Inst 14: verllf %v135, %v134, 16
  Inst 15: vlgvg %v136, %v135, 1
  Inst 16: vlgvg %v137, %v135, 0
  Inst 17: strvg %v136, 0(%v129)
  Inst 18: strvg %v137, 8(%v129)
  Inst 19: br %r14
}

thread 'worker #0' panicked at 'register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }', cranelift/codegen/src/machinst/compile.rs:70:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 ERROR cranelift_filetests::concurrent      > FAIL: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
FAIL ./lmao.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
1 tests
Error: 1 failure

Versions and Environment

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

Extra Info

<details>
<summary>I ran the entire filetest suite and the following files have errors on them, but I'm not sure how many duplicates there are:</summary>

FAIL filetests/filetests/runtests/simd-wideningpairwisedotproducts.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(19), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(20), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-sqmulroundsat-aarch64.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(17), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-sshr.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-unarrow.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(19), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/conversions-load-store.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(14), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-uwidenhigh.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(9), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-swidenhigh.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(9), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-scalartovector.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(7), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-ishl.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-splat.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(9), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-arithmetic.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(17), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-bitselect-to-vselect.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(17), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-snarrow.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(19), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-saddsat.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(20), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(21), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-insertlane.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-iaddpairwise.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(20), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(21), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-uwidenlow.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(9), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-min-max.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(20), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(21), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-bitselect.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(23), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(24), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-vselect.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(6), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(7), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-uunarrow.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(19), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-scalartovector-aarch64.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { ins
[message truncated]

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2022 at 14:37):

afonso360 edited issue #5090:

:wave: Hey,

I tried running our filetest suite with the regalloc_checker flag enabled. Some errors turned up on s390x, this is one of them. See below for the entire list of tests that fail.

.clif Test Case

This is the same testcase that is available in ./filetests/filetests/runtests/simd-sshr.clif but with regalloc_checker

test run
set enable_simd
set regalloc_checker
target s390x

function %sshr_i16x8(i16x8, i32) -> i16x8 {
block0(v0: i16x8, v1: i32):
    v2 = sshr v0, v1
    return v2
}
; note: because of the shifted-in sign-bit, lane 0 remains -1 == 0xffff, whereas lane 4 has been shifted to -8 == 0xfff8
; run: %sshr_i16x8([-1 2 4 8 -16 32 64 128], 1) == [-1 1 2 4 -8 16 32 64]
; run: %sshr_i16x8([-1 2 4 8 -16 32 64 128], 17) == [-1 1 2 4 -8 16 32 64]

Steps to Reproduce

Expected Results

The test to pass

Actual Results

afonso@DESKTOP-VSTS4BC:~/git/wasmtime/cranelift$ cargo run  --target s390x-unknown-linux-gnu -- test ./lmao.clif
    Finished dev [unoptimized + debuginfo] target(s) in 0.16s
     Running `qemu-s390x -L /usr/s390x-linux-gnu -E LD_LIBRARY_PATH=/usr/s390x-linux-gnu/lib /home/afonso/git/wasmtime/target/s390x-unknown-linux-gnu/debug/clif-util test ./lmao.clif`
 ERROR cranelift_codegen::machinst::compile > Register allocation checker errors:
CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
for vcode:
VCode {
  Entry block: 0
  v130 := v145
  v131 := v139
  v132 := v138
Block 0:
    (original IR block: block0)
    (instruction range: 0 .. 20)
  Inst 0: args %v128=%r2 %v129=%r3
  Inst 1: lrvg %v140, 0(%v129)
  Inst 2: lrvg %v141, 8(%v129)
  Inst 3: vlvgp %v142, %v141, %v140
  Inst 4: vpdi %v143, %v142, %v142, 4
  Inst 5: verllg %v144, %v143, 32
  Inst 6: verllf %v145, %v144, 16
  Inst 7: l %v139, 16(%v129)
  Inst 8: vlr %v24, %v130
  Inst 9: lr %r2, %v131
  Inst 10: basr %r14, %v128
  Inst 11: vlr %v138, %v24
  Inst 12: vpdi %v133, %v132, %v132, 4
  Inst 13: verllg %v134, %v133, 32
  Inst 14: verllf %v135, %v134, 16
  Inst 15: vlgvg %v136, %v135, 1
  Inst 16: vlgvg %v137, %v135, 0
  Inst 17: strvg %v136, 0(%v129)
  Inst 18: strvg %v137, 8(%v129)
  Inst 19: br %r14
}

thread 'worker #0' panicked at 'register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }', cranelift/codegen/src/machinst/compile.rs:70:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 ERROR cranelift_filetests::concurrent      > FAIL: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
FAIL ./lmao.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
1 tests
Error: 1 failure

Versions and Environment

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

Extra Info

I ran the entire filetest suite and the following files have errors on them, but I'm not sure how many duplicates there are:

FAIL filetests/filetests/runtests/simd-wideningpairwisedotproducts.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(19), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(20), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-sqmulroundsat-aarch64.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(17), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-sshr.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-unarrow.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(19), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/conversions-load-store.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(14), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-uwidenhigh.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(9), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-swidenhigh.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(9), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-scalartovector.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(7), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-ishl.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-splat.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(9), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-arithmetic.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(17), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-bitselect-to-vselect.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(17), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-snarrow.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(19), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-saddsat.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(20), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(21), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-insertlane.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-iaddpairwise.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(20), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(21), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-uwidenlow.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(9), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-min-max.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(20), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(21), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-bitselect.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(23), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(24), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-vselect.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(6), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(7), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-uunarrow.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(19), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-scalartovector-aarch64.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(9), op: Use: v0i reg, a
[message truncated]

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2022 at 14:41):

afonso360 edited issue #5090:

:wave: Hey,

I tried running our filetest suite with the regalloc_checker flag enabled. Some errors turned up on s390x, this is one of them. See below for the entire list of tests that fail.

.clif Test Case

This is the same testcase that is available in ./filetests/filetests/runtests/simd-sshr.clif but with regalloc_checker

test run
set enable_simd
set regalloc_checker
target s390x

function %sshr_i16x8(i16x8, i32) -> i16x8 {
block0(v0: i16x8, v1: i32):
    v2 = sshr v0, v1
    return v2
}
; note: because of the shifted-in sign-bit, lane 0 remains -1 == 0xffff, whereas lane 4 has been shifted to -8 == 0xfff8
; run: %sshr_i16x8([-1 2 4 8 -16 32 64 128], 1) == [-1 1 2 4 -8 16 32 64]
; run: %sshr_i16x8([-1 2 4 8 -16 32 64 128], 17) == [-1 1 2 4 -8 16 32 64]

Steps to Reproduce

Expected Results

The test to pass

Actual Results

afonso@DESKTOP-VSTS4BC:~/git/wasmtime/cranelift$ cargo run  --target s390x-unknown-linux-gnu -- test ./lmao.clif
    Finished dev [unoptimized + debuginfo] target(s) in 0.16s
     Running `qemu-s390x -L /usr/s390x-linux-gnu -E LD_LIBRARY_PATH=/usr/s390x-linux-gnu/lib /home/afonso/git/wasmtime/target/s390x-unknown-linux-gnu/debug/clif-util test ./lmao.clif`
 ERROR cranelift_codegen::machinst::compile > Register allocation checker errors:
CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
for vcode:
VCode {
  Entry block: 0
  v130 := v145
  v131 := v139
  v132 := v138
Block 0:
    (original IR block: block0)
    (instruction range: 0 .. 20)
  Inst 0: args %v128=%r2 %v129=%r3
  Inst 1: lrvg %v140, 0(%v129)
  Inst 2: lrvg %v141, 8(%v129)
  Inst 3: vlvgp %v142, %v141, %v140
  Inst 4: vpdi %v143, %v142, %v142, 4
  Inst 5: verllg %v144, %v143, 32
  Inst 6: verllf %v145, %v144, 16
  Inst 7: l %v139, 16(%v129)
  Inst 8: vlr %v24, %v130
  Inst 9: lr %r2, %v131
  Inst 10: basr %r14, %v128
  Inst 11: vlr %v138, %v24
  Inst 12: vpdi %v133, %v132, %v132, 4
  Inst 13: verllg %v134, %v133, 32
  Inst 14: verllf %v135, %v134, 16
  Inst 15: vlgvg %v136, %v135, 1
  Inst 16: vlgvg %v137, %v135, 0
  Inst 17: strvg %v136, 0(%v129)
  Inst 18: strvg %v137, 8(%v129)
  Inst 19: br %r14
}

thread 'worker #0' panicked at 'register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }', cranelift/codegen/src/machinst/compile.rs:70:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 ERROR cranelift_filetests::concurrent      > FAIL: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
FAIL ./lmao.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
1 tests
Error: 1 failure

Versions and Environment

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

Extra Info

I ran the entire filetest suite and the following files have errors on them, but I'm not sure how many duplicates there are:

FAIL filetests/filetests/runtests/simd-wideningpairwisedotproducts.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(19), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(20), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-sqmulroundsat-aarch64.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(17), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-sshr.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-unarrow.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(19), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/conversions-load-store.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(14), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-uwidenhigh.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(9), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-swidenhigh.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(9), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-scalartovector.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(7), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-ishl.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-splat.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(9), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-arithmetic.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(17), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-bitselect-to-vselect.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(17), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-snarrow.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(19), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-saddsat.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(20), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(21), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-insertlane.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-iaddpairwise.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(20), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(21), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-uwidenlow.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(9), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-min-max.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(20), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(21), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-bitselect.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(23), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(24), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-vselect.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(6), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(7), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-uunarrow.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(19), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-scalartovector-aarch64.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(9), op: Use: v0i reg, a
[message truncated]

view this post on Zulip Wasmtime GitHub notifications bot (Oct 25 2022 at 17:26):

uweigand commented on issue #5090:

Thanks for the report, @afonso360 ! With the linked PR, and including your commit to always enable the checker, all tests now pass.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 25 2022 at 18:04):

cfallin closed issue #5090:

:wave: Hey,

I tried running our filetest suite with the regalloc_checker flag enabled. Some errors turned up on s390x, this is one of them. See below for the entire list of tests that fail.

.clif Test Case

This is the same testcase that is available in ./filetests/filetests/runtests/simd-sshr.clif but with regalloc_checker

test run
set enable_simd
set regalloc_checker
target s390x

function %sshr_i16x8(i16x8, i32) -> i16x8 {
block0(v0: i16x8, v1: i32):
    v2 = sshr v0, v1
    return v2
}
; note: because of the shifted-in sign-bit, lane 0 remains -1 == 0xffff, whereas lane 4 has been shifted to -8 == 0xfff8
; run: %sshr_i16x8([-1 2 4 8 -16 32 64 128], 1) == [-1 1 2 4 -8 16 32 64]
; run: %sshr_i16x8([-1 2 4 8 -16 32 64 128], 17) == [-1 1 2 4 -8 16 32 64]

Steps to Reproduce

Expected Results

The test to pass

Actual Results

afonso@DESKTOP-VSTS4BC:~/git/wasmtime/cranelift$ cargo run  --target s390x-unknown-linux-gnu -- test ./lmao.clif
    Finished dev [unoptimized + debuginfo] target(s) in 0.16s
     Running `qemu-s390x -L /usr/s390x-linux-gnu -E LD_LIBRARY_PATH=/usr/s390x-linux-gnu/lib /home/afonso/git/wasmtime/target/s390x-unknown-linux-gnu/debug/clif-util test ./lmao.clif`
 ERROR cranelift_codegen::machinst::compile > Register allocation checker errors:
CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
for vcode:
VCode {
  Entry block: 0
  v130 := v145
  v131 := v139
  v132 := v138
Block 0:
    (original IR block: block0)
    (instruction range: 0 .. 20)
  Inst 0: args %v128=%r2 %v129=%r3
  Inst 1: lrvg %v140, 0(%v129)
  Inst 2: lrvg %v141, 8(%v129)
  Inst 3: vlvgp %v142, %v141, %v140
  Inst 4: vpdi %v143, %v142, %v142, 4
  Inst 5: verllg %v144, %v143, 32
  Inst 6: verllf %v145, %v144, 16
  Inst 7: l %v139, 16(%v129)
  Inst 8: vlr %v24, %v130
  Inst 9: lr %r2, %v131
  Inst 10: basr %r14, %v128
  Inst 11: vlr %v138, %v24
  Inst 12: vpdi %v133, %v132, %v132, 4
  Inst 13: verllg %v134, %v133, 32
  Inst 14: verllf %v135, %v134, 16
  Inst 15: vlgvg %v136, %v135, 1
  Inst 16: vlgvg %v137, %v135, 0
  Inst 17: strvg %v136, 0(%v129)
  Inst 18: strvg %v137, 8(%v129)
  Inst 19: br %r14
}

thread 'worker #0' panicked at 'register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }', cranelift/codegen/src/machinst/compile.rs:70:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 ERROR cranelift_filetests::concurrent      > FAIL: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
FAIL ./lmao.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
1 tests
Error: 1 failure

Versions and Environment

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

Extra Info

I ran the entire filetest suite and the following files have errors on them, but I'm not sure how many duplicates there are:

FAIL filetests/filetests/runtests/simd-wideningpairwisedotproducts.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(19), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(20), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-sqmulroundsat-aarch64.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(17), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-sshr.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-unarrow.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(19), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/conversions-load-store.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(14), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-uwidenhigh.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(9), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-swidenhigh.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(9), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-scalartovector.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(7), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-ishl.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-splat.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(9), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-arithmetic.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(17), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-bitselect-to-vselect.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(17), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-snarrow.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(19), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-saddsat.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(20), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(21), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-insertlane.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(15), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(16), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-iaddpairwise.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(20), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(21), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-uwidenlow.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(9), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-min-max.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(20), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(21), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-bitselect.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(23), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(24), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-vselect.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(6), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(7), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-uunarrow.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(18), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(19), op: Use: v0i reg, alloc: p0i }] }
FAIL filetests/filetests/runtests/simd-scalartovector-aarch64.clif: panicked in worker #0: register allocation checker: CheckerErrors { errors: [UnknownValueInAllocation { inst: Inst(8), op: Use: v0i reg, alloc: p0i }, UnknownValueInAllocation { inst: Inst(9), op: Use: v0i reg, all
[message truncated]


Last updated: Nov 22 2024 at 17:03 UTC