x64: Add native lowering for scalar fma (#4539)

Use `vfmadd213{ss,sd}` for these lowerings.
This commit is contained in:
Afonso Bordado
2022-08-11 23:48:16 +01:00
committed by GitHub
parent 755cd4311e
commit 3ea1813173
10 changed files with 124 additions and 6 deletions

View File

@@ -2504,9 +2504,13 @@
(libcall_3 (LibCall.FmaF32) x y z))
(rule (lower (has_type $F64 (fma x y z)))
(libcall_3 (LibCall.FmaF64) x y z))
(rule (lower (has_type $F32X4 (fma x y z)))
(rule 1 (lower (has_type (and (use_fma) $F32) (fma x y z)))
(x64_vfmadd213ss x y z))
(rule 1 (lower (has_type (and (use_fma) $F64) (fma x y z)))
(x64_vfmadd213sd x y z))
(rule (lower (has_type (and (use_fma) $F32X4) (fma x y z)))
(x64_vfmadd213ps x y z))
(rule (lower (has_type $F64X2 (fma x y z)))
(rule (lower (has_type (and (use_fma) $F64X2) (fma x y z)))
(x64_vfmadd213pd x y z))
;; Rules for `load*` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;