Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
1d49df6
Stabilize `VecDeque::retain_back` from `truncate_front`
cammeresi Jan 19, 2026
426657c
loongarch: Use `intrinsics::simd` for v{ld,st}[x]
heiher May 28, 2026
ebe31bf
Better docs for PartialEq
hkBst Oct 10, 2025
285d935
intrinsic-test: default to `--no-fail-fast`
davidtwco Jun 22, 2026
1d594c4
intrinsic-test: specializations as iterator
davidtwco May 20, 2026
9ac81d1
intrinsic-test: impl `get_load_function` for SVE
davidtwco Jun 1, 2026
b3ef0a5
Replace cfg_if with cfg_select
hkBst Jun 25, 2026
0fcde25
intrinsic-test: use `arm_sve.h` and target feats
davidtwco Jun 1, 2026
680b275
intrinsic-test: `bool` test values
davidtwco Jun 1, 2026
f733bf8
intrinsic-test: values for enum-typed constraints
davidtwco Jun 1, 2026
e88c874
intrinsic-test: no test values for `svbool_t`
davidtwco Jun 1, 2026
daab032
intrinsic-test: introduce `predicate_function`
davidtwco Jun 1, 2026
13678b0
intrinsic-test: sve comparison and predicates
davidtwco Jun 1, 2026
1393d87
intrinsic-test: test values for `svbool_t`
davidtwco Jun 4, 2026
d9cab00
intrinsic-test: enable non-baseline target features
davidtwco Jun 11, 2026
c10f404
intrinsic-test: SVE float comparison
davidtwco Jun 11, 2026
687d636
intrinsic-test: stop skipping SVE intrinsics
davidtwco Jun 1, 2026
3d2e05b
intrinsic-test: print scalable vectors on test fail
davidtwco Jun 15, 2026
3316f81
core_arch: redefine `svtrn{1,2}`
davidtwco Jun 22, 2026
f326508
Merge pull request #2160 from davidtwco/intrinsic-test-sve
sayantn Jun 28, 2026
ce3cff8
Merge pull request #2174 from hkBst/cfg-select
folkertdev Jun 28, 2026
e3e20ed
Rename HAS_CT_PROJECTION to HAS_CONST_ALIASES
Shourya742 Jun 27, 2026
d5b0137
Merge pull request #2146 from heiher/vld-st-x
folkertdev Jun 29, 2026
d08cce8
Merge stdarch-gen-hexagon-scalar into stdarch-gen-hexagon
xonx4l Jun 27, 2026
93c9813
Merge pull request #2175 from xonx4l/merge-hexagon-generators
folkertdev Jun 29, 2026
a9832de
loongarch: Use `intrinsics::simd` for vrotr[i]
heiher Jun 2, 2026
8da5bdb
Merge pull request #2150 from heiher/vrotr-i
folkertdev Jun 30, 2026
24dcc9f
loongarch: Use `intrinsics::simd` for vfrecip
heiher Jun 2, 2026
2d10d1f
Merge pull request #2151 from heiher/vfrecip
folkertdev Jun 30, 2026
b6d1f13
loongarch: Use `intrinsics::simd` for vfrsqrt
heiher Jun 2, 2026
2482d47
Merge pull request #2152 from heiher/vfrsqrt
folkertdev Jun 30, 2026
6f6aac0
loongarch: Use `intrinsics::simd` for vfrintr{p,m,z}
heiher Jun 2, 2026
f959792
Merge pull request #2153 from heiher/vfrintr-p-m-z
folkertdev Jun 30, 2026
392facd
loongarch: Use `intrinsics::simd` for vmuh
heiher Jun 11, 2026
4f762a3
Merge pull request #2158 from heiher/vmuh
folkertdev Jul 1, 2026
d24fa95
Test the ordering of non-terminal binds in ambiguity error messages
Jul 2, 2026
87c76f9
Deterministically order `MatcherLoc`s in error messages
Jul 2, 2026
cc71d5c
simplify `Option::into_flat_iter` signature
WaffleLapkin Jul 3, 2026
a29353b
Vec::dedup_by docs explicit function argument order
m4dh0rs3 Jul 6, 2026
c7eb5e4
add test for wrong suggest of self receiver
chenyukang Jul 6, 2026
d09f7ca
correct the span for parameter suggestion
chenyukang Jul 6, 2026
eef7f2e
Add library support for `aarch64-unknown-linux-pauthtest`
jchlanda May 4, 2026
1a7135c
Use target_env = "musl" & target_abi = "pauthtest" instead of env
jchlanda May 11, 2026
d0b4c46
Update landing pad to use addr()
jchlanda Jun 3, 2026
038cb8d
Use rust_force_inline on sign_lpad function
jchlanda Jul 3, 2026
b749630
Set correct cfg_select for sign_lpad
jchlanda Jul 6, 2026
14bb27e
add more tests for suggesting fn parameters
chenyukang Jul 7, 2026
2efdc66
Carry the `b_offset` inside `BackendRepr::ScalarPair`
scottmcm Jul 1, 2026
ad575fe
Oh yeah, clippy too
scottmcm Jul 1, 2026
ef6ad0d
Oh, miri for a different target
scottmcm Jul 1, 2026
870c4ca
chore: add codegen test for range length bound propagation
amirHdev Jul 7, 2026
6b205c6
Update `browser-ui-test` version to `0.24.1`
GuillaumeGomez Jul 7, 2026
99c8cf8
Add align requirement in _mm_stream_si32 and _mm_stream_si64
yilin0518 Jul 7, 2026
9e394da
Update wasm-component-ld to 0.5.26
alexcrichton Jul 7, 2026
865fb57
std: merge the unix-like io::error modules into one file
valentynkit Jul 7, 2026
24fb2fb
add core test run with `-Zforce-intrinsic-fallback`
folkertdev Jul 7, 2026
7a28eed
wrapping_sh* methods: clarify underspecified reference
RalfJung Jul 7, 2026
5d96f17
Do not build the compiler when invoking `x perf compare`
Kobzol Jul 7, 2026
d2ee4ca
rustdoc: Represent `--output-format=json` coverage and ir differently
aDotInTheVoid Mar 27, 2026
594e737
std: support real fd methods on Emscripten
guybedford Jul 8, 2026
f4db0a9
Emit the emscripten entry point as `__main_argc_argv`
guybedford Jul 8, 2026
6a9fb2d
Add regression test for CString::clone_into unwind safety
Vastargazing Jul 8, 2026
47a510b
Tweak `write_immediate_to_mplace_no_validate` to be more consistent w…
scottmcm Jul 7, 2026
dd26311
disable `icx` CI run
folkertdev Jul 8, 2026
62fda0a
Merge pull request #2185 from folkertdev/disable-icx
davidtwco Jul 8, 2026
8118399
Attempt to run parallel frontend CI
heinwol Jul 8, 2026
6236baf
Merge pull request #2183 from yilin0518/main
folkertdev Jul 8, 2026
66ebb4f
ci: use `llvm-22.1.4-x86_64.tar.gz` mirrored in `ci-mirrors`
jieyouxu Jul 8, 2026
f7a6c99
cleanup: upstream dropped AMX-TF32
krasimirgg Jul 8, 2026
8fa04ef
Merge pull request #2186 from jieyouxu/jieyouxu/mirror/stdarch
folkertdev Jul 8, 2026
15f9829
update comments
guybedford Jul 8, 2026
465e429
Merge pull request #2184 from krasimirgg/jul26-drop-amx-tf32
folkertdev Jul 8, 2026
40251d7
Add regression test for too-big byval ABI args
Ap4sh Jul 8, 2026
d6a71c4
Rollup merge of #158968 - folkertdev:stdarch-sync-2026-07-08, r=folke…
jhpratt Jul 9, 2026
470853e
Rollup merge of #154445 - aDotInTheVoid:better-enum, r=Urgau
jhpratt Jul 9, 2026
fc7e5e6
Rollup merge of #158495 - Shourya742:2026-06-27-rename-tflag, r=BoxyU…
jhpratt Jul 9, 2026
c688130
Rollup merge of #158666 - scottmcm:scalar-but-packed, r=workingjubilee
jhpratt Jul 9, 2026
376f430
Rollup merge of #158870 - valentynkit:posix-io-error-single-file, r=j…
jhpratt Jul 9, 2026
5c3a66d
Rollup merge of #158920 - alexcrichton:update-wasm-component-ld, r=lqd
jhpratt Jul 9, 2026
24b098a
Rollup merge of #158926 - RalfJung:wrapping_sh, r=Darksonn
jhpratt Jul 9, 2026
f9f0989
Rollup merge of #158927 - folkertdev:test-fallback-bodies, r=folkertdev
jhpratt Jul 9, 2026
9a2f826
Rollup merge of #158932 - Kobzol:x-compare-dont-build-rustc, r=clubby789
jhpratt Jul 9, 2026
c706c84
Rollup merge of #158937 - guybedford:emscripten-pthread-main, r=bjorn3
jhpratt Jul 9, 2026
7feebd0
Rollup merge of #151379 - cammeresi:20260119-trunc, r=clarfonthey
jhpratt Jul 9, 2026
468fd15
Rollup merge of #156144 - hkBst:improve-partial-eq-docs, r=nia-e
jhpratt Jul 9, 2026
16e2fb6
Rollup merge of #156548 - jchlanda:jakub/pac_lib, r=davidtwco
jhpratt Jul 9, 2026
bba5dff
Rollup merge of #157995 - m4dh0rs3:main, r=Mark-Simulacrum
jhpratt Jul 9, 2026
2ece4d4
Rollup merge of #158307 - heinwol:parallel-frontend-CI, r=jieyouxu
jhpratt Jul 9, 2026
1eeda33
Rollup merge of #158741 - WaffleLapkin:into_flat_iter_noa, r=hanna-kr…
jhpratt Jul 9, 2026
1b30851
Rollup merge of #158807 - Vastargazing:tests/cstr-clone-into-alloc-er…
jhpratt Jul 9, 2026
ee0bd19
Rollup merge of #158862 - chenyukang:yukang-fix-131084-self-receiver-…
jhpratt Jul 9, 2026
2bb944e
Rollup merge of #158894 - bal-e:ambiguity-nt-ordering, r=nnethercote
jhpratt Jul 9, 2026
5f6ad3f
Rollup merge of #158902 - amirHdev:add-codegen-test-range-len-try-fro…
jhpratt Jul 9, 2026
f255e47
Rollup merge of #158913 - GuillaumeGomez:update-browser-ui-test, r=ji…
jhpratt Jul 9, 2026
387f27d
Rollup merge of #158935 - guybedford:emscripten-owned-fd, r=jhpratt
jhpratt Jul 9, 2026
6152879
Rollup merge of #158978 - Ap4sh:ap4sh/issue-148853-abi-layout-test, r…
jhpratt Jul 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6213,9 +6213,9 @@ dependencies = [

[[package]]
name = "wasi-preview1-component-adapter-provider"
version = "44.0.2"
version = "46.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2211ca2d69a88055eefb06bad741dde3180c9d4020f7e42fea72caba83f9c10c"
checksum = "1b6c48003fe59c201c97a7786ff55feabe6b6f83b598aa9ff5bcc4f94d940bf3"

[[package]]
name = "wasip2"
Expand Down Expand Up @@ -6282,9 +6282,9 @@ dependencies = [

[[package]]
name = "wasm-component-ld"
version = "0.5.25"
version = "0.5.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee72c06c556db23aca2d29e1e183d96efdffa7110b24915629a5091de600a894"
checksum = "51a12709376d4ce64f472699500db3b0e5902cc2bef16fb6ca3098bfdac032fa"
dependencies = [
"anyhow",
"clap",
Expand All @@ -6293,12 +6293,12 @@ dependencies = [
"libc",
"tempfile",
"wasi-preview1-component-adapter-provider",
"wasmparser 0.252.0",
"wasmparser 0.253.0",
"wat",
"windows-sys 0.61.2",
"winsplit",
"wit-component 0.252.0",
"wit-parser 0.252.0",
"wit-component 0.253.0",
"wit-parser 0.253.0",
]

[[package]]
Expand Down Expand Up @@ -6330,12 +6330,12 @@ dependencies = [

[[package]]
name = "wasm-encoder"
version = "0.252.0"
version = "0.253.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8185ae345fa5687c054626ff9a50e7089797a343d9904d1dc9820eb4c4d3196f"
checksum = "59972d6cd272259de647b7c1f1912e45e289c75ffd4be04e10695507cd7e1b59"
dependencies = [
"leb128fmt",
"wasmparser 0.252.0",
"wasmparser 0.253.0",
]

[[package]]
Expand All @@ -6352,14 +6352,14 @@ dependencies = [

[[package]]
name = "wasm-metadata"
version = "0.252.0"
version = "0.253.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b7e08e02a3cd55bf778009d4cd6faae50da011f293644daf78a531a32d6d142"
checksum = "b3f45816ef616806f48498bcd831377de578c4fa51db0c83ab8ceb78cc13523b"
dependencies = [
"anyhow",
"indexmap",
"wasm-encoder 0.252.0",
"wasmparser 0.252.0",
"wasm-encoder 0.253.0",
"wasmparser 0.253.0",
]

[[package]]
Expand Down Expand Up @@ -6396,9 +6396,9 @@ dependencies = [

[[package]]
name = "wasmparser"
version = "0.252.0"
version = "0.253.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3eb099dcadcde5be9eef55e3a337128efd4e44b4c93122487e4d2e4e1c6627c"
checksum = "19db11f87d2486580e1e8b6f494c54df7e0566b87d0b599db843c24019667339"
dependencies = [
"bitflags",
"hashbrown 0.17.0",
Expand All @@ -6409,22 +6409,22 @@ dependencies = [

[[package]]
name = "wast"
version = "252.0.0"
version = "253.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "942a3449d6a593fccc111a6241c8df52bda168af30e40bf9580d4394d7374c65"
checksum = "d3264542f8965c5d84fb1085d924bfba9a6314bb228eff13a2de14d7627664d0"
dependencies = [
"bumpalo",
"leb128fmt",
"memchr",
"unicode-width 0.2.2",
"wasm-encoder 0.252.0",
"wasm-encoder 0.253.0",
]

[[package]]
name = "wat"
version = "1.252.0"
version = "1.253.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c72a4ba7088f7bac94cf516e49882bdf97068904a563768cf249efc839ec42cb"
checksum = "4bfc5ce906144200c972ec617470aa35bd847472e170b26dde3e80541c674055"
dependencies = [
"wast",
]
Expand Down Expand Up @@ -6872,9 +6872,9 @@ dependencies = [

[[package]]
name = "wit-component"
version = "0.252.0"
version = "0.253.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76db0662b590f45d33d0e363fa13539a5a1eecd35d5a12fe208c335461c1053d"
checksum = "dbbd2500ac3488489ee8c6e59b79d7e47e6da5bfb019efd35d5dca57b78af624"
dependencies = [
"anyhow",
"bitflags",
Expand All @@ -6883,10 +6883,10 @@ dependencies = [
"serde",
"serde_derive",
"serde_json",
"wasm-encoder 0.252.0",
"wasm-metadata 0.252.0",
"wasmparser 0.252.0",
"wit-parser 0.252.0",
"wasm-encoder 0.253.0",
"wasm-metadata 0.253.0",
"wasmparser 0.253.0",
"wit-parser 0.253.0",
]

[[package]]
Expand All @@ -6909,9 +6909,9 @@ dependencies = [

[[package]]
name = "wit-parser"
version = "0.252.0"
version = "0.253.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4266bea110371c620ccf3201c5023676046bc4556e5c7cfb5d500bda5ebc162d"
checksum = "4d997b8e5920fcbeec742b58e583325d6419a6aca617ae8075c406a61c65ba8a"
dependencies = [
"anyhow",
"hashbrown 0.17.0",
Expand All @@ -6923,7 +6923,7 @@ dependencies = [
"serde_derive",
"serde_json",
"unicode-ident",
"wasmparser 0.252.0",
"wasmparser 0.253.0",
]

[[package]]
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_abi/src/callconv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl<'a, Ty> TyAndLayout<'a, Ty> {
unreachable!("`homogeneous_aggregate` should not be called for scalable vectors")
}

BackendRepr::ScalarPair(..) | BackendRepr::Memory { sized: true } => {
BackendRepr::ScalarPair { .. } | BackendRepr::Memory { sized: true } => {
// Helper for computing `homogeneous_aggregate`, allowing a custom
// starting offset (used below for handling variants).
let from_fields_at =
Expand Down
24 changes: 16 additions & 8 deletions compiler/rustc_abi/src/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
Err(AbiMismatch) | Ok(None) => BackendRepr::Memory { sized: true },
Ok(Some((repr, _))) => match repr {
// Mismatched alignment (e.g. union is #[repr(packed)]): disable opt
BackendRepr::Scalar(_) | BackendRepr::ScalarPair(_, _)
BackendRepr::Scalar(_) | BackendRepr::ScalarPair { .. }
if repr.scalar_platform_align(dl).unwrap() != align =>
{
BackendRepr::Memory { sized: true }
Expand All @@ -489,7 +489,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
}
// the alignment tests passed and we can use this
BackendRepr::Scalar(..)
| BackendRepr::ScalarPair(..)
| BackendRepr::ScalarPair { .. }
| BackendRepr::SimdVector { .. }
| BackendRepr::SimdScalableVector { .. }
| BackendRepr::Memory { .. } => repr,
Expand Down Expand Up @@ -558,7 +558,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
};
match &mut st.backend_repr {
BackendRepr::Scalar(scalar) => hide_niches(scalar),
BackendRepr::ScalarPair(a, b) => {
BackendRepr::ScalarPair { a, b, b_offset: _ } => {
hide_niches(a);
hide_niches(b);
}
Expand Down Expand Up @@ -701,13 +701,21 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
// When the total alignment and size match, we can use the
// same ABI as the scalar variant with the reserved niche.
BackendRepr::Scalar(_) => BackendRepr::Scalar(niche_scalar),
BackendRepr::ScalarPair(first, second) => {
BackendRepr::ScalarPair { a: first, b: second, b_offset } => {
// Only the niche is guaranteed to be initialised,
// so use union layouts for the other primitive.
if niche_offset == Size::ZERO {
BackendRepr::ScalarPair(niche_scalar, second.to_union())
BackendRepr::ScalarPair {
a: niche_scalar,
b: second.to_union(),
b_offset,
}
} else {
BackendRepr::ScalarPair(first.to_union(), niche_scalar)
BackendRepr::ScalarPair {
a: first.to_union(),
b: niche_scalar,
b_offset,
}
}
}
_ => BackendRepr::Memory { sized: true },
Expand Down Expand Up @@ -1037,7 +1045,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
// If we pick a "clever" (by-value) ABI, we might have to adjust the ABI of the
// variants to ensure they are consistent. This is because a downcast is
// semantically a NOP, and thus should not affect layout.
if matches!(abi, BackendRepr::Scalar(..) | BackendRepr::ScalarPair(..)) {
if matches!(abi, BackendRepr::Scalar(..) | BackendRepr::ScalarPair { .. }) {
for variant in &mut layout_variants {
// We only do this for variants with fields; the others are not accessed anyway.
// Also do not overwrite any already existing "clever" ABIs.
Expand Down Expand Up @@ -1354,7 +1362,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
}
// But scalar pairs are Rust-specific and get
// treated as aggregates by C ABIs anyway.
BackendRepr::ScalarPair(..) => {
BackendRepr::ScalarPair { .. } => {
abi = field.backend_repr;
}
_ => {}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_abi/src/layout/simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ impl<FieldIdx: Idx, VariantIdx: Idx> LayoutData<FieldIdx, VariantIdx> {
offsets: [Size::ZERO, b_offset].into(),
in_memory_order: [FieldIdx::new(0), FieldIdx::new(1)].into(),
},
backend_repr: BackendRepr::ScalarPair(a, b),
backend_repr: BackendRepr::ScalarPair { a, b, b_offset },
largest_niche,
uninhabited: false,
align: AbiAlign::new(align),
Expand Down
38 changes: 23 additions & 15 deletions compiler/rustc_abi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1796,14 +1796,18 @@ impl IntoDiagArg for NumScalableVectors {
pub enum BackendRepr {
Scalar(Scalar),
/// The data contained in this type can be entirely represented by two scalars.
/// The two scalars are listed in *memory* order, so the first is at offset zero
/// and the second at a non-zero offset.
/// The two scalars are listed in *memory* order, so `a` is at offset zero
/// and `b` is at non-zero offset `b_offset`.
/// These need not be `FieldIdx(0)` and `FieldIdx(1)`.
///
/// As of June 2026 the offset to the second scalar is the size of the first
/// scalar rounded up to the platform alignment of the second scalar.
/// As of June 2026 the `b_offset` is always the size of the `a`
/// scalar rounded up to the platform alignment of the `b` scalar.
/// That may soon change, however; see MCP#1007.
ScalarPair(Scalar, Scalar),
ScalarPair {
a: Scalar,
b: Scalar,
b_offset: Size,
},
SimdScalableVector {
element: Scalar,
count: u64,
Expand All @@ -1826,7 +1830,7 @@ impl BackendRepr {
pub fn is_unsized(&self) -> bool {
match *self {
BackendRepr::Scalar(_)
| BackendRepr::ScalarPair(..)
| BackendRepr::ScalarPair { .. }
// FIXME(rustc_scalable_vector): Scalable vectors are `Sized` while the
// `sized_hierarchy` feature is not yet fully implemented. After `sized_hierarchy` is
// fully implemented, scalable vectors will remain `Sized`, they just won't be
Expand Down Expand Up @@ -1875,7 +1879,7 @@ impl BackendRepr {
pub fn scalar_platform_align<C: HasDataLayout>(&self, cx: &C) -> Option<Align> {
match *self {
BackendRepr::Scalar(s) => Some(s.default_align(cx).abi),
BackendRepr::ScalarPair(s1, s2) => {
BackendRepr::ScalarPair { a: s1, b: s2, b_offset: _ } => {
Some(s1.default_align(cx).max(s2.default_align(cx)).abi)
}
// The align of a Vector can vary in surprising ways
Expand All @@ -1893,8 +1897,7 @@ impl BackendRepr {
// No padding in scalars.
BackendRepr::Scalar(s) => Some(s.size(cx)),
// May have some padding between the pair.
BackendRepr::ScalarPair(s1, s2) => {
let field2_offset = s1.size(cx).align_to(s2.default_align(cx).abi);
BackendRepr::ScalarPair { a: _, b: s2, b_offset: field2_offset } => {
let size = (field2_offset + s2.size(cx)).align_to(
self.scalar_platform_align(cx)
// We absolutely must have an answer here or everything is FUBAR.
Expand All @@ -1913,8 +1916,8 @@ impl BackendRepr {
pub fn to_union(&self) -> Self {
match *self {
BackendRepr::Scalar(s) => BackendRepr::Scalar(s.to_union()),
BackendRepr::ScalarPair(s1, s2) => {
BackendRepr::ScalarPair(s1.to_union(), s2.to_union())
BackendRepr::ScalarPair { a: s1, b: s2, b_offset } => {
BackendRepr::ScalarPair { a: s1.to_union(), b: s2.to_union(), b_offset }
}
BackendRepr::SimdVector { element, count } => {
BackendRepr::SimdVector { element: element.to_union(), count }
Expand All @@ -1939,8 +1942,13 @@ impl BackendRepr {
BackendRepr::SimdVector { element: element_l, count: count_l },
BackendRepr::SimdVector { element: element_r, count: count_r },
) => element_l.primitive() == element_r.primitive() && count_l == count_r,
(BackendRepr::ScalarPair(l1, l2), BackendRepr::ScalarPair(r1, r2)) => {
l1.primitive() == r1.primitive() && l2.primitive() == r2.primitive()
(
BackendRepr::ScalarPair { a: l1, b: l2, b_offset: l_offset },
BackendRepr::ScalarPair { a: r1, b: r2, b_offset: r_offset },
) => {
l1.primitive() == r1.primitive()
&& l2.primitive() == r2.primitive()
&& l_offset == r_offset
}
// Everything else must be strictly identical.
_ => self == other,
Expand Down Expand Up @@ -2180,7 +2188,7 @@ impl<FieldIdx: Idx, VariantIdx: Idx> LayoutData<FieldIdx, VariantIdx> {
BackendRepr::Scalar(_)
| BackendRepr::SimdVector { .. }
| BackendRepr::SimdScalableVector { .. } => false,
BackendRepr::ScalarPair(..) | BackendRepr::Memory { .. } => true,
BackendRepr::ScalarPair { .. } | BackendRepr::Memory { .. } => true,
}
}

Expand Down Expand Up @@ -2294,7 +2302,7 @@ impl<FieldIdx: Idx, VariantIdx: Idx> LayoutData<FieldIdx, VariantIdx> {
pub fn is_zst(&self) -> bool {
match self.backend_repr {
BackendRepr::Scalar(_)
| BackendRepr::ScalarPair(..)
| BackendRepr::ScalarPair { .. }
| BackendRepr::SimdScalableVector { .. }
| BackendRepr::SimdVector { .. } => false,
BackendRepr::Memory { sized } => sized && self.size.bytes() == 0,
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_cranelift/src/abi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ fn make_local_place<'tcx>(
);
}
let place = if is_ssa {
if let BackendRepr::ScalarPair(_, _) = layout.backend_repr {
if let BackendRepr::ScalarPair { a: _, b: _, b_offset: _ } = layout.backend_repr {
CPlace::new_var_pair(fx, local, layout)
} else {
CPlace::new_var(fx, local, layout)
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_cranelift/src/abi/pass_mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ impl<'tcx> ArgAbiExt<'tcx> for ArgAbi<'tcx, Ty<'tcx>> {
_ => unreachable!("{:?}", self.layout.backend_repr),
},
PassMode::Pair(attrs_a, attrs_b) => match self.layout.backend_repr {
BackendRepr::ScalarPair(a, b) => {
BackendRepr::ScalarPair { a, b, b_offset: _ } => {
let a = scalar_to_clif_type(tcx, a);
let b = scalar_to_clif_type(tcx, b);
smallvec![
Expand Down Expand Up @@ -167,7 +167,7 @@ impl<'tcx> ArgAbiExt<'tcx> for ArgAbi<'tcx, Ty<'tcx>> {
_ => unreachable!("{:?}", self.layout.backend_repr),
},
PassMode::Pair(attrs_a, attrs_b) => match self.layout.backend_repr {
BackendRepr::ScalarPair(a, b) => {
BackendRepr::ScalarPair { a, b, b_offset: _ } => {
let a = scalar_to_clif_type(tcx, a);
let b = scalar_to_clif_type(tcx, b);
(
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_cranelift/src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ fn codegen_stmt<'tcx>(fx: &mut FunctionCx<'_, '_, 'tcx>, cur_block: Block, stmt:
}
UnOp::PtrMetadata => match layout.backend_repr {
BackendRepr::Scalar(_) => CValue::zst(dest_layout),
BackendRepr::ScalarPair(_, _) => {
BackendRepr::ScalarPair { a: _, b: _, b_offset: _ } => {
CValue::by_val(operand.load_scalar_pair(fx).1, dest_layout)
}
_ => bug!("Unexpected `PtrToMetadata` operand: {operand:?}"),
Expand Down
Loading
Loading