1
Fork 0

Rollup merge of #137804 - RalfJung:backend-repr-simd-vector, r=workingjubilee

rename BackendRepr::Vector → SimdVector

For many Rustaceans, "vector" does not imply "SIMD", so let's be more clear in this type that is used pervasively in the compiler.

r? `@workingjubilee`
This commit is contained in:
Matthias Krüger 2025-03-01 16:03:10 +01:00 committed by GitHub
commit 3bf976542a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 92 additions and 83 deletions

View file

@ -1296,7 +1296,7 @@ impl<'rt, 'tcx, M: Machine<'tcx>> ValueVisitor<'tcx, M> for ValidityVisitor<'rt,
self.visit_scalar(b, b_layout)?;
}
}
BackendRepr::Vector { .. } => {
BackendRepr::SimdVector { .. } => {
// No checks here, we assume layout computation gets this right.
// (This is harder to check since Miri does not represent these as `Immediate`. We
// also cannot use field projections since this might be a newtype around a vector.)

View file

@ -117,7 +117,7 @@ fn check_validity_requirement_lax<'tcx>(
BackendRepr::ScalarPair(s1, s2) => {
scalar_allows_raw_init(s1) && scalar_allows_raw_init(s2)
}
BackendRepr::Vector { element: s, count } => count == 0 || scalar_allows_raw_init(s),
BackendRepr::SimdVector { element: s, count } => count == 0 || scalar_allows_raw_init(s),
BackendRepr::Memory { .. } => true, // Fields are checked below.
};
if !valid {