afonso360 opened issue #3334:
Hey,
It looks like SIMD
icmp
is failing to compile on x64. I don't really know how this is happening since we must use this on wasm for simd icmps, right? The test below is only foricmp eq
, but this fails for any condition code.
.clif
Test Casetest run target x86_64 machinst function %simd_icmp_eq_i8(i8x16, i8x16) -> b8x16 { block0(v0: i8x16, v1: i8x16): v2 = icmp eq v0, v1 return v2 } ; run: %simd_icmp_eq_i8([1 0 -1 1 1 1 1 1 1 1 1 1 1 1 1 1], [1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0]) == [true true true false false false false false false false false false false false false false] function %simd_icmp_eq_i16(i16x8, i16x8) -> b16x8 { block0(v0: i16x8, v1: i16x8): v2 = icmp eq v0, v1 return v2 } ; run: %simd_icmp_eq_i16([1 0 -1 1 1 1 1 1], [1 0 -1 0 0 0 0 0]) == [true true true false false false false false] function %simd_icmp_eq_i32(i32x4, i32x4) -> b32x4 { block0(v0: i32x4, v1: i32x4): v2 = icmp eq v0, v1 return v2 } ; run: %simd_icmp_eq_i32([1 0 -1 1], [1 0 -1 0]) == [true true true false] function %simd_icmp_eq_i64(i64x2, i64x2) -> b64x2 { block0(v0: i64x2, v1: i64x2): v2 = icmp eq v0, v1 return v2 } ; run: %simd_icmp_eq_i64([10 0], [1 0]) == [false true] ; run: %simd_icmp_eq_i64([-1 1], [-1 0]) == [true false]
Steps to Reproduce
clif-util test ./the-above.clif
Expected Results
The test to pass
Actual Results
Running `C:\Users\Afonso\CLionProjects\wasmtime\target\debug\clif-util.exe test .\filetests\filetests\runtests\simd-icmp-eq.clif` skipped .\filetests\filetests\runtests\simd-icmp-eq.clif: host can't run Aarch64(Aarch64) programs thread 'worker #0' panicked at 'assertion failed: rc_dst == rc_src', cranelift\codegen\src\isa\x64\inst\mod.rs:2676:9 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace FAIL .\filetests\filetests\runtests\simd-icmp-eq.clif: panicked in worker #0: assertion failed: rc_dst == rc_src 1 tests Error: 1 failure
Versions and Environment
Cranelift version or commit: main
Operating system: Windows
Architecture: x64Extra Info
A
icmp
SIMD test suite was added in #3332
afonso360 labeled issue #3334:
Hey,
It looks like SIMD
icmp
is failing to compile on x64. I don't really know how this is happening since we must use this on wasm for simd icmps, right? The test below is only foricmp eq
, but this fails for any condition code.
.clif
Test Casetest run target x86_64 machinst function %simd_icmp_eq_i8(i8x16, i8x16) -> b8x16 { block0(v0: i8x16, v1: i8x16): v2 = icmp eq v0, v1 return v2 } ; run: %simd_icmp_eq_i8([1 0 -1 1 1 1 1 1 1 1 1 1 1 1 1 1], [1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0]) == [true true true false false false false false false false false false false false false false] function %simd_icmp_eq_i16(i16x8, i16x8) -> b16x8 { block0(v0: i16x8, v1: i16x8): v2 = icmp eq v0, v1 return v2 } ; run: %simd_icmp_eq_i16([1 0 -1 1 1 1 1 1], [1 0 -1 0 0 0 0 0]) == [true true true false false false false false] function %simd_icmp_eq_i32(i32x4, i32x4) -> b32x4 { block0(v0: i32x4, v1: i32x4): v2 = icmp eq v0, v1 return v2 } ; run: %simd_icmp_eq_i32([1 0 -1 1], [1 0 -1 0]) == [true true true false] function %simd_icmp_eq_i64(i64x2, i64x2) -> b64x2 { block0(v0: i64x2, v1: i64x2): v2 = icmp eq v0, v1 return v2 } ; run: %simd_icmp_eq_i64([10 0], [1 0]) == [false true] ; run: %simd_icmp_eq_i64([-1 1], [-1 0]) == [true false]
Steps to Reproduce
clif-util test ./the-above.clif
Expected Results
The test to pass
Actual Results
Running `C:\Users\Afonso\CLionProjects\wasmtime\target\debug\clif-util.exe test .\filetests\filetests\runtests\simd-icmp-eq.clif` skipped .\filetests\filetests\runtests\simd-icmp-eq.clif: host can't run Aarch64(Aarch64) programs thread 'worker #0' panicked at 'assertion failed: rc_dst == rc_src', cranelift\codegen\src\isa\x64\inst\mod.rs:2676:9 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace FAIL .\filetests\filetests\runtests\simd-icmp-eq.clif: panicked in worker #0: assertion failed: rc_dst == rc_src 1 tests Error: 1 failure
Versions and Environment
Cranelift version or commit: main
Operating system: Windows
Architecture: x64Extra Info
A
icmp
SIMD test suite was added in #3332
afonso360 labeled issue #3334:
Hey,
It looks like SIMD
icmp
is failing to compile on x64. I don't really know how this is happening since we must use this on wasm for simd icmps, right? The test below is only foricmp eq
, but this fails for any condition code.
.clif
Test Casetest run target x86_64 machinst function %simd_icmp_eq_i8(i8x16, i8x16) -> b8x16 { block0(v0: i8x16, v1: i8x16): v2 = icmp eq v0, v1 return v2 } ; run: %simd_icmp_eq_i8([1 0 -1 1 1 1 1 1 1 1 1 1 1 1 1 1], [1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0]) == [true true true false false false false false false false false false false false false false] function %simd_icmp_eq_i16(i16x8, i16x8) -> b16x8 { block0(v0: i16x8, v1: i16x8): v2 = icmp eq v0, v1 return v2 } ; run: %simd_icmp_eq_i16([1 0 -1 1 1 1 1 1], [1 0 -1 0 0 0 0 0]) == [true true true false false false false false] function %simd_icmp_eq_i32(i32x4, i32x4) -> b32x4 { block0(v0: i32x4, v1: i32x4): v2 = icmp eq v0, v1 return v2 } ; run: %simd_icmp_eq_i32([1 0 -1 1], [1 0 -1 0]) == [true true true false] function %simd_icmp_eq_i64(i64x2, i64x2) -> b64x2 { block0(v0: i64x2, v1: i64x2): v2 = icmp eq v0, v1 return v2 } ; run: %simd_icmp_eq_i64([10 0], [1 0]) == [false true] ; run: %simd_icmp_eq_i64([-1 1], [-1 0]) == [true false]
Steps to Reproduce
clif-util test ./the-above.clif
Expected Results
The test to pass
Actual Results
Running `C:\Users\Afonso\CLionProjects\wasmtime\target\debug\clif-util.exe test .\filetests\filetests\runtests\simd-icmp-eq.clif` skipped .\filetests\filetests\runtests\simd-icmp-eq.clif: host can't run Aarch64(Aarch64) programs thread 'worker #0' panicked at 'assertion failed: rc_dst == rc_src', cranelift\codegen\src\isa\x64\inst\mod.rs:2676:9 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace FAIL .\filetests\filetests\runtests\simd-icmp-eq.clif: panicked in worker #0: assertion failed: rc_dst == rc_src 1 tests Error: 1 failure
Versions and Environment
Cranelift version or commit: main
Operating system: Windows
Architecture: x64Extra Info
A
icmp
SIMD test suite was added in #3332
jlb6740 commented on issue #3334:
Hi @afonso360 The error indicates an attempt to run an Aarch64 program?
Running `C:\Users\Afonso\CLionProjects\wasmtime\target\debug\clif-util.exe test .\filetests\filetests\runtests\simd-icmp-eq.clif` skipped .\filetests\filetests\runtests\simd-icmp-eq.clif: host can't run Aarch64(Aarch64) programs
Do you know why Aarch64 is being referenced in the error message if this is an x64 file test?
afonso360 commented on issue #3334:
Yeah, when I introduced that test file I also had a
target aarch64
, which also failed. That's why the log references aarch64 as a skipped test.
elliottt closed issue #3334:
Hey,
It looks like SIMD
icmp
is failing to compile on x64. I don't really know how this is happening since we must use this on wasm for simd icmps, right? The test below is only foricmp eq
, but this fails for any condition code.
.clif
Test Casetest run target x86_64 machinst function %simd_icmp_eq_i8(i8x16, i8x16) -> b8x16 { block0(v0: i8x16, v1: i8x16): v2 = icmp eq v0, v1 return v2 } ; run: %simd_icmp_eq_i8([1 0 -1 1 1 1 1 1 1 1 1 1 1 1 1 1], [1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0]) == [true true true false false false false false false false false false false false false false] function %simd_icmp_eq_i16(i16x8, i16x8) -> b16x8 { block0(v0: i16x8, v1: i16x8): v2 = icmp eq v0, v1 return v2 } ; run: %simd_icmp_eq_i16([1 0 -1 1 1 1 1 1], [1 0 -1 0 0 0 0 0]) == [true true true false false false false false] function %simd_icmp_eq_i32(i32x4, i32x4) -> b32x4 { block0(v0: i32x4, v1: i32x4): v2 = icmp eq v0, v1 return v2 } ; run: %simd_icmp_eq_i32([1 0 -1 1], [1 0 -1 0]) == [true true true false] function %simd_icmp_eq_i64(i64x2, i64x2) -> b64x2 { block0(v0: i64x2, v1: i64x2): v2 = icmp eq v0, v1 return v2 } ; run: %simd_icmp_eq_i64([10 0], [1 0]) == [false true] ; run: %simd_icmp_eq_i64([-1 1], [-1 0]) == [true false]
Steps to Reproduce
clif-util test ./the-above.clif
Expected Results
The test to pass
Actual Results
Running `C:\Users\Afonso\CLionProjects\wasmtime\target\debug\clif-util.exe test .\filetests\filetests\runtests\simd-icmp-eq.clif` skipped .\filetests\filetests\runtests\simd-icmp-eq.clif: host can't run Aarch64(Aarch64) programs thread 'worker #0' panicked at 'assertion failed: rc_dst == rc_src', cranelift\codegen\src\isa\x64\inst\mod.rs:2676:9 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace FAIL .\filetests\filetests\runtests\simd-icmp-eq.clif: panicked in worker #0: assertion failed: rc_dst == rc_src 1 tests Error: 1 failure
Versions and Environment
Cranelift version or commit: main
Operating system: Windows
Architecture: x64Extra Info
A
icmp
SIMD test suite was added in #3332
Last updated: Nov 22 2024 at 17:03 UTC