simd_reduce_min/max: remove float support#155189
simd_reduce_min/max: remove float support#155189RalfJung wants to merge 1 commit intorust-lang:mainfrom
Conversation
|
Some changes occurred in compiler/rustc_codegen_gcc Some changes occurred to the platform-builtins intrinsics. Make sure the cc @antoyo, @GuillaumeGomez, @bjorn3, @calebzulawski, @programmerjake Some changes occurred to the intrinsics. Make sure the CTFE / Miri interpreter |
|
r? @chenyukang rustbot has assigned @chenyukang. Use Why was this reviewer chosen?The reviewer was selected based on:
|
| acc = self.select(cmp, acc, elem); | ||
| } | ||
| acc | ||
| } |
There was a problem hiding this comment.
I removed the GCC code because it seems completely wrong under any conceivable semantics. For an input of [0.0, NaN, 1.0, 2.0] this would return 1.0!
|
|
||
| /// Returns the maximum element of a vector. | ||
| /// | ||
| /// `T` must be a vector of integers or floats. |
There was a problem hiding this comment.
This comment below still have
/// For floating-point values, uses IEEE-754 `maxNum`.`
which maybe need to be removed?
there are several similar places.
This comment has been minimized.
This comment has been minimized.
|
need more reviewers from the domain |
Yeah as I said this is blocked on rust-lang/portable-simd#515. |
d7ab695 to
1df099e
Compare
1df099e to
c77f465
Compare
|
The job Click to see the possible cause of the failure (guessed by this bot) |
LLVM currently doesn't have an intrinsic with the right semantics here (see llvm/llvm-project#185827). The only remaining user of this intrinsic with float types is portable-simd and it's easier to implement a fallback there than here, so I opted for making the intrinsic int-only. I kept around the float support in cranelift and Miri because there it already has the desired semantics (matching scalar min/max).
Fixes #153395
Blocked on rust-lang/portable-simd#515