refactor: move all 'filetests/vcode' tests to 'filetests/isa'
This commit is contained in:
54
cranelift/filetests/filetests/isa/aarch64/condops.clif
Normal file
54
cranelift/filetests/filetests/isa/aarch64/condops.clif
Normal file
@@ -0,0 +1,54 @@
|
||||
test compile
|
||||
target aarch64
|
||||
|
||||
function %f(i8, i64, i64) -> i64 {
|
||||
block0(v0: i8, v1: i64, v2: i64):
|
||||
v3 = iconst.i8 42
|
||||
v4 = ifcmp v0, v3
|
||||
v5 = selectif.i64 eq v4, v1, v2
|
||||
return v5
|
||||
}
|
||||
|
||||
; check: subs wzr
|
||||
; check: csel x0, $(=x[0-9]+, x[0-9]+), eq
|
||||
|
||||
function %g(i8) -> b1 {
|
||||
block0(v0: i8):
|
||||
v3 = iconst.i8 42
|
||||
v4 = ifcmp v0, v3
|
||||
v5 = trueif eq v4
|
||||
return v5
|
||||
}
|
||||
|
||||
; check: subs wzr
|
||||
; check: cset x0, eq
|
||||
|
||||
function %h(i8, i8, i8) -> i8 {
|
||||
block0(v0: i8, v1: i8, v2: i8):
|
||||
v3 = bitselect.i8 v0, v1, v2
|
||||
return v3
|
||||
}
|
||||
|
||||
; check: and
|
||||
; nextln: bic
|
||||
; nextln: orr
|
||||
|
||||
function %i(b1, i8, i8) -> i8 {
|
||||
block0(v0: b1, v1: i8, v2: i8):
|
||||
v3 = select.i8 v0, v1, v2
|
||||
return v3
|
||||
}
|
||||
|
||||
; check: subs wzr
|
||||
; nextln: csel
|
||||
|
||||
function %i(i32, i8, i8) -> i8 {
|
||||
block0(v0: i32, v1: i8, v2: i8):
|
||||
v3 = iconst.i32 42
|
||||
v4 = icmp.i32 eq v0, v3
|
||||
v5 = select.i8 v4, v1, v2
|
||||
return v5
|
||||
}
|
||||
|
||||
; check: subs wzr, w0, #42
|
||||
; nextln: csel x0, x1, x2, eq
|
||||
Reference in New Issue
Block a user