fN::BITS constants for feature float_bits_const
Also enables the feature for compiler_builtins as otherwise this causes a warning and conflicts with the Float extension trait.
---
Implementation for rust-lang/rust#151073
Feature flag: `#![feature(float_bits_const)]`
Note that this is likely to conflict with some extension traits, as it has with compiler builtins. However, assuming correct values for the constants, they are either `u32`, the same type, which should not cause a problem (as shown by enabling the feature for compiler_builtins), or a different type (e.g. `usize`), which should cause a compiler error. Either way this should never change behaviour unless the extension trait implemented an incorrect value.
Also note that it doesn't seem to be possible to put multiple unstable attributes on an item, so `f128::BITS` and `f16::BITS` are gated behind the feature flags for those primitives, rather than `#![feature(float_bits_const)]`
Fix missing unused_variables lint when using a match guard
Within a binding pattern match guard, only real reads of a bound local impact its liveness analysis - not the fake read that is injected.
Fixesrust-lang/rust#151983
r? compiler
Work around rustfmt giving up on a large expression
- https://github.com/rust-lang/rustfmt/issues/3863
---
In some cases, if rustfmt sees a string literal that is too long for it to comfortably format, it will give up on formatting the entire enclosing expression.
For complex builder expressions, that will prevent auto-formatting for frustratingly large sections of code.
This PR works around a particular occurrence of that phenomenon in `compiler/rustc_interface/src/util.rs`, by splitting a single error message string across multiple lines. This allows rustfmt to successfully auto-format the entire enclosing expression, which is dozens of lines long.
There should be no change to compiler behaviour.
Add codegen test for SLP vectorization
close: rust-lang/rust#142519
This PR adds a codegen regression test for rust-lang/rust#142519. A regression in LLVM to fail to auto-vectorize, leading to significant performance loss.
The SLP vectorizer correctly groups the 4-byte operations into <4 x i8> vectors.
The loop state is maintained in SIMD registers (phi <4 x i8>).
The test remains robust across architectures (AArch64 vs x86_64) by allowing flexible store types (i32 or <4 x i8>).
Move bigint helper tracking issues
Closesrust-lang/rust#85532.
This splits the remainder of the `bigint_helper_methods` tracking issue into three issues:
* `signed_bigint_helpers`: rust-lang/rust#151989
* `widening_mul`: rust-lang/rust#152016
* `const_unsigned_bigint_helpers`: rust-lang/rust#152015
Note that the existing stable methods were merged under the `unsigned_bigint_helpers` feature as part of rust-lang/rust#144494.
Move the `fingerprint_style` special case into `DepKindVTable` creation
I'm a little bit fuzzy on *precisely* why anonymous queries are treated as having `FingerprintStyle::Opaque`, but I'm pretty confident that baking this special case into the query vtable is equivalent to the current behaviour, while being marginally more efficient.
(I believe this special case comes from anonymous queries not having a fingerprint in the first place, so “opaque” is just there to signal that reconstructing a key is impossible.)
Codegen tests for Arm Cortex-R82
This PR adds checks to the `aarch64v8r-unknown-none` target to verify that if the Cortex-R82 CPU is enabled (with `-Ctarget-cpu=cortex-r82`), that the appropriate additional AArch64 features are enabled.
This is important because Cortex-R82 is (currently) the only processor implementing Armv8-R AArch64 and it implements a number of Armv8 features over and above the baseline for the architecture. Many of these features are of interest to safety-critical firmware development (for example `FEAT_RASv1p1`, which adds support for the *RAS Common Fault Injection Model Extension*) and so we anticipate them being enabled when building such firmware.
We are offering these tests upstream in-lieu of a full Cortex-R82 specific target because we understand the Project has a preference for architecture-baseline targets over CPU-specific targets.
~~This PR builds on and requires https://github.com/rust-lang/rust/pull/150863, but we've pulled them out as a separate PR.~~ That PR has been merged.
## Ownership
This PR was developed by Ferrous Systems on behalf of Arm. Arm is the owner of these changes.