Recompiler: a bridged v_cmp writes 0 for the lanes outside EXEC (#2458) #2507
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2507
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2507/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?
@xpatfussy69x on GitHub · 2026-11-25 21:07 UTC · original
xpatfussy69x:recompiler/bridged-v-cmp-exec→main· +34 −3 · 2 files · 1 commits · closed without mergingPart of #2458 (bug 1 only). In the per-lane form, a
V_CMP_*that goes through #1426's lowering (float, 16- and 64-bit,V_CMP_CLASS, VOP3-modified) kept its raw result in the lanes outside EXEC, where the console writes 0.lane_masksnever guards aV_CMP, so the bridge ran it with the guardtrue, andfe78c81masked the result with EXEC only forv_cmpx. Under a narrowed EXEC, a later branch orv_cndmaskon VCC then saw those lanes as set. Every bridgedV_CMP*now ANDs its lane bit with EXEC, as the per-lane form's own U32/I32 compares already do.What is in it
crates/xcl/src/gpu/recomp/lower.rs: the bridge takes the lane's EXEC bit into the result of everyV_CMP*, not onlyV_CMPX*crates/xcl/src/gpu/recomp/lower_dxil.rs:a_bridged_v_cmp_writes_0_for_the_lanes_outside_exec: EXEC = lanes 0–15,v_cmp_le_f32true in every lane, EXEC restored,v_cndmaskon VCC. Fails without the fix (7 in lane 16), passes with itTested
cargo test --workspace -- --test-threads=4: 1422 passed, 0 failed, 46 ignoredV_MUL_F16/V_PK_MUL_F16/V_CVT_F16_F32(onmaintoo; #2182 removes them)cargo test -p xcl --lib a_bridged_v_cmp: 2 passed (the new test and the existingv_cmpxone)Regression run
main:
PR:
Not tested
v_cmpunder a narrowed EXEC (smoke run with default settings, notXCL_PER_LANE=1): it is a regression check only. The frame difference is most likely run-to-run variance in loadingNULL); #2136 touchesNULLdestinations inupper_lanesAI use
@SlopTart on GitHub · 2026-11-25 21:15 UTC · original
gpu_suite (cold cache): 164 passed / 3 failed, no crashes. The three are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, promoted-UAV-clear driver gap, PR #2490); none caused by this PR.Targeted run of
a_bridged_v_cmp_writes_0_for_the_lanes_outside_exec: passed. Pairs with #2503's test (a_bridged_v_cmp_clears_inactive_lanes_outside_exec), also green here.@xpatfussy69x on GitHub · 2026-11-25 21:23 UTC · original
Closing as a duplicate of #2503, which makes the same change to
Lower::bridgeand was opened first. I'll post this branch's test and smoke results there instead.@DavidM1911 on GitHub · 2026-11-25 21:24 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
Pull request closed