Skip to content

Commit d344960

Browse files
authored
Rollup merge of rust-lang#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`
2 parents 24b202f + 975dee2 commit d344960

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/intrinsic/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tc
312312
let layout = self.layout_of(tp_ty).layout;
313313
let _use_integer_compare = match layout.backend_repr() {
314314
Scalar(_) | ScalarPair(_, _) => true,
315-
Vector { .. } => false,
315+
SimdVector { .. } => false,
316316
Memory { .. } => {
317317
// For rusty ABIs, small aggregates are actually passed
318318
// as `RegKind::Integer` (see `FnAbi::adjust_for_abi`),

src/type_of.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ fn uncached_gcc_type<'gcc, 'tcx>(
6363
) -> Type<'gcc> {
6464
match layout.backend_repr {
6565
BackendRepr::Scalar(_) => bug!("handled elsewhere"),
66-
BackendRepr::Vector { ref element, count } => {
66+
BackendRepr::SimdVector { ref element, count } => {
6767
let element = layout.scalar_gcc_type_at(cx, element, Size::ZERO);
6868
let element =
6969
// NOTE: gcc doesn't allow pointer types in vectors.
@@ -178,17 +178,17 @@ pub trait LayoutGccExt<'tcx> {
178178
impl<'tcx> LayoutGccExt<'tcx> for TyAndLayout<'tcx> {
179179
fn is_gcc_immediate(&self) -> bool {
180180
match self.backend_repr {
181-
BackendRepr::Scalar(_) | BackendRepr::Vector { .. } => true,
181+
BackendRepr::Scalar(_) | BackendRepr::SimdVector { .. } => true,
182182
BackendRepr::ScalarPair(..) | BackendRepr::Memory { .. } => false,
183183
}
184184
}
185185

186186
fn is_gcc_scalar_pair(&self) -> bool {
187187
match self.backend_repr {
188188
BackendRepr::ScalarPair(..) => true,
189-
BackendRepr::Scalar(_) | BackendRepr::Vector { .. } | BackendRepr::Memory { .. } => {
190-
false
191-
}
189+
BackendRepr::Scalar(_)
190+
| BackendRepr::SimdVector { .. }
191+
| BackendRepr::Memory { .. } => false,
192192
}
193193
}
194194

0 commit comments

Comments
 (0)