Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ICE in non-operand aggregate_raw_ptr intrinsic codegen #125184

Merged
merged 1 commit into from
May 18, 2024

Conversation

scottmcm
Copy link
Member

@scottmcm scottmcm commented May 16, 2024

Introduced in #123840
Found in #121571, cc @clarfonthey

@rustbot
Copy link
Collaborator

rustbot commented May 16, 2024

r? @fee1-dead

rustbot has assigned @fee1-dead.
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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 16, 2024
@scottmcm scottmcm changed the title Fix ICE in non-operand aggregate_raw_ptr instrinsic codegen Fix ICE in non-operand aggregate_raw_ptr intrinsic codegen May 16, 2024
use std::intrinsics::aggregate_raw_ptr;

// InstSimplify replaces these with casts if it can, which means they're almost
// never seen in codegen, but PR#121571 found a way, so add a test for it.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ICE demonstration: https://godbolt.org/z/Y7o63MzPn

@clarfonthey
Copy link
Contributor

clarfonthey commented May 16, 2024

Hmm, I might be doing something wrong, but this doesn't seem to actually fix the issue encountered in #121571; rebased on this commit and still running into the same ICE. I pushed the rebased version onto that branch for you to test, which should also help verify if it's still breaking on CI and isn't just my setup.

EDIT: Yup, it's still happening on CI. #121571 (comment)

EDIT 2: Oh, it's just that the bug is in the bootstrap compiler. :(

@fee1-dead
Copy link
Member

r? compiler

@rustbot rustbot assigned jieyouxu and unassigned fee1-dead May 18, 2024
Copy link
Contributor

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! The changes look good to me.

@jieyouxu
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Contributor

bors commented May 18, 2024

📌 Commit f60f2e8 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors 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 May 18, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request May 18, 2024
…iaskrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#125117 (Improve parser)
 - rust-lang#125184 (Fix ICE in non-operand `aggregate_raw_ptr` intrinsic codegen)
 - rust-lang#125240 (Temporarily revert to NonZeroUsize in rustc-abi to fix building on stable)
 - rust-lang#125248 (Migrate `run-make/rustdoc-scrape-examples-invalid-expr` to `rmake.rs`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit e4e7568 into rust-lang:master May 18, 2024
6 checks passed
@rustbot rustbot added this to the 1.80.0 milestone May 18, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 18, 2024
Rollup merge of rust-lang#125184 - scottmcm:fix-thin-ptr-ice, r=jieyouxu

Fix ICE in non-operand `aggregate_raw_ptr` intrinsic codegen

Introduced in rust-lang#123840
Found in rust-lang#121571, cc `@clarfonthey`
@scottmcm scottmcm deleted the fix-thin-ptr-ice branch May 19, 2024 01:35
@saethlin saethlin added the beta-nominated Nominated for backporting to the compiler in the beta channel. label May 24, 2024
@saethlin
Copy link
Member

I would like this in beta so that the stage0 compiler does not ICE if it gets passed -Zmir-opt-level=0. Yes I can work around this issue without huge difficulty, but the diff here is so small.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-nominated Nominated for backporting to the compiler in the beta channel. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant 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.

None yet

7 participants