pixel_aot: lower the 64-bit integer compares v_cmp_*_{i64,u64} #794
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows#794
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@JB2WIN on GitHub · 2026-11-23 04:43 UTC · original
pixel_aotlowers the 16- and 32-bit integer compares, but not the 64-bit ones:v_cmp_{f,lt,eq,le,gt,ne,ge,t}_{i64,u64}, which are 16 VOPC forms plus their 16_e64spellings indocs/coverage/gfx1013.tsv.tests/form_coverage_check.pycurrently listsv_cmp_lt_i64/v_cmp_lt_u64as uncovered neighbours.I'd like to take these. They need one thing the translator does not have yet, VGPR pair sources (
v[a:a+1]), so I'm asking about the shape first.Proposed first slice:
Sources:
v[a:a+1]whose two registers hold tracked numeric values (low word inva, high word inva+1);scalar_u64;32-bit literals stay refused until their extension rule is pinned with an LLVM 15 round trip.
Compare: the result is the same per-lane condition the 32-bit compares produce, so
v_cndmask_b32and the existing lane-mask consumers read it unchanged.f/tare constants.Refused:
v_cmpx_*(exec-writing), source modifiers, misaligned or out-of-range pairs, and pending scalar loads or outstanding samples.Tests: an integer-export draw that selects distinct words with
v_cndmask_b32per predicate. The word pairs make a 32-bit compare of either half disagree with the 64-bit result: equal high words with different low words, sign-bit-only, -1 against 0, and0x7fffffff_ffffffffagainst0x80000000_00000000. Mutations: signed as unsigned, high/low swapped, and only the low words compared. Plus form coverage, the LLVM 15 binary round trip and scanner support.Does this fit, or would you rather VGPR pairs arrive first as their own small change? AI-assisted (Claude Code).
@JB2WIN on GitHub · 2026-11-23 04:44 UTC · original
A correction to my proposal, from LLVM 15.0.7 on
gfx1013:v_cmp_lt_u64 vcc_lo, v[3:4], v[4:5]assembles to[0x03,0x09,0xc2,0x7d], so the first slice would accept them, not refuse them._e32suffix.vcc_lo;s[10:11]is rejected.0x12345678) assembles. I still plan to refuse it until its 64-bit extension rule is sourced.@R0Y00 on GitHub · 2026-11-23 04:53 UTC · original
Proceed with the bounded register-pair slice. Accept the unaligned VGPR pairs demonstrated by LLVM 15 and keep the 32-bit literal extension outside the first change until independently established. Add cases with identical high words and distinct low words, high words that differ only in sign for signed versus unsigned ordering, and a source pair overlapping the other source. Preserve each operand’s original bit pattern in the comparison. Keep wave32/e32 and e64 destination rules explicit, and include an invalid pair or destination control.
@R0Y00 on GitHub · 2026-11-23 08:09 UTC · original
The bounded 64-bit comparison slice landed in #803 (
06c8bf8). The LLVM 15 round trip and WARP comparisons cover the high-word, low-word, signedness and overlapping-register cases. Explicit e32 destination checks remain in place. The 32-bit literal extension stays outside this slice.