Uh oh!
There was an error while loading. Please reload this page.
Stop emitting non-power-of-two vectors in (non-portable-SIMD) codegen - #115236
Conversation
rustbot
commented
Aug 26, 2023
(rustbot has picked a reviewer for you, use r? to override) |
| #[no_mangle] | ||
| // CHECK-LABEL: @replace_short_array_4( | ||
| pub fn replace_short_array_4(r: &mut [u32; 4], v: [u32; 4]) -> [u32; 4] { | ||
| // CHECK-NOT: alloca | ||
| // CHECK: %[[R:.+]] = load <4 x i32>, ptr %r, align 4 | ||
| // CHECK: store <4 x i32> %[[R]], ptr %result | ||
| // CHECK: %[[V:.+]] = load <4 x i32>, ptr %v, align 4 | ||
| // CHECK: store <4 x i32> %[[V]], ptr %r |
compiler-errors
left a comment
There was a problem hiding this comment.
r=me unless you want a specific review
scottmcm
commented
Aug 26, 2023
@bors r=compiler-errors rollup=never |
bors
commented
Aug 26, 2023
bors
commented
Aug 26, 2023
Noratrieb
commented
Aug 26, 2023
note that this is also what killed the MIPS backend so it seems reasonable to believe that LLVM backends are not good at this in general |
bors
commented
Aug 26, 2023
☀️ Test successful - checks-actions |
1 similar comment
bors
commented
Aug 26, 2023
☀️ Test successful - checks-actions |
rust-timer
commented
Aug 26, 2023
Finished benchmarking commit (766c0c0): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 631.911s -> 631.395s (-0.08%) |
Beta nominationThis is to address the perf hit seen in #115212 It should be very safe, since it's only one line of product code, and all it does is disable #111999 in more cases, leaving those cases to use the same codepath as in 1.71. (It would also be possible to disable 111999 entirely, but I've also seen cases like https://rust.godbolt.org/z/7s9ob85ja where the vector codegen helps avoid byte-by-byte EDIT: The original issue reporter confirmed in #115212 (comment) that this fixes it. |
apiraino
commented
Sep 1, 2023
Beta backport accepted as per compiler team on Zulip Also in favor of a stable backport in case a 1.72.1 materializes (zulip comment). @rustbot label +beta-accepted +stable-accepted |
[beta] backports - Contents of reachable statics is reachable rust-lang#115114 - Revert "Suggest using `Arc` on `!Send`/`!Sync` types" rust-lang#115311 - Stop emitting non-power-of-two vectors in (non-portable-SIMD) codegen rust-lang#115236 - Do not forget to pass DWARF fragment information to LLVM. rust-lang#115139 - rustdoc: use unicode-aware checks for redundant explicit link fastpath rust-lang#115070 r? cuviper
…Simulacrum [stable] 1.72.1 release This backports: * Remove assert that checks type equality rust-lang#115215 * implied bounds: do not ICE on unconstrained region vars rust-lang#115559 * rustdoc: correctly deal with self ty params when eliding default object lifetimes rust-lang#115276 * Stop emitting non-power-of-two vectors in (non-portable-SIMD) codegen rust-lang#115236 * Normalize before checking if local is freeze in deduced_param_attrs rust-lang#114948 Some cherry-picks required merge conflict resolution, we'll see if I got it right based on CI (rustdoc fix and LLVM codegen test). r? `@Mark-Simulacrum`
…Simulacrum [stable] 1.72.1 release This backports: * Remove assert that checks type equality rust-lang#115215 * implied bounds: do not ICE on unconstrained region vars rust-lang#115559 * rustdoc: correctly deal with self ty params when eliding default object lifetimes rust-lang#115276 * Stop emitting non-power-of-two vectors in (non-portable-SIMD) codegen rust-lang#115236 * Normalize before checking if local is freeze in deduced_param_attrs rust-lang#114948 Some cherry-picks required merge conflict resolution, we'll see if I got it right based on CI (rustdoc fix and LLVM codegen test). r? `@Mark-Simulacrum`
…Simulacrum [stable] 1.72.1 release This backports: * Remove assert that checks type equality rust-lang#115215 * implied bounds: do not ICE on unconstrained region vars rust-lang#115559 * rustdoc: correctly deal with self ty params when eliding default object lifetimes rust-lang#115276 * Stop emitting non-power-of-two vectors in (non-portable-SIMD) codegen rust-lang#115236 * Normalize before checking if local is freeze in deduced_param_attrs rust-lang#114948 Some cherry-picks required merge conflict resolution, we'll see if I got it right based on CI (rustdoc fix and LLVM codegen test). r? `@Mark-Simulacrum`
…Simulacrum [stable] 1.72.1 release This backports: * Remove assert that checks type equality rust-lang#115215 * implied bounds: do not ICE on unconstrained region vars rust-lang#115559 * rustdoc: correctly deal with self ty params when eliding default object lifetimes rust-lang#115276 * Stop emitting non-power-of-two vectors in (non-portable-SIMD) codegen rust-lang#115236 * Normalize before checking if local is freeze in deduced_param_attrs rust-lang#114948 Some cherry-picks required merge conflict resolution, we'll see if I got it right based on CI (rustdoc fix and LLVM codegen test). r? `@Mark-Simulacrum`
…Simulacrum [stable] 1.72.1 release This backports: * Remove assert that checks type equality rust-lang#115215 * implied bounds: do not ICE on unconstrained region vars rust-lang#115559 * rustdoc: correctly deal with self ty params when eliding default object lifetimes rust-lang#115276 * Stop emitting non-power-of-two vectors in (non-portable-SIMD) codegen rust-lang#115236 * Normalize before checking if local is freeze in deduced_param_attrs rust-lang#114948 Some cherry-picks required merge conflict resolution, we'll see if I got it right based on CI (rustdoc fix and LLVM codegen test). r? `@Mark-Simulacrum`
…Simulacrum [stable] 1.72.1 release This backports: * Remove assert that checks type equality rust-lang#115215 * implied bounds: do not ICE on unconstrained region vars rust-lang#115559 * rustdoc: correctly deal with self ty params when eliding default object lifetimes rust-lang#115276 * Stop emitting non-power-of-two vectors in (non-portable-SIMD) codegen rust-lang#115236 * Normalize before checking if local is freeze in deduced_param_attrs rust-lang#114948 Some cherry-picks required merge conflict resolution, we'll see if I got it right based on CI (rustdoc fix and LLVM codegen test). r? `@Mark-Simulacrum`
…Simulacrum [stable] 1.72.1 release This backports: * Remove assert that checks type equality rust-lang#115215 * implied bounds: do not ICE on unconstrained region vars rust-lang#115559 * rustdoc: correctly deal with self ty params when eliding default object lifetimes rust-lang#115276 * Stop emitting non-power-of-two vectors in (non-portable-SIMD) codegen rust-lang#115236 * Normalize before checking if local is freeze in deduced_param_attrs rust-lang#114948 Some cherry-picks required merge conflict resolution, we'll see if I got it right based on CI (rustdoc fix and LLVM codegen test). r? `@Mark-Simulacrum`
> 1.72.1 resolves a few regressions introduced in 1.72.0: > - [Partially revert codegen change, improving codegen](rust-lang/rust#115236) > - [rustdoc: Fix self ty params in objects with lifetimes](rust-lang/rust#115276) > - [Fix regression in compile times](rust-lang/rust#114948) > - Resolve some ICEs in the compiler: > - [#115215](rust-lang/rust#115215) > - [#115559](rust-lang/rust#115559)
Fixes#115212
It's unclear what makes this not work sometimes, since it often does work, so for now just disable the unusual cases. A future PR can consider doing something smarter, but this is an easy and safe tweak that we can do to resolve the regressions for now.