[PR #673] [MERGED] tests/semantic: v_div_fixup_f32 neg of a negative operand (TEST-DIV-FIXUP-NEG) #714

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

📋 Pull Request Information

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

Base: main ← Head: cont/div-fixup-neg


📝 Commits (1)

  • 0253b38 tests/semantic: v_div_fixup_f32 neg of a negative operand (TEST-DIV-FIXUP-NEG)

📊 Changes

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

View changed files

📝 tests/semantic/test_alu_div_fixup_f32.py (+33 -0)

📄 Description

Claimed in the coordination issue as: TEST-DIV-FIXUP-NEG

The VOP3 neg rows in test_alu_div_fixup_f32.py (section 9) negate only positive inputs. There an OR with the sign bit gives the same word as the flip, so _raw_f32_bits (tools/rdna2spirv.py:11774) could emit OpBitwiseOr instead of OpBitwiseXor and the file still passed.

test_neg_of_negative_operand negates a negative S1 and S2 (two finite values, two NaNs). Each must give exactly the word MEASURED holds for the unmodified row with the positive value, so every expectation comes from a gfx1036 measurement already in the file (the test asserts that the base row is there). No new hardware values are introduced.

tools/semantic_mutants.py --lines 11766-11776 tests/semantic/test_alu_div_fixup_f32.py: 5 of 6 mutants caught before, 6 of 6 after (XOR -> OR now fails 4 subtests).

Test only, no translator change. Tested: python -m unittest discover -s tests/semantic -p test_alu_div_fixup_f32.py (5 tests OK) on main 21625bca8, Linux, CPU interpreter; no GPU needed. No game files.

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/673 **Author:** [@qhukz13](https://github.com/qhukz13) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@ubiquitarianism](https://github.com/ubiquitarianism) **Base:** `main` ← **Head:** `cont/div-fixup-neg` --- ### 📝 Commits (1) - [`0253b38`](https://github.com/ubiquitarianism/leonida/commit/0253b381c6ea26d783b3bb222830cd3f406e12c1) tests/semantic: v_div_fixup_f32 neg of a negative operand (TEST-DIV-FIXUP-NEG) ### 📊 Changes **1 file changed** (+33 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `tests/semantic/test_alu_div_fixup_f32.py` (+33 -0) </details> ### 📄 Description Claimed in the coordination issue as: TEST-DIV-FIXUP-NEG The VOP3 `neg` rows in `test_alu_div_fixup_f32.py` (section 9) negate only positive inputs. There an OR with the sign bit gives the same word as the flip, so `_raw_f32_bits` (`tools/rdna2spirv.py:11774`) could emit `OpBitwiseOr` instead of `OpBitwiseXor` and the file still passed. `test_neg_of_negative_operand` negates a negative S1 and S2 (two finite values, two NaNs). Each must give exactly the word `MEASURED` holds for the unmodified row with the positive value, so every expectation comes from a gfx1036 measurement already in the file (the test asserts that the base row is there). No new hardware values are introduced. `tools/semantic_mutants.py --lines 11766-11776 tests/semantic/test_alu_div_fixup_f32.py`: 5 of 6 mutants caught before, 6 of 6 after (XOR -> OR now fails 4 subtests). Test only, no translator change. Tested: `python -m unittest discover -s tests/semantic -p test_alu_div_fixup_f32.py` (5 tests OK) on `main` 21625bca8, Linux, CPU interpreter; no GPU needed. No game files. 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:18:48 +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#714
No description provided.