Repository navigation
fix(mir-lower): preserve address spaces through 16-byte enum fillers - #1332
Open
YunusMutlu wants to merge 1 commit into
Open
YunusMutlu wants to merge 1 commit into
YunusMutlu wants to merge 1 commit into
Conversation
Signed-off-by: Yunus Mutlu <mutluyunus708@gmail.com>
YunusMutlu
force-pushed
the
fix/enum-filler-global-load
branch
from
October 13, 2026 10:51
c626c73 to
55b5c39
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Preserve known global pointer address spaces when lowering niche-encoded enums with a layout-neutral 16-byte filler. Representing the filler as
[2 x i64]instead of[16 x i8]allows aggregate scalarization to retain the pointer's global address space, restoringld.global/st.globalcodegen for the affected vector load and store paths.Fixes #1331
Changes
[2 x i64].vectorizationregressions for both load and store paths through a wideOptionpayload.ld.global.v4.b32andst.global.v4.b32.Testing
just checkpasses (the local mirror of CI: fmt, clippy, tests, guards, docs)cargo oxide run vectorization --arch sm_86passesAdditional validation:
cargo test -p mir-lowercargo clippy --workspace --all-targets -- -D warnings(cd crates/rustc-codegen-cuda && cargo clippy --all-targets -- -D warnings)git diff --checksm_86that the load changes fromld.v4.b32/LD.E.128told.global.v4.b32/LDG.E.128sm_86that the store changes fromst.v4.b32/ST.E.128tost.global.v4.b32/STG.E.128Checklist
git commit -s)