Repository navigation
Fix integer casts extending based on the signedness of the destination - #708
Merged
Merged
Conversation
nazar-pc
requested review from
Firestar99,
LegNeato and
eddyb
as code owners
November 18, 2026 08:27
nazar-pc
force-pushed
the
fix-integer-casts
branch
from
November 18, 2026 08:50
830b7d8 to
d50b00c
Compare
Member
|
Let me make you a difftest for this, perfect oppertunity to compare host vs rust-gpu results |
Firestar99
force-pushed
the
fix-integer-casts
branch
from
November 18, 2026 11:46
d50b00c to
b3aa20c
Compare
Contributor
Author
|
CI seems happy and I have another PR stacked on this one 🙏 |
…estination `intcast` chose between `OpSConvert` and `OpUConvert` by the signedness of the destination type and ignored `is_signed`, which describes the source. So `i8 as u32` zero-extended and `u8 as i32` sign-extended. Extend based on the source signedness instead. `OpUConvert` requires an unsigned result type, so zero extension to a signed type converts to the unsigned type of the same width and bitcasts.
Firestar99
force-pushed
the
fix-integer-casts
branch
from
November 18, 2026 12:36
b3aa20c to
89a9766
Compare
Member
|
rebased it on main, CI should pass now |
Firestar99
approved these changes
Nov 18, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 18, 2026
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.
Found this while working on something quite different, but worth sending separately