x64: Lower tlsvalue, sqmul_round_sat, and uunarrow in ISLE (#4793)
Lower tlsvalue, sqmul_round_sat, and uunarrow in ISLE.
This commit is contained in:
19
cranelift/filetests/filetests/isa/x64/sqmul_round_sat.clif
Normal file
19
cranelift/filetests/filetests/isa/x64/sqmul_round_sat.clif
Normal file
@@ -0,0 +1,19 @@
|
||||
test compile precise-output
|
||||
target x86_64
|
||||
|
||||
function %f1(i16x8, i16x8) -> i16x8 {
|
||||
block0(v0: i16x8, v1: i16x8):
|
||||
v2 = sqmul_round_sat v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
; pushq %rbp
|
||||
; movq %rsp, %rbp
|
||||
; block0:
|
||||
; load_const VCodeConstant(0), %xmm7
|
||||
; pmulhrsw %xmm0, %xmm1, %xmm0
|
||||
; pcmpeqw %xmm7, %xmm0, %xmm7
|
||||
; pxor %xmm0, %xmm7, %xmm0
|
||||
; movq %rbp, %rsp
|
||||
; popq %rbp
|
||||
; ret
|
||||
26
cranelift/filetests/filetests/isa/x64/uunarrow.clif
Normal file
26
cranelift/filetests/filetests/isa/x64/uunarrow.clif
Normal file
@@ -0,0 +1,26 @@
|
||||
test compile precise-output
|
||||
target x86_64
|
||||
|
||||
function %f1(f64x2) -> i32x4 {
|
||||
block0(v0: f64x2):
|
||||
v1 = fcvt_to_uint_sat.i64x2 v0
|
||||
v2 = vconst.i64x2 [0 0]
|
||||
v3 = uunarrow v1, v2
|
||||
return v3
|
||||
}
|
||||
|
||||
; pushq %rbp
|
||||
; movq %rsp, %rbp
|
||||
; block0:
|
||||
; xorpd %xmm3, %xmm3, %xmm3
|
||||
; maxpd %xmm0, %xmm3, %xmm0
|
||||
; load_const VCodeConstant(0), %xmm7
|
||||
; minpd %xmm0, %xmm7, %xmm0
|
||||
; roundpd $3, %xmm0, %xmm0
|
||||
; load_const VCodeConstant(1), %xmm13
|
||||
; addpd %xmm0, %xmm13, %xmm0
|
||||
; shufps $136, %xmm0, %xmm3, %xmm0
|
||||
; movq %rbp, %rsp
|
||||
; popq %rbp
|
||||
; ret
|
||||
|
||||
Reference in New Issue
Block a user