-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
bugIncorrect behavior in the current implementation that needs fixingIncorrect behavior in the current implementation that needs fixingcraneliftIssues related to the Cranelift code generatorIssues related to the Cranelift code generator
Description
.clif
Test Case
test optimize
set opt_level=none
set preserve_frame_pointers=true
set enable_multi_ret_implicit_sret=true
function %main() -> i32 fast {
block0():
v2 = iconst.i32 0
v16 = srem v2, v2
return v16
}
; print: %main()
Run this test case on four architectures.
[x86 ] Floating point exception
return code: -8
[aarch64] qemu: uncaught target signal 4 (Illegal instruction) - core dumped
[aarch64] Illegal instruction
return code: -4
[riscv64] Illegal instruction
return code: -4
[s390x ] qemu: uncaught target signal 8 (Floating point exception) - core dumped
[s390x ] Illegal instruction
return code: -8
When running srem
with operands 0 and 0, the error types and return values are inconsistent among the four architectures.
Metadata
Metadata
Assignees
Labels
bugIncorrect behavior in the current implementation that needs fixingIncorrect behavior in the current implementation that needs fixingcraneliftIssues related to the Cranelift code generatorIssues related to the Cranelift code generator