Merge SDWA, class comparison, 64-bit shifts #2490

Closed
KelboLive wants to merge 1 commit from upstream-pr/2498 into main
KelboLive commented 2026-11-25 18:37:35 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-25T18:37:35Z.


Adds tests and translator support for SDWA flags, CMP class comparisons, and 64-bit shift operations.

Files:

  • (+17)
  • (+306)
  • (+270)
  • (+66/-2)

Run: UpdateCTestConfiguration from :D:/Kelbo AI Dashboard Projects/Xbox2Windows/DartConfiguration.tcl
Test project D:/Kelbo AI Dashboard Projects/Xbox2Windows/out/build/dev
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 427
Start 427: startup_gfx2hlsl_cmp_class

427: Test command: "D:\Kelbo AI Dashboard Projects\Xbox2Windows\out\pe-env\Scripts\python.exe" "-B" "D:/Kelbo AI Dashboard Projects/Xbox2Windows/tests/startup_gfx2hlsl_cmp_class_check.py"
427: Working Directory: D:/Kelbo AI Dashboard Projects/Xbox2Windows/out/build/dev
427: Test timeout computed to be: 10000000
427: encodes and decodes the class compare: ok
427: the all-classes mask matches everything: ok
427: the result is written to vcc: ok
427: the exec-mask class compare writes exec: ok
427: the exec-mask form clears exec_known: ok
427: a literal mask is read as an integer: ok
427: a register mask is read as an integer: ok
427: the class helper is emitted in the common preamble: ok
427: the helper separates quiet from signaling NaN: ok
427: encodes and decodes the e32 exec-mask form: ok
427: the e32 exec-mask form lowers: ok
427: the e32 exec-mask form clears exec_known: ok
427: a narrowed exec is intersected with the predicate: ok
427: an absolute value reaches the helper as abs: ok
427: a negated value reaches the helper as a negation: ok
427: the emitted helper agrees with the binary32 classifier on 68626 patterns: ok
427: PASS
1/2 Test #427: startup_gfx2hlsl_cmp_class ....... Passed 2.03 sec
test 430
Start 430: startup_gfx2hlsl_cmp_class_f16

430: Test command: "D:\Kelbo AI Dashboard Projects\Xbox2Windows\out\pe-env\Scripts\python.exe" "-B" "D:/Kelbo AI Dashboard Projects/Xbox2Windows/tests/startup_gfx2hlsl_cmp_class_f16_check.py"
430: Working Directory: D:/Kelbo AI Dashboard Projects/Xbox2Windows/out/build/dev
430: Test timeout computed to be: 10000000
430: encodes and decodes the half class compare: ok
430: the value is the raw half word, not a converted float: ok
430: the all-classes mask matches everything: ok
430: the result is written to vcc: ok
430: an inline half literal keeps its 16-bit pattern: ok
430: the exec-mask half compare writes exec: ok
430: the exec-mask form clears exec_known: ok
430: encodes and decodes the e32 exec-mask half form: ok
430: the e32 form lowers through the half helper: ok
430: an absolute half clears bit 15: ok
430: a negated half flips bit 15: ok
430: a float-printed operand is refused: ok
430: refused: v_cmp_class_f16_e64 s14, -1, v0: ok
430: refused: v_cmp_class_f16_e64 s14, v4, 1.0: ok
430: refused: v_cmp_class_f16_e64 null, v4, v0: ok
430: refused: v_cmp_class_f16_sdwa vcc_lo, v4, v0 src0_sel:WORD_1 src1_sel:DWORD: ok
430: the half class helper is emitted in the common preamble: ok
430: the helper separates quiet from signaling half NaN: ok
430: the emitted helper agrees with the binary16 classifier on all 65536 halves: ok
430: startup gfx2hlsl half class compare checks: ok
2/2 Test #430: startup_gfx2hlsl_cmp_class_f16 ... Passed 1.87 sec

The following tests passed:
startup_gfx2hlsl_cmp_class
startup_gfx2hlsl_cmp_class_f16

100% tests passed out of 2

Total Test time (real) = 3.94 sec

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6611199006 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2498). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-11-25T18:37:35Z. --- Adds tests and translator support for SDWA flags, CMP class comparisons, and 64-bit shift operations. **Files:** - (+17) - (+306) - (+270) - (+66/-2) Run: UpdateCTestConfiguration from :D:/Kelbo AI Dashboard Projects/Xbox2Windows/DartConfiguration.tcl Test project D:/Kelbo AI Dashboard Projects/Xbox2Windows/out/build/dev Constructing a list of tests Done constructing a list of tests Updating test list for fixtures Added 0 tests to meet fixture requirements Checking test dependency graph... Checking test dependency graph end test 427 Start 427: startup_gfx2hlsl_cmp_class 427: Test command: "D:\Kelbo AI Dashboard Projects\Xbox2Windows\out\pe-env\Scripts\python.exe" "-B" "D:/Kelbo AI Dashboard Projects/Xbox2Windows/tests/startup_gfx2hlsl_cmp_class_check.py" 427: Working Directory: D:/Kelbo AI Dashboard Projects/Xbox2Windows/out/build/dev 427: Test timeout computed to be: 10000000 427: encodes and decodes the class compare: ok 427: the all-classes mask matches everything: ok 427: the result is written to vcc: ok 427: the exec-mask class compare writes exec: ok 427: the exec-mask form clears exec_known: ok 427: a literal mask is read as an integer: ok 427: a register mask is read as an integer: ok 427: the class helper is emitted in the common preamble: ok 427: the helper separates quiet from signaling NaN: ok 427: encodes and decodes the e32 exec-mask form: ok 427: the e32 exec-mask form lowers: ok 427: the e32 exec-mask form clears exec_known: ok 427: a narrowed exec is intersected with the predicate: ok 427: an absolute value reaches the helper as abs: ok 427: a negated value reaches the helper as a negation: ok 427: the emitted helper agrees with the binary32 classifier on 68626 patterns: ok 427: PASS 1/2 Test #427: startup_gfx2hlsl_cmp_class ....... Passed 2.03 sec test 430 Start 430: startup_gfx2hlsl_cmp_class_f16 430: Test command: "D:\Kelbo AI Dashboard Projects\Xbox2Windows\out\pe-env\Scripts\python.exe" "-B" "D:/Kelbo AI Dashboard Projects/Xbox2Windows/tests/startup_gfx2hlsl_cmp_class_f16_check.py" 430: Working Directory: D:/Kelbo AI Dashboard Projects/Xbox2Windows/out/build/dev 430: Test timeout computed to be: 10000000 430: encodes and decodes the half class compare: ok 430: the value is the raw half word, not a converted float: ok 430: the all-classes mask matches everything: ok 430: the result is written to vcc: ok 430: an inline half literal keeps its 16-bit pattern: ok 430: the exec-mask half compare writes exec: ok 430: the exec-mask form clears exec_known: ok 430: encodes and decodes the e32 exec-mask half form: ok 430: the e32 form lowers through the half helper: ok 430: an absolute half clears bit 15: ok 430: a negated half flips bit 15: ok 430: a float-printed operand is refused: ok 430: refused: v_cmp_class_f16_e64 s14, -1, v0: ok 430: refused: v_cmp_class_f16_e64 s14, v4, 1.0: ok 430: refused: v_cmp_class_f16_e64 null, v4, v0: ok 430: refused: v_cmp_class_f16_sdwa vcc_lo, v4, v0 src0_sel:WORD_1 src1_sel:DWORD: ok 430: the half class helper is emitted in the common preamble: ok 430: the helper separates quiet from signaling half NaN: ok 430: the emitted helper agrees with the binary16 classifier on all 65536 halves: ok 430: startup gfx2hlsl half class compare checks: ok 2/2 Test #430: startup_gfx2hlsl_cmp_class_f16 ... Passed 1.87 sec The following tests passed: startup_gfx2hlsl_cmp_class startup_gfx2hlsl_cmp_class_f16 100% tests passed out of 2 Total Test time (real) = 3.94 sec
upstream-sync closed this pull request 2026-11-25 21:01:09 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
R0Y00/Xbox2Windows!2490
No description provided.