Repository navigation
fix(mir-lower): stabilize shared pointer union storage - #1335
Open
YunusMutlu wants to merge 1 commit into
Open
YunusMutlu wants to merge 1 commit into
YunusMutlu wants to merge 1 commit into
Conversation
Fixes NVIDIA#1334 Signed-off-by: Yunus Mutlu <mutluyunus708@gmail.com>
YunusMutlu
force-pushed
the
fix/union-shared-pointer-storage
branch
from
October 13, 2026 10:59
20339f7 to
b6ad993
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.
Fixes #1334
Summary
Fix union lowering for shared-memory pointer fields whose physical width depends on the selected backend data layout. Under modern NVVM (
p3:32), an AS3 pointer could previously become a 32-bit store into union storage that was subsequently read through an 8-byte field. This change uses the existing target-stable storage machinery for union fields and converts between semantic and physical representations at union insert/extract boundaries.Changes
Testing
just checkpasses (the local mirror of CI: fmt, clippy, tests, guards, docs)cargo oxide run union_aggregatepasses on sm_86 (union_aggregate: PASS)mir-lowertests)Additional verification:
cargo test -p mir-lowerpasses.git diff --checkpasses.upstream/mainatec4aa479when compiling forsm_120.p3:32layout.union_aggregateruntime example still passes on sm_86 hardware.Checklist
git commit -s)