[PR #993] [MERGED] tests/semantic: wave32 s_cbranch_vccz/vccnz read vcc_lo only (TEST-W32-VCCZ-VCC-HI) #1032

Closed
opened 2026-11-26 20:19:51 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/993
Author: @qhukz13
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @QemmHD

Base: main ← Head: cont/wave32-vccz-vcc-hi


📝 Commits (1)

  • 7c59c18 tests/semantic: wave32 s_cbranch_vccz/vccnz read vcc_lo only (TEST-W32-VCCZ-VCC-HI)

📊 Changes

1 file changed (+43 additions, -0 deletions)

View changed files

📝 tests/semantic/test_wave64_vcc_data_branch.py (+43 -0)

📄 Description

Claimed in the coordination issue as: TEST-W32-VCCZ-VCC-HI

In wave32, VCC is vcc_lo alone and vcc_hi is an ordinary SGPR. branch_condition in tools/rdna2spirv.py reads %vcc_hi only under wave64 (if g.wave64 and "vcc" not in g.cur_masks), and the reference model in tests/semantic/test_control_flow_vcc.py (eval_vccz masks VCC to the wave size) assumes the same, but no test pinned it: with tools/semantic_mutants.py (#734), and -> or on that line survived all four test files that reach branch_condition, run together.

Wave32VccDataBranchTests in tests/semantic/test_wave64_vcc_data_branch.py, next to the wave64 class, runs the same programs without the 64-bit op that selects wave64, as two 32-lane subgroups, with SGPR-sourced and constant VCC writes: vcc_lo = 0 with vcc_hi != 0 takes s_cbranch_vccz and falls through s_cbranch_vccnz.

Test only. Tested: the file passes (5 tests); with the and -> or mutant it gives 4 failures. scripts/check_no_game_data.py: OK. Linux, CPU only; no GPU, no game files. No hardware measurement of the wave32 rule is in the repository; the test pins the translator's and the reference model's shared assumption.

AI-assisted (Claude Code).

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/993 **Author:** [@qhukz13](https://github.com/qhukz13) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@QemmHD](https://github.com/QemmHD) **Base:** `main` ← **Head:** `cont/wave32-vccz-vcc-hi` --- ### 📝 Commits (1) - [`7c59c18`](https://github.com/ubiquitarianism/leonida/commit/7c59c185b0a4e9be2d70b47fedb231f1fca03167) tests/semantic: wave32 s_cbranch_vccz/vccnz read vcc_lo only (TEST-W32-VCCZ-VCC-HI) ### 📊 Changes **1 file changed** (+43 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `tests/semantic/test_wave64_vcc_data_branch.py` (+43 -0) </details> ### 📄 Description Claimed in the coordination issue as: TEST-W32-VCCZ-VCC-HI In wave32, VCC is `vcc_lo` alone and `vcc_hi` is an ordinary SGPR. `branch_condition` in `tools/rdna2spirv.py` reads `%vcc_hi` only under wave64 (`if g.wave64 and "vcc" not in g.cur_masks`), and the reference model in `tests/semantic/test_control_flow_vcc.py` (`eval_vccz` masks VCC to the wave size) assumes the same, but no test pinned it: with `tools/semantic_mutants.py` (#734), `and -> or` on that line survived all four test files that reach `branch_condition`, run together. `Wave32VccDataBranchTests` in `tests/semantic/test_wave64_vcc_data_branch.py`, next to the wave64 class, runs the same programs without the 64-bit op that selects wave64, as two 32-lane subgroups, with SGPR-sourced and constant VCC writes: `vcc_lo = 0` with `vcc_hi != 0` takes `s_cbranch_vccz` and falls through `s_cbranch_vccnz`. Test only. Tested: the file passes (5 tests); with the `and -> or` mutant it gives 4 failures. `scripts/check_no_game_data.py`: OK. Linux, CPU only; no GPU, no game files. No hardware measurement of the wave32 rule is in the repository; the test pins the translator's and the reference model's shared assumption. AI-assisted (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:19:51 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1032
No description provided.