fix is_homogeneous_aggregate: use unit size, not total size - #161394
Conversation
is_homogeneous_aggregate: use unit size, not total size
| // do not get homogeneous aggregate treatment. | ||
| RegKind::Float => cx.target_spec().rustc_abi != Some(RustcAbi::Softfloat), | ||
| RegKind::Vector { .. } => size.bits() == 64 || size.bits() == 128, | ||
| RegKind::Vector { .. } => unit.size.bits() == 64 || unit.size.bits() == 128, |
There was a problem hiding this comment.
| RegKind::Vector { .. } => size.bits() == 64 || size.bits() == 128, | ||
| RegKind::Vector { .. } => unit.size.bits() == 64 || unit.size.bits() == 128, |
There was a problem hiding this comment.
| RegKind::Integer => false, | ||
| RegKind::Float => true, | ||
| RegKind::Vector { .. } => arg.layout.size.bits() == 128, | ||
| RegKind::Vector { .. } => unit.size.bits() == 128, |
There was a problem hiding this comment.
There was a problem hiding this comment.
Worth adding u64 aggregates here too?
This comment has been minimized.
This comment has been minimized.
a91d2f2 to
fd3fd89
Compare
| // When the fields are not 64 or 128 bits in size, they do not qualify as a homogeneous | ||
| // aggregate, and passed as type-erased sequences of integers. | ||
|
|
||
| // CHECK: define [4 x <4 x i8>] @quad_int8x4_t([4 x <4 x i8>] {{.*}} %0) | ||
| // CHECK: define [2 x i64] @quad_int8x4_t([2 x i64] {{.*}} %0) |
There was a problem hiding this comment.
these previously passed the aggregate check, but that was wrong
| // Other configurations are not passed by-value but indirectly. | ||
| // Other configurations passed directly when they qualify as a homogeneous aggregate. | ||
|
|
||
| // CHECK: define void @pair_int128x1_t | ||
| // CHECK: define [2 x <1 x i128>] @pair_int128x1_t([2 x <1 x i128>] |
There was a problem hiding this comment.
these are now recognized as homogeneous aggregates
fd3fd89 to
8a59847
Compare
This comment has been minimized.
This comment has been minimized.
|
@bors r+ rollup |
…unit, r=davidtwco fix `is_homogeneous_aggregate`: use unit size, not total size fixes rust-lang#161382 The vector case of the three (arm, aarch64, powerpc64) `is_homogeneous_aggregate` implementations looked at the total type size, instead of the unit size. blocked on rust-lang#161070 merging r? davidtwco
|
This pull request was unapproved. |
8a59847 to
a305a9c
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
Yup simple merge conflict @bors r=davidtwco |
…uwer Rollup of 25 pull requests Successful merges: - #162072 (Add new Tier-3 target: `powerpc64-sony-ps3`) - #162179 (type system const items via direct rhs) - #162255 (let people change rustc-dev-guide in-tree) - #162262 (Avoid manually instantiating some binders in error reporting with `-Znext-solver`) - #162277 (Introduce `rustc_middle::middel::resolve`) - #162285 (box: fixup map/try_map deallocate calls) - #162286 (string: don't unwind prematurely) - #162289 (alloc: a bunch of safety comments) - #162290 (abby test DSL: AliasTyOutlivesViaEnv) - #162292 (Update `askama` version to `0.16.1`) - #160509 (Remove `RegionExt`; move methods to `Region` in `rustc_type_ir`) - #160906 (Suggest usize instead of placeholder type for array length constants) - #160936 (traits: Represent live alias arguments as bitsets) - #161394 (fix `is_homogeneous_aggregate`: use unit size, not total size ) - #161400 (Improve diagnostics for references to closures) - #161656 (Suggest mutable references for FnMut closure arguments) - #161711 (Add more splat fn type tests) - #161786 (Make `tcx.def_id_partial_cmp` public) - #161953 (sanitizers: Implicitly disable mutually exclusive sanitizers) - #162155 (add suggestion for `rustc_allowed_through_unstable_modules` attribute) - #162212 (Implement `Rng` for `Box`) - #162246 (Fix incorrect meta span) - #162266 (std: fix typo) - #162291 (Add regression test from 1.98.1) - #162303 (Fix a minor spelling error in `library/std/src/sys/fs/unix.rs`)
…unit, r=davidtwco fix `is_homogeneous_aggregate`: use unit size, not total size fixes rust-lang#161382 The vector case of the three (arm, aarch64, powerpc64) `is_homogeneous_aggregate` implementations looked at the total type size, instead of the unit size. blocked on rust-lang#161070 merging r? davidtwco
…uwer Rollup of 25 pull requests Successful merges: - #162072 (Add new Tier-3 target: `powerpc64-sony-ps3`) - #162179 (type system const items via direct rhs) - #162255 (let people change rustc-dev-guide in-tree) - #162262 (Avoid manually instantiating some binders in error reporting with `-Znext-solver`) - #162277 (Introduce `rustc_middle::middel::resolve`) - #162285 (box: fixup map/try_map deallocate calls) - #162286 (string: don't unwind prematurely) - #162289 (alloc: a bunch of safety comments) - #162290 (abby test DSL: AliasTyOutlivesViaEnv) - #162292 (Update `askama` version to `0.16.1`) - #160509 (Remove `RegionExt`; move methods to `Region` in `rustc_type_ir`) - #160906 (Suggest usize instead of placeholder type for array length constants) - #160936 (traits: Represent live alias arguments as bitsets) - #161394 (fix `is_homogeneous_aggregate`: use unit size, not total size ) - #161400 (Improve diagnostics for references to closures) - #161656 (Suggest mutable references for FnMut closure arguments) - #161711 (Add more splat fn type tests) - #161786 (Make `tcx.def_id_partial_cmp` public) - #161953 (sanitizers: Implicitly disable mutually exclusive sanitizers) - #162155 (add suggestion for `rustc_allowed_through_unstable_modules` attribute) - #162212 (Implement `Rng` for `Box`) - #162246 (Fix incorrect meta span) - #162266 (std: fix typo) - #162291 (Add regression test from 1.98.1) - #162303 (Fix a minor spelling error in `library/std/src/sys/fs/unix.rs`)
Rollup merge of #161394 - folkertdev:arm-aarch64-hva-vector-unit, r=davidtwco fix `is_homogeneous_aggregate`: use unit size, not total size fixes #161382 The vector case of the three (arm, aarch64, powerpc64) `is_homogeneous_aggregate` implementations looked at the total type size, instead of the unit size. blocked on #161070 merging r? davidtwco
|
Note This PR was benchmarked as part of triage of its containing rollup: triage URL. Finished benchmarking commit (334273c): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis perf run didn't have relevant results for this metric. Max RSS (memory usage)Results (primary -2.4%, secondary 2.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesThis perf run didn't have relevant results for this metric. Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: missing data |
fixes #161382
The vector case of the three (arm, aarch64, powerpc64)
is_homogeneous_aggregateimplementations looked at the total type size, instead of the unit size.blocked on #161070 merging
r? davidtwco