Skip to content

cg_LLVM: Stop needing an alloca for volatile loads#157127

Open
scottmcm wants to merge 1 commit into
rust-lang:mainfrom
scottmcm:tweak-layout-of-alternative
Open

cg_LLVM: Stop needing an alloca for volatile loads#157127
scottmcm wants to merge 1 commit into
rust-lang:mainfrom
scottmcm:tweak-layout-of-alternative

Conversation

@scottmcm
Copy link
Copy Markdown
Member

@scottmcm scottmcm commented May 29, 2026

This ended up also being reimplementing it to not use load of the llvm_type, since without doing that everything blew up horribly. cc the zulip conversation #t-opsem > Defining volatile splitting @ 💬.

And while I'm here, improve the tests to check that the unaligned ones are actually unaligned, since unaligned_volatile_load::<u8> doesn't actually test anything.

r? @nikic
cc @RalfJung
MCP tracking issue #153250

And while I'm here, improve the tests to check that the unaligned ones are actually unaligned, since `unaligned_volatile_load::<u8>` doesn't actually test anything.
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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 29, 2026
@scottmcm scottmcm added the A-codegen Area: Code generation label May 29, 2026
Comment thread compiler/rustc_codegen_llvm/src/intrinsic.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-codegen Area: Code generation A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants