fix(cuda_std): pack warp shuffle/match return into i64 for LLVM 19 verifier - #391
Open
brandonros wants to merge 1 commit into
Open
fix(cuda_std): pack warp shuffle/match return into i64 for LLVM 19 verifier#391brandonros wants to merge 1 commit into
brandonros wants to merge 1 commit into
Conversation
…rifier
LLVM 19's verifier rejects the `align N` return-attribute that rustc's
C ABI lowering attaches to calls returning small aggregates like
{ i32, i8 } (align is only valid on pointer returns). Three intrinsic
wrappers in libintrinsics.ll triggered this:
- __nvvm_warp_shuffle
- __nvvm_warp_match_all_32
- __nvvm_warp_match_all_64
Switch their return type from { i32, i8 } to a packed i64 (low 32 bits
= value, bit 32 = predicate). Primitive integer return ⇒ no struct ABI
⇒ no spurious return-attribute. Uses only LLVM 1.0-era IR primitives
(zext/shl/or), so it's safe under both LLVM 7 (CUDA 12.x libnvvm) and
LLVM 19 (CUDA 13.x libnvvm). Removes the now-redundant
WarpShuffleResult struct.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
brandonros
force-pushed
the
llvm-19-fixes
branch
from
August 14, 2026 11:51
2f4fd1d to
564e2e1
Compare
brandonros
marked this pull request as ready for review
August 14, 2026 11:52
Contributor
Author
|
@LegNeato if we could land this one please, thank you very much |
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.
if we land #386 this becomes smaller, opening it for now
fixes