compute: accept v_cmp_ne_i32 as a vcc_lo lane guard #2103
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2110"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-25T00:34:47Z.
Part 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.