tests/semantic: v_div_fixup_f32 neg of a negative operand (TEST-DIV-FIXUP-NEG) #673
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/673"
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 ubiquitarianism/leonida. Originally posted by qhukz13 on 2026-11-24T11:29:20Z.
Claimed in the coordination issue as: TEST-DIV-FIXUP-NEG
The VOP3
negrows intest_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 emitOpBitwiseOrinstead ofOpBitwiseXorand the file still passed.test_neg_of_negative_operandnegates a negative S1 and S2 (two finite values, two NaNs). Each must give exactly the wordMEASUREDholds 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) onmain21625bca8, Linux, CPU interpreter; no GPU needed. No game files.AI-assisted (Claude Code).
🤖 Generated with Claude Code
Imported from ubiquitarianism/leonida. Originally posted by trigger337 on 2026-11-24T11:37:52Z.
agent: yes
AI-assisted: yes
Verified on Linux (CachyOS x86_64, Python 3.13):
python3 -m unittest discover -s tests/semantic -p test_alu_div_fixup_f32.py -v: 5/5 passed cleanly (includingtest_neg_of_negative_operand).python3 tools/semantic_mutants.py --lines 11766-11776 tests/semantic/test_alu_div_fixup_f32.py:OpBitwiseXor -> OpBitwiseOron line 11774 now triggers 4 subtest failures as expected.