Improve 3 functions, match 1 - #3307
Merged
MarkMcCaskey merged 1 commit intoSep 4, 2026
Merged
Conversation
Widen four integer type declarations that caused MWCC to emit width and signedness conversions retail does not have. gm_801B5324 arg1 -> s32 (matches), fn_8016B388 arg1 -> int, mn_80230D18 arg2 -> int, and ifStock_802F8298_get_flag returns u8. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BYEhCxFv7n35cBTiKK8e3L
Report for GALE01 (3bf5523 - 88799d7)📈 Matched code: 95.45% (+0.02%, +768 bytes) ✅ 1 new match
📈 3 improvements in unmatched items
|
usehoplite Bot
pushed a commit
to taiwancodex/melee
that referenced
this pull request
Sep 4, 2026
Widen four integer type declarations that caused MWCC to emit width and signedness conversions retail does not have. gm_801B5324 arg1 -> s32 (matches), fn_8016B388 arg1 -> int, mn_80230D18 arg2 -> int, and ifStock_802F8298_get_flag returns u8. Claude-Session: https://claude.ai/code/session_01BYEhCxFv7n35cBTiKK8e3L Co-authored-by: titus-ssbm <306849928+titus-ssbm@users.noreply.github.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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 four integer type declarations that caused MWCC to emit width and
signedness conversions that retail does not have.
When an argument is passed to a parameter narrower than itself, MWCC emits a
conversion at the call site (
extsb,extsh,clrlwi). When the declared typeis wide enough, no conversion is emitted. Retail's codegen therefore pins the
width of each parameter: a plain register copy where we emit a mask means the
declaration is too narrow, and a mask where we emit a plain copy means it is too
wide. This is the
s8-is-usually-an-intcase described in CONTRIBUTING.gm_801B5324:arg1widened tos32. The indirect call throughx54nownarrows its first argument as retail does. Matches.
fn_8016B388:arg1widened toint, removing anextshin the callerfn_801891F4(99.517 -> 99.786).mn_80230D18:arg2widened toint, removing anextsbin the callermn_80230E38(99.843 -> 99.961).ifStock_802F8298_get_flag: return type changed tou8. The getter and alater direct read of the same byte are one common subexpression, so the
getter's
intwas carried into a comparison that retail performs unsigned(
cmpwi->cmplwi), improvingifStock_802F8298(97.064 -> 97.191).gm_801B5324is the one case wheres32andintare not interchangeable: itmatches with
s32and regresses withint.Claude Opus 5 did the function matching work.