* cranelift: Add `iabs.i128` runtest * riscv64: Fix incorrect extension in iabs When lowering iabs, we were accidentally comparing the unextended value this caused the instruction to misbehave with certain top bits. This commit also adds a zbb lowering that does not use jumps.
14 lines
302 B
Plaintext
14 lines
302 B
Plaintext
test interpret
|
|
test run
|
|
target s390x
|
|
|
|
function %iabs_i128(i128) -> i128 {
|
|
block0(v0: i128):
|
|
v1 = iabs v0
|
|
return v1
|
|
}
|
|
; run: %iabs_i128(0) == 0
|
|
; run: %iabs_i128(-1) == 1
|
|
; run: %iabs_i128(1) == 1
|
|
; run: %iabs_i128(0x80000000_00000000_00000000_00000000) == 0x80000000_00000000_00000000_00000000
|