@@ -208,7 +208,7 @@ pub fn _mm_min_ss(a: __m128, b: __m128) -> __m128 {
208208#[ cfg_attr( test, assert_instr( minps) ) ]
209209#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
210210pub fn _mm_min_ps ( a : __m128 , b : __m128 ) -> __m128 {
211- // See the `test_mm_min_ps` test why this can't be implemented using `simd_fmin `.
211+ // See the `test_mm_min_ps` test why this can't be implemented using `simd_minimum_number_nsz `.
212212 unsafe { minps ( a, b) }
213213}
214214
@@ -234,7 +234,7 @@ pub fn _mm_max_ss(a: __m128, b: __m128) -> __m128 {
234234#[ cfg_attr( test, assert_instr( maxps) ) ]
235235#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
236236pub fn _mm_max_ps ( a : __m128 , b : __m128 ) -> __m128 {
237- // See the `test_mm_min_ps` test why this can't be implemented using `simd_fmax `.
237+ // See the `test_mm_min_ps` test why this can't be implemented using `simd_maximum_number_nsz `.
238238 unsafe { maxps ( a, b) }
239239}
240240
@@ -2227,11 +2227,11 @@ mod tests {
22272227 let r = _mm_min_ps ( a, b) ;
22282228 assert_eq_m128 ( r, _mm_setr_ps ( -100.0 , 5.0 , 0.0 , -10.0 ) ) ;
22292229
2230- // `_mm_min_ps` can **not** be implemented using the `simd_min ` rust intrinsic. `simd_min`
2231- // is lowered by the llvm codegen backend to `llvm.minnum .v*` llvm intrinsic. This intrinsic
2232- // doesn't specify how -0.0 is handled. Unfortunately it happens to behave different from
2233- // the `minps` x86 instruction on x86. The `llvm.minnum.v*` llvm intrinsic equals
2234- // `r1` to `a` and `r2` to `b` .
2230+ // `_mm_min_ps` can **not** be implemented using the `simd_minimum_number_nsz ` rust
2231+ // intrinsic. That intrinsic is lowered by the llvm codegen backend to `llvm.minimumnum .v*`
2232+ // llvm intrinsic with the `nsz` attribute. The `nsz` attribute means -0.0 is handled
2233+ // non-deterministically. The `minps` x86 instruction however has a deterministic semantics
2234+ // for signed zeros .
22352235 let a = _mm_setr_ps ( -0.0 , 0.0 , 0.0 , 0.0 ) ;
22362236 let b = _mm_setr_ps ( 0.0 , 0.0 , 0.0 , 0.0 ) ;
22372237 let r1 = _mm_min_ps ( a, b) . as_f32x4 ( ) . to_bits ( ) ;
0 commit comments