compute: accept v_cmp_ne_i32 as a vcc_lo lane guard #2110
No reviewers
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!2110
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2110/head"
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?
@Leyukaka on GitHub · 2026-11-25 00:34 UTC · original
Leyukaka:compute/v-cmp-ne-i32-guard→main· +73 −14 · 6 files · 2 commits · merged 2026-11-25 00:46 UTCPart of #2022 (item G,
v_cmp_ne_i32).The lane guard in
tools/compute_store_aot.pyaccepted onlyv_cmp_{gt,lt,ge,le}_u32_e32 vcc_lo, src0, vNbefores_and_saveexec_b32. This adds integer inequality.v_cmp_ne_i32_e32 vcc_lo, src0, vN: source 0 is an integer immediate, or a resolved SGPR or VGPR; source 1 is a VGPR.v_cmp_ne_i32_e64 vcc_lo, src0, src1: source 1 may also be a resolved SGPR or an integer immediate.!=on the two 32-bit words. Inequality is the same for signed and unsigned words, so the existing unsigned guard path serves both.ALU_SOURCE/alu_word). The verified-word rule is unchanged: a word read from a source buffer or computed by ALU in the program is still refused as a guard operand.v_cmpx, destinations other thanvcc_lo, source modifiers, and VGPRs beyondv255.v_cmp_ne_u32is not added here, although its lowering would be identical.Tests
The check covers:
-1,0x80000000,0) and VGPR operands;_e32,vcc_hi, an SGPR destination, a negated source,v_cmpx, an unset SGPR, an SGPR holding a descriptor word,v256in source 1, an out-of-range literal, and a word computed in the program (s_add_u32) in_e64source 1;neto==, which must change the emitted guard.Registered as
compute_alu_cmp_ne_controlsand added to the pure-Python lists. The existing controls incompute_store_check.pyandcompute_lane_mask_check.py, which exercise the unsigned guard, still pass with the shared parser.Negative control: against the previous
tools/compute_store_aot.py, the check fails withUnsupported compute instruction: v_cmp_ne_i32_e32 vcc_lo, s3, v0.AI-assisted.