@@ -280,34 +280,17 @@ macro_rules! test_reduction_float_min_max {
280
280
// targets:
281
281
if i == $id:: lanes( ) - 1 &&
282
282
target_with_broken_last_lane_nan {
283
- // FIXME:
284
- // https://github.com/rust-lang-nursery/packed_simd/issues/5
285
- //
286
- // If there is a NaN, the result should
287
- // always the largest element, but currently
288
- // when the last element is NaN the current
289
- // implementation incorrectly returns NaN.
290
- //
291
- // The targets mentioned above use different
292
- // codegen that produces the correct result.
293
- //
294
- // These asserts detect if this behavior
295
- // changes
296
- assert!( v. max_element( ) . is_nan( ) ,
297
- // FIXME: ^^^ should be -3.
283
+ assert_eq!( v. max_element( ) , -3 ,
298
284
"[A]: nan at {} => {} | {:?}" ,
299
285
i, v. max_element( ) , v) ;
300
286
301
287
// If we replace all the elements in the vector
302
288
// up-to the `i-th` lane with `NaN`s, the result
303
289
// is still always `-3.` unless all elements of
304
290
// the vector are `NaN`s:
305
- //
306
- // This is also broken:
307
291
for j in 0 ..i {
308
292
v = v. replace( j, n) ;
309
- assert!( v. max_element( ) . is_nan( ) ,
310
- // FIXME: ^^^ should be -3.
293
+ assert_eq!( v. max_element( ) , -3 ,
311
294
"[B]: nan at {} => {} | {:?}" ,
312
295
i, v. max_element( ) , v) ;
313
296
}
0 commit comments