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:
Trevor Elliott
2022-08-26 16:33:48 -07:00
committed by GitHub
parent 8e8dfdf5f9
commit 25d960f9c4
11 changed files with 287 additions and 205 deletions

View 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

View 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