]> git.lizzy.rs Git - rust.git/commit - src/tools/rust-analyzer
Auto merge of #91484 - workingjubilee:simd-remove-autosplats, r=Mark-Simulacrum
authorbors <bors@rust-lang.org>
Wed, 8 Dec 2021 01:37:59 +0000 (01:37 +0000)
committerbors <bors@rust-lang.org>
Wed, 8 Dec 2021 01:37:59 +0000 (01:37 +0000)
commit11fb21fd0e4c42490d42f1baf6bc51516e5dc5f5
treeb36738ed7cc9a2f4fee95b5a760f249f6ebe9b40
parent477fd7038c235689913abf9208dfa9371cbacd88
parenteef4371a98357c3170c6ef09b2b940f844a1ee57
Auto merge of #91484 - workingjubilee:simd-remove-autosplats, r=Mark-Simulacrum

Sync portable-simd to remove autosplats

This PR syncs portable-simd in up to https://github.com/rust-lang/portable-simd/commit/a8385522ade6f67853edac730b5bf164ddb298fd in order to address the type inference breakages documented on nightly in https://github.com/rust-lang/rust/issues/90904 by removing the vector + scalar binary operations (called "autosplats", "broadcasting", or "rank promotion", depending on who you ask) that allow `{scalar} + &'_ {scalar}` to fail in some cases, because it becomes possible the programmer may have meant `{scalar} + &'_ {vector}`.

A few quality-of-life improvements make their way in as well:
- Lane counts can now go to 64, as LLVM seems to have fixed their miscompilation for those.
- `{i,u}8x64` to `__m512i` is now available.
- a bunch of `#[must_use]` notes appear throughout the module.
- Some implementations, mostly instances of `impl core::ops::{Op}<Simd> for Simd` that aren't `{vector} + {vector}` (e.g. `{vector} + &'_ {vector}`), leverage some generics and `where` bounds now to make them easier to understand by reducing a dozen implementations into one (and make it possible for people to open the docs on less burly devices).
- And some internal-only improvements.

None of these changes should affect a beta backport, only actual users of `core::simd` (and most aren't even visible in the programmatic sense), though I can extract an even more minimal changeset for beta if necessary. It seemed simpler to just keep moving forward.