riscv64: Move is_null/is_invalid to ISLE (#5874)

* riscv64: Move `is_null`/`is_invalid` to ISLE

* riscv64: Fix `is_invalid` codegen

* Implement review suggestions

Thanks!

Co-authored-by: Jamey Sharp <jamey@minilop.net>

---------

Co-authored-by: Jamey Sharp <jamey@minilop.net>
This commit is contained in:
Afonso Bordado
2023-02-25 12:48:44 +00:00
committed by GitHub
parent 67e2e57b02
commit 36e92add6f
10 changed files with 33 additions and 116 deletions

View File

@@ -23,15 +23,12 @@ block0(v0: r64):
; VCode:
; block0:
; is_null a0,a0
; seqz a0,a0
; ret
;
; Disassembled:
; block0: ; offset 0x0
; beq zero, a0, 0xc
; mv a0, zero
; j 8
; addi a0, zero, 1
; seqz a0, a0
; ret
function %f2(r64) -> i8 {
@@ -42,15 +39,14 @@ block0(v0: r64):
; VCode:
; block0:
; is_invalid a0,a0
; addi t2,a0,1
; seqz a0,t2
; ret
;
; Disassembled:
; block0: ; offset 0x0
; beq zero, a0, 0xc
; mv a0, zero
; j 8
; addi a0, zero, 1
; addi t2, a0, 1
; seqz a0, t2
; ret
function %f3() -> r64 {

View File

@@ -2,6 +2,7 @@ test run
target aarch64
target x86_64
target s390x
target riscv64gc
; the interpreter does not support bitcasting to/from references
function %bitcast_ir64(i64) -> i8 {

View File

@@ -3,6 +3,7 @@ test run
target aarch64
target x86_64
target s390x
target riscv64gc
function %is_null_true_r64() -> i8 {
block0: