Skip to content

Revert "LLVM 23: Adapt codegen test to moved assume" - #158502

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
saethlin:revert-flaky-codegen-test-fix
Jun 28, 2026
Merged

Revert "LLVM 23: Adapt codegen test to moved assume"#158502
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
saethlin:revert-flaky-codegen-test-fix

Conversation

@saethlin

@saethlinsaethlin commented Jun 27, 2026

Copy link
Copy Markdown
Member

This reverts #158067.
Fixes#158500

The fix that was applied here is not robust against layout randomization, specifically the IR to load through the slice head pointer needs to come after a gepi, and not just a load ptr, ptr %x.

Based on the PR discussion, I think it's possible that the min-llvm-version: 22 was mistakenly added when CI happened to choose the bad layout during the initial merge.

I'm not yet sure what the right fix is, but this is causing about half of all merges to fail right now so a revert seems prudent.

I don't think we have a way to skip tests when randomize-layout is set. The problem here is that we run codegen tests against the globally-configured sysroot, so setting -Zrandomize-layout in the test doesn't do anything.

@rustbotrustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 27, 2026
@rustbotrustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jun 27, 2026
@rustbot

Copy link
Copy Markdown
Collaborator

r? @adwinwhite

rustbot has assigned @adwinwhite.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 73 candidates
  • Random selection from 18 candidates

@saethlin

Copy link
Copy Markdown
MemberAuthor

r? JonathanBrouwer

@JonathanBrouwer

Copy link
Copy Markdown
Member

@bors r+ rollup

@rust-bors

rust-borsBot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 96bf9d6 has been approved by JonathanBrouwer

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 1. This pull request will be tested once the tree is reopened.

@rust-borsrust-borsBot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 27, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member

@bors p=1 to unblock ci

@rust-bors

This comment has been minimized.

rust-borsBot pushed a commit that referenced this pull request Jun 27, 2026
…athanBrouwer
Revert "LLVM 23: Adapt codegen test to moved assume"
This reverts #158067.
Fixes#158500
The fix that was applied here is not robust against layout randomization, specifically the IR to load through the slice head pointer needs to come after a gepi, and not just a `load ptr, ptr %x`.
Based on the PR discussion, I think it's possible that the `min-llvm-version: 22` was mistakenly added when CI happened to choose the bad layout during the initial merge.
I'm not yet sure what the right fix is, but this is causing about half of all merges to fail right now so a revert seems prudent.
I don't think we have a way to skip tests when randomize-layout is set. The problem here is that we run codegen tests against the globally-configured sysroot, so setting `-Zrandomize-layout` in the test doesn't do anything.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 27, 2026
…-fix, r=JonathanBrouwer
Revert "LLVM 23: Adapt codegen test to moved assume"
This reverts rust-lang#158067.
Fixesrust-lang#158500
The fix that was applied here is not robust against layout randomization, specifically the IR to load through the slice head pointer needs to come after a gepi, and not just a `load ptr, ptr %x`.
Based on the PR discussion, I think it's possible that the `min-llvm-version: 22` was mistakenly added when CI happened to choose the bad layout during the initial merge.
I'm not yet sure what the right fix is, but this is causing about half of all merges to fail right now so a revert seems prudent.
I don't think we have a way to skip tests when randomize-layout is set. The problem here is that we run codegen tests against the globally-configured sysroot, so setting `-Zrandomize-layout` in the test doesn't do anything.
@rust-borsrust-borsBot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 27, 2026
@rust-bors

rust-borsBot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 47ab177 failed: CI. Failed job:

rust-borsBot pushed a commit that referenced this pull request Jun 27, 2026
…uwer
Rollup of 10 pull requests
Successful merges:
- #158502 (Revert "LLVM 23: Adapt codegen test to moved assume")
- #152225 (Add supertrait item shadowing for type-level path resolution)
- #158194 (Adds RmetaLinkCache a per-link cache that uses path as the key of dec…)
- #158466 (rustdoc: show impl Trait<Box<Local>> for Foreign, etc on Local's docs)
- #158501 (miri subtree update)
- #153097 (Expand `OptionFlatten`'s iterator methods)
- #158163 (Fix too-short variance slice in `variances_of` cycle recovery)
- #158233 (Allow the unstable attribute on foreign type)
- #158470 (Upgrade `jsonsocck` and `jsondoclint` to edition 2024.)
- #158488 (Upgrade `rustdoc-json-types` to 2024 edition.)
@JonathanBrouwer

Copy link
Copy Markdown
Member

@bors retry
@bors treeclosed=2

@rust-borsrust-borsBot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 27, 2026
@rust-bors

rust-borsBot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Tree closed for PRs with priority less than 2.

rust-borsBot pushed a commit that referenced this pull request Jun 27, 2026
…uwer
Rollup of 10 pull requests
Successful merges:
- #158502 (Revert "LLVM 23: Adapt codegen test to moved assume")
- #152225 (Add supertrait item shadowing for type-level path resolution)
- #158194 (Adds RmetaLinkCache a per-link cache that uses path as the key of dec…)
- #158466 (rustdoc: show impl Trait<Box<Local>> for Foreign, etc on Local's docs)
- #158501 (miri subtree update)
- #153097 (Expand `OptionFlatten`'s iterator methods)
- #158163 (Fix too-short variance slice in `variances_of` cycle recovery)
- #158233 (Allow the unstable attribute on foreign type)
- #158470 (Upgrade `jsonsocck` and `jsondoclint` to edition 2024.)
- #158488 (Upgrade `rustdoc-json-types` to 2024 edition.)
@rust-borsrust-borsBot mentioned this pull request Jun 27, 2026
rust-borsBot pushed a commit that referenced this pull request Jun 27, 2026
…uwer
Rollup of 10 pull requests
Successful merges:
- #158502 (Revert "LLVM 23: Adapt codegen test to moved assume")
- #152225 (Add supertrait item shadowing for type-level path resolution)
- #158194 (Adds RmetaLinkCache a per-link cache that uses path as the key of dec…)
- #158466 (rustdoc: show impl Trait<Box<Local>> for Foreign, etc on Local's docs)
- #158501 (miri subtree update)
- #153097 (Expand `OptionFlatten`'s iterator methods)
- #158163 (Fix too-short variance slice in `variances_of` cycle recovery)
- #158233 (Allow the unstable attribute on foreign type)
- #158470 (Upgrade `jsonsocck` and `jsondoclint` to edition 2024.)
- #158488 (Upgrade `rustdoc-json-types` to 2024 edition.)
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

A job failed! Check out the build log: (web)(plain enhanced)(plain)

Click to see the possible cause of the failure (guessed by this bot)
 IMAGE: dist-ohos-aarch64
##[endgroup]
Updating crates.io index
error: failed to get `adler2` as a dependency of package `miniz_oxide v0.8.8`
... which satisfies dependency `miniz_oxide = "^0.8.5"` of package `flate2 v1.1.9`
... which satisfies dependency `flate2 = "^1.1.9"` of package `citool v0.1.0 (/home/runner/work/rust/rust/src/ci/citool)`
Caused by:
failed to load source for dependency `adler2`
Caused by:
unable to update registry `crates-io`
Caused by:
download of ad/le/adler2 failed
Caused by:
curl failed
Caused by:

rust-borsBot pushed a commit that referenced this pull request Jun 27, 2026
…uwer
Rollup of 10 pull requests
Successful merges:
- #158502 (Revert "LLVM 23: Adapt codegen test to moved assume")
- #152225 (Add supertrait item shadowing for type-level path resolution)
- #158194 (Adds RmetaLinkCache a per-link cache that uses path as the key of dec…)
- #158466 (rustdoc: show impl Trait<Box<Local>> for Foreign, etc on Local's docs)
- #158501 (miri subtree update)
- #153097 (Expand `OptionFlatten`'s iterator methods)
- #158163 (Fix too-short variance slice in `variances_of` cycle recovery)
- #158233 (Allow the unstable attribute on foreign type)
- #158470 (Upgrade `jsonsocck` and `jsondoclint` to edition 2024.)
- #158488 (Upgrade `rustdoc-json-types` to 2024 edition.)
@dianqk

Copy link
Copy Markdown
Member

@bors retry

@rust-bors

rust-borsBot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

❗ You can only retry pull requests that are approved and have a previously failed auto build.

@dianqk

Copy link
Copy Markdown
Member

Tree closed for PRs with priority less than 2.

@bors p=2

@rust-bors

This comment has been minimized.

@rust-borsrust-borsBot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 28, 2026
@rust-bors

rust-borsBot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 14m 2s
Pushing 8b95a26 to main...

@rust-bors
rust-borsBot merged commit 8b95a26 into rust-lang:mainJun 28, 2026
14 checks passed
@rustbotrustbot added this to the 1.98.0 milestone Jun 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 13f1859 (parent) -> 8b95a26 (this PR)

Test differences

Show 4 test diffs

Stage 1

  • [codegen] tests/codegen-llvm/issues/issue-107681-unwrap_unchecked.rs: ignore (ignored when the LLVM version 21.1.2 is older than 22.0.0) -> pass (J0)

Stage 2

  • [codegen] tests/codegen-llvm/issues/issue-107681-unwrap_unchecked.rs: ignore (ignored when the LLVM version 21.1.2 is older than 22.0.0) -> pass (J1)

Additionally, 2 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 8b95a26baf5820929d86a844317160905e7b325b --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-gnu-gcc-core-tests: 14m 4s -> 7m 57s (-43.5%)
  2. i686-msvc-2: 1h 30m -> 2h 3m (+36.2%)
  3. dist-sparcv9-solaris: 1h 12m -> 1h 35m (+32.2%)
  4. pr-check-2: 40m 11s -> 27m 24s (-31.8%)
  5. test-various: 2h 8m -> 1h 28m (-31.0%)
  6. i686-gnu-nopt-1: 2h 20m -> 1h 37m (-31.0%)
  7. x86_64-gnu-debug: 2h 10m -> 1h 30m (-30.8%)
  8. dist-aarch64-linux: 2h 34m -> 1h 48m (-29.5%)
  9. dist-i586-gnu-i586-i686-musl: 1h 17m -> 1h 39m (+28.6%)
  10. x86_64-mingw-1: 2h 59m -> 2h 9m (-27.7%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (8b95a26): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

Results (primary -5.8%, secondary 1.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
5.7%[2.6%, 8.7%]2
Improvements ✅
(primary)
-5.8%[-5.8%, -5.8%]1
Improvements ✅
(secondary)
-8.0%[-8.0%, -8.0%]1
All ❌✅ (primary)-5.8%[-5.8%, -5.8%]1

Cycles

Results (primary 2.1%, secondary 1.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

meanrangecount
Regressions ❌
(primary)
2.1%[2.1%, 2.1%]1
Regressions ❌
(secondary)
1.8%[1.8%, 1.8%]1
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)2.1%[2.1%, 2.1%]1

Binary size

Results (secondary -0.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-0.0%[-0.0%, -0.0%]1
All ❌✅ (primary)--0

Bootstrap: 485.121s -> 486.43s (0.27%)
Artifact size: 393.65 MiB -> 393.64 MiB (-0.00%)

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spurious test failure codegen-llvm/issue-107681-unwrap_unchecked.rs

7 participants

@saethlin@rustbot@JonathanBrouwer@rust-log-analyzer@dianqk@rust-timer@adwinwhite