Files
AnyPS5/docs/dev
Mouad-Scriptz-0andClaude Fable 5.1 0a9ee3698a perf(recompiler): keep LDS loads branched and drop the LDS sentinel
NVIDIA's compiler predicates a branched LDS load at no cost, while the
selected form costs about 2.5 instructions per dword and splits a
ds_read_b128 into four loads (RTX 4060 measurements by @karanvora2599 in
loads therefore keep the branch of main, in workgroup, function and device
memory alike, and the sentinel dword that only they read goes away: the LDS
array is the program's dwords plus the lock again, and the device-memory
decision reserves the lock alone. The sentinel budget tests become lock
budget tests at that boundary, and the guarded-load test pins the branch.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-10-17 12:19:09 +13:00
..