File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -59,8 +59,8 @@ macro_rules! impl_float_reductions {
59
59
/// Produces the sum of the lanes of the vector.
60
60
#[ inline]
61
61
pub fn sum( self ) -> $scalar {
62
- // f32 SIMD sum is inaccurate on i586
63
- if cfg!( all( target_arch = "x86" , not( target_feature = "sse2" ) ) ) && core :: mem :: size_of :: <$scalar> ( ) == 4 {
62
+ // LLVM sum is inaccurate on i586
63
+ if cfg!( all( target_arch = "x86" , not( target_feature = "sse2" ) ) ) {
64
64
self . as_slice( ) . iter( ) . sum( )
65
65
} else {
66
66
unsafe { crate :: intrinsics:: simd_reduce_add_ordered( self , 0. ) }
@@ -70,8 +70,8 @@ macro_rules! impl_float_reductions {
70
70
/// Produces the sum of the lanes of the vector.
71
71
#[ inline]
72
72
pub fn product( self ) -> $scalar {
73
- // f32 SIMD product is inaccurate on i586
74
- if cfg!( all( target_arch = "x86" , not( target_feature = "sse2" ) ) ) && core :: mem :: size_of :: <$scalar> ( ) == 4 {
73
+ // LLVM product is inaccurate on i586
74
+ if cfg!( all( target_arch = "x86" , not( target_feature = "sse2" ) ) ) {
75
75
self . as_slice( ) . iter( ) . product( )
76
76
} else {
77
77
unsafe { crate :: intrinsics:: simd_reduce_mul_ordered( self , 1. ) }
You can’t perform that action at this time.
0 commit comments