Skip to content

Commit f031d0e

Browse files
committed
Remove FIXME due to a LLVM bug
This bug has been resolved: https://bugs.llvm.org/show_bug.cgi?id=36982
1 parent ceafeeb commit f031d0e

File tree

2 files changed

+3
-20
lines changed

2 files changed

+3
-20
lines changed

src/api/reductions/min_max.rs

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -280,34 +280,17 @@ macro_rules! test_reduction_float_min_max {
280280
// targets:
281281
if i == $id::lanes() - 1 &&
282282
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,
298284
"[A]: nan at {} => {} | {:?}",
299285
i, v.max_element(), v);
300286

301287
// If we replace all the elements in the vector
302288
// up-to the `i-th` lane with `NaN`s, the result
303289
// is still always `-3.` unless all elements of
304290
// the vector are `NaN`s:
305-
//
306-
// This is also broken:
307291
for j in 0..i {
308292
v = v.replace(j, n);
309-
assert!(v.max_element().is_nan(),
310-
// FIXME: ^^^ should be -3.
293+
assert_eq!(v.max_element(), -3,
311294
"[B]: nan at {} => {} | {:?}",
312295
i, v.max_element(), v);
313296
}

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ mod api;
262262
mod codegen;
263263
mod sealed;
264264

265-
pub use crate::sealed::{Simd as SimdVector, Shuffle, SimdArray, Mask};
265+
pub use crate::sealed::{Mask, Shuffle, Simd as SimdVector, SimdArray};
266266

267267
/// Packed SIMD vector type.
268268
///

0 commit comments

Comments
 (0)