afonso360 edited issue #5466:
:wave: Hey
.clif
Test Casetest interpret test run target x86_64 function %iabs_i32(i32) -> i32 { block0(v0: i32): v1 = iabs.i32 v0 return v1 } ; run: %iabs_i32(1) == 1 ; run: %iabs_i32(-1) == 1
Steps to Reproduce
clif-util test ./the-above.clif
Expected Results
The test to pass
Actual Results
The x86 backend has no lowerings for scalar types. The above test case is only for
i32
, but the same happens for other scalar types.thread 'worker #0' panicked at 'should be implemented in ISLE: inst = `v1 = iabs.i32 v0`, type = `Some(types::I32)`', cranelift/codegen/src/machinst/lower.rs:753:21 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ERROR cranelift_filetests::concurrent > FAIL: panicked in worker #0: should be implemented in ISLE: inst = `v1 = iabs.i32 v0`, type = `Some(types::I32)` FAIL ./lmao.clif: panicked in worker #0: should be implemented in ISLE: inst = `v1 = iabs.i32 v0`, type = `Some(types::I32)` 1 tests Error: 1 failure
Versions and Environment
Cranelift version or commit: main
Operating system: linux
Architecture: x86_64
alexcrichton labeled issue #5466:
:wave: Hey
.clif
Test Casetest interpret test run target x86_64 function %iabs_i32(i32) -> i32 { block0(v0: i32): v1 = iabs.i32 v0 return v1 } ; run: %iabs_i32(1) == 1 ; run: %iabs_i32(-1) == 1
Steps to Reproduce
clif-util test ./the-above.clif
Expected Results
The test to pass
Actual Results
The x86 backend has no lowerings for scalar types. The above test case is only for
i32
, but the same happens for other scalar types.thread 'worker #0' panicked at 'should be implemented in ISLE: inst = `v1 = iabs.i32 v0`, type = `Some(types::I32)`', cranelift/codegen/src/machinst/lower.rs:753:21 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ERROR cranelift_filetests::concurrent > FAIL: panicked in worker #0: should be implemented in ISLE: inst = `v1 = iabs.i32 v0`, type = `Some(types::I32)` FAIL ./lmao.clif: panicked in worker #0: should be implemented in ISLE: inst = `v1 = iabs.i32 v0`, type = `Some(types::I32)` 1 tests Error: 1 failure
Versions and Environment
Cranelift version or commit: main
Operating system: linux
Architecture: x86_64
p3achyjr commented on issue #5466:
Hello! A couple friends and I were looking into this issue, and we ran into issues where x86 doesn't seem to have instructions that operate on i128s as a whole. We were thinking of implementing a rule where we check the upper 64 bits, and then do the condition negation on both segments of the i128 if the check flips the sign flag. What are your thoughts?
afonso360 commented on issue #5466:
That seems to be what GCC does in these cases, although LLVM has a different implementation (Godbolt). I'm not too much of an x86 expert to be able to tell which one is the better implementation.
p3achyjr commented on issue #5466:
thanks you! also, for some reason I can't this anywhere--how do you build
clif-util
?
p3achyjr edited a comment on issue #5466:
thank you! also, for some reason I can't this anywhere--how do you build
clif-util
?
cfallin commented on issue #5466:
@p3achyjr you can build
clif-util
withcargo build -p cranelift-tools
(it's a bit confusing, sorry --cranelift-tools
is the name of the crate that lives incranelift/
, and it has a binary namedclif-util
).
p3achyjr commented on issue #5466:
Posted https://github.com/bytecodealliance/wasmtime/pull/7166/commits--I'm definitely not a .isle expert, so please leave comments :)
p3achyjr edited a comment on issue #5466:
Posted https://github.com/bytecodealliance/wasmtime/pull/7166/commits --I'm definitely not a .isle expert, so please leave comments :)
afonso360 closed issue #5466:
:wave: Hey
.clif
Test Casetest interpret test run target x86_64 function %iabs_i32(i32) -> i32 { block0(v0: i32): v1 = iabs.i32 v0 return v1 } ; run: %iabs_i32(1) == 1 ; run: %iabs_i32(-1) == 1
Steps to Reproduce
clif-util test ./the-above.clif
Expected Results
The test to pass
Actual Results
The x86 backend has no lowerings for scalar types. The above test case is only for
i32
, but the same happens for other scalar types.thread 'worker #0' panicked at 'should be implemented in ISLE: inst = `v1 = iabs.i32 v0`, type = `Some(types::I32)`', cranelift/codegen/src/machinst/lower.rs:753:21 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ERROR cranelift_filetests::concurrent > FAIL: panicked in worker #0: should be implemented in ISLE: inst = `v1 = iabs.i32 v0`, type = `Some(types::I32)` FAIL ./lmao.clif: panicked in worker #0: should be implemented in ISLE: inst = `v1 = iabs.i32 v0`, type = `Some(types::I32)` 1 tests Error: 1 failure
Versions and Environment
Cranelift version or commit: main
Operating system: linux
Architecture: x86_64
Last updated: Nov 22 2024 at 17:03 UTC