19
19
//! [wiki_fma]: https://en.wikipedia.org/wiki/Fused_multiply-accumulate
20
20
21
21
use crate :: core_arch:: x86:: * ;
22
+ use crate :: core_arch:: simd_llvm:: simd_fma;
22
23
23
24
#[ cfg( test) ]
24
25
use stdarch_test:: assert_instr;
@@ -32,7 +33,7 @@ use stdarch_test::assert_instr;
32
33
#[ cfg_attr( test, assert_instr( vfmadd) ) ]
33
34
#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
34
35
pub unsafe fn _mm_fmadd_pd ( a : __m128d , b : __m128d , c : __m128d ) -> __m128d {
35
- vfmaddpd ( a, b, c)
36
+ simd_fma ( a, b, c)
36
37
}
37
38
38
39
/// Multiplies packed double-precision (64-bit) floating-point elements in `a`
@@ -44,7 +45,7 @@ pub unsafe fn _mm_fmadd_pd(a: __m128d, b: __m128d, c: __m128d) -> __m128d {
44
45
#[ cfg_attr( test, assert_instr( vfmadd) ) ]
45
46
#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
46
47
pub unsafe fn _mm256_fmadd_pd ( a : __m256d , b : __m256d , c : __m256d ) -> __m256d {
47
- vfmaddpd256 ( a, b, c)
48
+ simd_fma ( a, b, c)
48
49
}
49
50
50
51
/// Multiplies packed single-precision (32-bit) floating-point elements in `a`
@@ -56,7 +57,7 @@ pub unsafe fn _mm256_fmadd_pd(a: __m256d, b: __m256d, c: __m256d) -> __m256d {
56
57
#[ cfg_attr( test, assert_instr( vfmadd) ) ]
57
58
#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
58
59
pub unsafe fn _mm_fmadd_ps ( a : __m128 , b : __m128 , c : __m128 ) -> __m128 {
59
- vfmaddps ( a, b, c)
60
+ simd_fma ( a, b, c)
60
61
}
61
62
62
63
/// Multiplies packed single-precision (32-bit) floating-point elements in `a`
@@ -68,7 +69,7 @@ pub unsafe fn _mm_fmadd_ps(a: __m128, b: __m128, c: __m128) -> __m128 {
68
69
#[ cfg_attr( test, assert_instr( vfmadd) ) ]
69
70
#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
70
71
pub unsafe fn _mm256_fmadd_ps ( a : __m256 , b : __m256 , c : __m256 ) -> __m256 {
71
- vfmaddps256 ( a, b, c)
72
+ simd_fma ( a, b, c)
72
73
}
73
74
74
75
/// Multiplies the lower double-precision (64-bit) floating-point elements in
0 commit comments