Commit Graph

5744 Commits

Author SHA1 Message Date
935e582670 Merge upstream main into codex/bary-swap 2026-11-23 04:48:27 +01:00
f0e3baa822 docs: drop the M2 implicit-sample claim the sampler models contradict
The explicit image_sample_lz rows at bias +0.5, 0 and -0.5 all read level 0,
which is what tools/sampler_lod_probe.py's Vulkan nearest rule gives at lambda
0 for each of them, so those rows stand. The implicit-sample parenthetical was
measured on a derivative lambda, not the explicit-LOD path this sentence is
about, and read a level neither model predicts there; it is removed instead of
being documented as part of the rule.
2026-11-22 21:48:02 -06:00
ed2fc36c6c docs: pin the v_cvt_pknorm_{i16,u16}_f16 row to measured gfx1100
38 cases on gfx1100 match the exact-rational model for both widths, including the half order, the clamp and
the infinity behaviour: an infinity saturates exactly like an out-of-range finite, to +-1 before scaling, so
-inf gives -32767 (i16) and 0 (u16) rather than the end of the range.
2026-11-22 21:47:38 -06:00
04d020822d Merge main for reserved texture tile mapping 2026-11-23 00:47:18 -03:00
5fad6246c9 docs: measure sub-dword MUBUF loads and GFX10_FORMAT_8_UINT on gfx1100
Row 242 was CPU-checked and NVIDIA-tested but explicitly not measured on AMD
hardware. Running the four sub-dword loads and FORMAT code 5 as raw compute
kernels on a Radeon RX 7900 XTX pins the zero-/sign-extension, the
dword-crossing ushort at offset 3, the element-size end check at NUM_RECORDS 8,
and the 1-byte end check on the typed 8_UINT path, so the row no longer carries
the "Not GPU-verified" marker.
2026-11-22 21:46:54 -06:00
0f671416cf docs: the 128-byte push-constant limit on AMD RDNA2 iGPUs follows the driver
docs/testing.md said AMD's Windows driver reports 128 bytes of push
constants on RDNA2 iGPUs, as a property of the chips. A Radeon 610M on
AMD 26.11.2 (Windows 32.0.21045.29003) reports 256, and the GPU suite
runs there without the "need 144 push constant bytes" skip. Name the
driver versions the 128 figure was measured on, in docs/testing.md,
the --pc-tail-ubo row of docs/design.md and the D3D-14 paragraph of
docs/d3d12_vulkan.md, and add the 26.11.2 measurement.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-23 04:46:33 +01:00
6b5fc7fc8a docs: pin the sub-dword global store and d16 load row to measured gfx1100
16 cases on gfx1100 use the output buffer as scratch memory: byte and short stores change only the addressed
bytes, the d16_hi forms take the data VGPR's high half, both dword-crossing accesses are exact, and the d16
loads fill one half of vdst and keep the other, with ubyte zero-extending and sbyte sign-extending.
2026-11-22 21:46:33 -06:00
7708d11776 docs/story.md: the full story000.rpf index (141,385 streams), replacing "not reported as a full index"
The doc's full walk had stopped at 72%, so story000.rpf was described from 256 MiB windows. A full
tools/story_index.py run now completes in about 10 minutes: 141,385 streams, 51.1% of the span readable,
9.61 GB unread (the raw RSC8 region), and no zlib candidate past 512 MiB. Adds the per-GiB table and the
class totals, and corrects two sampled conclusions: GiB 13 is not part of the empty RSC8 stretch (31,714
streams; only GiB 5-12 are empty), and GiB 15 is not Bink 2 only (3,702 0DRP page directories).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 03:44:56 +00:00
ccb572e33e Merge round-43 sampled indexing fix into storage indexing follow-up 2026-11-23 13:44:31 +10:00
a049544715 image_bvh_census: split some-paths reads by position, clear saved masks on inner back edges
The summary now says, per category, how many sites have a some-paths read
before the next call in program order and how many have them all after a
later call. strip() also drops the saved-mask SGPRs, so a mask saved in one
pass of an inner loop cannot place a read in the next. The docs quote the
split instead of guessing causes, name the integer mnemonics, and no longer
mention word 0 (the base field belongs to #3794).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 20:44:00 -07:00
115413b464 docs: image_bvh corpus counts in the Ray tracing row and bvh.md section 7
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 20:43:50 -07:00
dad0da40a1 Merge round-43 main into sampled descriptor indexing fix 2026-11-23 13:43:27 +10:00
0eb3a7698c d3d12_xs: print D3D12XboxCreateDevice's parameter words with --trace-d3d12 too (RT-310) 2026-11-23 08:42:50 +05:00
4abd83a06b d3d12: pipeline libraries answer their arguments as the host runtime does
d3d12_pipeline_library_host_test runs 46 CreatePipelineLibrary /
ID3D12PipelineLibrary1 calls that need no pipeline state object on the
Vulkan-backed device and on the host runtime, and compares each HRESULT and
what happened to the output pointer (74 values). On the host every call runs
in a child process with a fresh device: a call that faults there leaves the
runtime broken, and in-process the next call failed fast (0xC0000409). On main 25 values differed (RTX
3060, driver 610.88); now none do:

- A foreign, truncated or corrupt blob, the other device's serialized
  library, or a null pointer with a size is E_INVALIDARG, and the output
  pointer is left as it was (the layer answered DRIVER_VERSION_MISMATCH and
  nulled it). One of the layer's own blobs from another format version stays
  D3D12_ERROR_DRIVER_VERSION_MISMATCH.
- A pipeline library is a device child, not a pageable object:
  QueryInterface(ID3D12Pageable) is E_NOINTERFACE.
- Load*Pipeline with a null output is E_INVALIDARG, not E_POINTER.

Not compared, and printed as such: the serialized size and bytes (each
device's own), and the calls the host faults on (Serialize(nullptr, n),
StorePipeline with a null PSO, Load* with a null name or description), which
the layer answers E_INVALIDARG.

d3d12_pipeline_library_test expected DRIVER_VERSION_MISMATCH for a foreign or
tiny blob; it now expects E_INVALIDARG, and DRIVER_VERSION_MISMATCH for one of
ours from another version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 04:41:50 +01:00
2521a683b0 xgameruntime: keep persistent local storage out of GAME:\
Signed-off-by: Maxime Mansiet <AirKyzzZ@users.noreply.github.com>
2026-11-23 04:41:49 +01:00
d3e1a5011d docs: reapply the remaining merge-leftover cleanup on current main 2026-11-22 21:41:21 -06:00
6b762b62a5 docs: RDNA2's tie rule for rays on a triangle edge, and how it was found
docs/design.md, Ray tracing row: the tie rule as measured with x, y and z dominant; that the first fit was
confounded (winding vs the sign of d[kz]) and wrong in the cells it never measured; that the rule was read off the
x/y rows post hoc and then predicted the z-dominant bridge kernel before it ran (32/32, 10 rows discriminating); the
256 new rows; which equal-|d| sign patterns the measured rows tell apart (all consistent with the translator's
>= order). Still gfx1030 only and dyadic inputs. docs/bvh.md 7a: one paragraph on the tie rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 20:41:07 -07:00
11a1f88c07 docs(runtime tests): tighten the Bink second-machine wording and link the notes 2026-11-22 21:41:05 -06:00
6ba2aafa31 fix: wave64 halves analysis gives tier C to a buffer access without idxen through a literal V# with ADD_TID_ENABLE (SHADER-833) 2026-11-23 04:41:04 +01:00
2d3369a4c8 Merge remote-tracking branch 'origin/main' 2026-11-22 22:41:03 -05:00
db51b7d3f9 Mods: mod.json manifests with archetype swaps, and the Mandy prison-intro mod
gta6rt reads mods/<folder>/mod.json next to gta6rt.exe (or --mods DIR), checks each and logs it. An archetype swap
names two models the game has (by joaat name or 0x hash): when the game asks for `from` it gets `to`. The swaps
are loaded into leonida::mods::active(); they apply once the game's archetype lookup is hooked, which needs the
executable's address for it (docs/modding.md, Day one).

mods/mandy_prison_intro swaps Lucia's player model player_story000_00 (0xE472B687) for cs_mandy (0xD7C0CDFF), the
ids measured in the packs tables; mods_test checks joaat reproduces both. Conditions narrower than "always" are
refused until a hook provides mission state. No game data in either.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:41:02 -05:00
b136ee4680 Tests: check Microsoft's recorded answers where Wine and Proton have no reference
Under Wine the host D3D12 is vkd3d and under Proton vkd3d-proton, and
Proton's EnumWarpAdapter returns the hardware adapter, so the host and
WARP references six tests compare with are not Microsoft's runtime:
d3d12_r9g9b9e5_uav, d3d12_method_variants and d3d12_sampler2 fail under
Proton (the last two crash inside vkd3d-proton), d3d12_fence_timing and
d3d12_subresource_copy under both, d3d12_private_data under Wine.

The six skip the host comparison there with hostwine::host_is_wine() and
check the layer against Microsoft's answers recorded in the test instead,
so Wine and Proton still check values. d3d12_r9g9b9e5_uav gets WARP's
words for its six clear cases, from the packing rule in
docs/d3d12_vulkan.md. d3d12_subresource_copy and d3d12_private_data get
answer tables, taken from the records that Windows runs on NVIDIA and AMD
compared with Microsoft's runtime with no mismatches; LEONIDA_D3D49_DUMP=1
prints the host's record on Windows to regenerate them. The other three
already had recorded answers. Windows still compares with the live
runtime too.
2026-11-22 20:40:59 -07:00
73ab096615 docs: the measured RDNA2 triangle rule in the Ray tracing row
docs/design.md: the triangle sentences of the Ray tracing row now give the rule measured on an RX 6800 (gfx1030,
AMD 26.11.2, 2026-11-22, the kernels tools/bvh_tri_probe.py builds, 1,204 results): the invalid-ray result, the shear from the
direction, k = |d[kz]|^3 times (T, det, b_i, b_j), the miss words, t >= 0 without an extent test, +0 and
0xFFC00000, RDNA2's tie rule, how the translator computes them, what a consumer dividing by word 1 sees and where
the earlier normalised words differed, and what was not measured. The box sentences are unchanged.

docs/bvh.md 7a: the translator's triangle words against the software step's. cs_bvh32.asm: the derivation of the
scene's triangle words follows the measured rule; the words are unchanged (k = 1 and |det| = 1 there).

Co-Authored-By: Claude Opus <noreply@anthropic.com>
2026-11-22 20:40:54 -07:00
8c51a15c1a docs: reapply the merge-leftover cleanup on current main 2026-11-22 21:40:32 -06:00
aa2652d959 docs: reapply the merge-leftover cleanup on current main 2026-11-22 21:40:30 -06:00
f173fc0df3 d3d12: cap the GPU address arena at the device's maxBufferSize and maxMemoryAllocationSize
create_arena clamped LEONIDA_ARENA_MB to 16..4095 MiB and never read the device's buffer limits. The RX 6800
(AMD 26.11.2) reports 2 GiB for both, so LEONIDA_ARENA_MB=3000 made d3d12_compute_test fail under
LEONIDA_VK_VALIDATION=1: one vkAllocateMemory over maxMemoryAllocationSize per device. The size is now decided by
src/arena_size.h (min of the request, maxBufferSize and, for the buffer's memory requirement, maxMemoryAllocationSize,
rounded down to MiB), read with the device's other Vulkan 1.3 properties into VulkanDeviceInfo (0: query; a test sets
a smaller one), and logged once when a limit cuts the request. arena_size_test checks the decision on the CPU;
d3d12_compute_test checks the arena against the real limits and a simulated 32 MiB maxMemoryAllocationSize. Tested
on an RX 6800, Windows 11, AMD 26.11.2: ctest 133/133, and the 3000 MiB validation run now passes with no errors.

Co-Authored-By: Claude Opus <noreply@anthropic.com>
2026-11-22 20:40:03 -07:00
fa5f26db8e Merge origin/main: DXGI device fields coexist with the console-ABI device state 2026-11-22 20:39:59 -07:00
396c2c7306 docs: pixel colour exports are packed, counted over the corpus (SHADER-210)
The Inputs and outputs row said exp mrtN goes to location N. Counted over
the 1.0.2.1 corpus (counts only):

- 10,500 pixel shaders have SV_Target outputs, and every one of the 29,290
  targets keeps register = semantic index.
- 221 of them declare non-consecutive targets, and all 221 export
  mrt0..mrt(k-1). The k-th export is the k-th declared target, never
  register N.

The row now states the rule, the count and the test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 04:39:41 +01:00
273cea6901 docs: use the 14,482-table census in the nested-archive table 2026-11-23 03:39:04 +00:00
911aead5ac Draw a stratified sample of translated pixel shaders on two GPUs and compare (vk_ps_sweep, tools/ps_sweep.py) 2026-11-22 22:27:18 -05:00
18f0b74a6a rdna2spirv: the code ends at the range the listing header declares, so undecodable words after the last printed instruction are caught too (review: Flyander); fspx.md: measured 20/29 2026-11-23 04:22:44 +01:00
a148559ba8 rdna2spirv: the packed 16-bit shifts read a half with a shift, not a field extract
docs/design.md already says a high 16-bit half is read with `>> 16` alone, with
no narrowing after it, because AMD's Windows LLPC miscompiles that combination
(#1506). The three packed 16-bit shifts were the exception: they took the shift
amount with `OpBitFieldUExtract(s0, 16, 4)` and the value with
`OpBitField{S,U}Extract(s1, 16, 16)`. An AMD Windows driver 25.10.36 on a
gfx1036 reads a field extract at offset 16 with the offset taken mod 16, so both
result halves got the low half of the source - 5 of 2000 wave32 programs of
`tools/valu_fuzz.py --family f16 --programs 2000 --seed 1` (@Darkz0rz, SHADER-777
in the coordination issue). The same 2000 programs match 2000/2000 on a second
gfx1036 (Radeon iGPU of a Ryzen 7 7800X3D, Windows driver 31.0.24002.92), and
the SPIR-V that run produced does contain those offset-16 extracts. So this is a
lowering that survives both drivers, not a value change: BitField{S,U}Extract(x,
16, 16) equals `x >> 16` with the matching right shift, and BitFieldUExtract(x,
16, 4) equals `(x >> 16) & 15`; checked over 200,010 inputs including 0, 1,
0xFFFF, 0x10000, 0x80000000, 0xFFFFFFFF, 0x7FFFFFFF and 0x8000. Extracts at
offset 0 are left as they were.

Coordinated as SHADER-784 in #4571, verifying SHADER-777. Counted over all 26 503
listings: 1 v_pk_lshlrev_b16 in 1 compute listing and 1 v_pk_lshrrev_b16 in another,
no v_pk_ashrrev_i16 and no
_sdwa form. Translating the corpus before and after with the same flags gives
26 503 translated and 26 473 valid in both, with 26 471 of the .spv identical
in size and SHA-256; the two that change are the two holding those instructions,
and their differences are only the replaced extracts. ps_ops4 and ps_ops6 pass
on that gfx1036 iGPU and on an NVIDIA RTX 4090 (driver 32.0.16.2124).
2026-11-23 04:21:02 +01:00
79dfd24a30 Typed buffer loads keep a half NaN's payload, measured on gfx1036
mem_diff found one class of mismatch: a 16_FLOAT/16_16_FLOAT/16_16_16_16_FLOAT
typed buffer load of a half NaN. Measured natively on RDNA2 (gfx1036) with the new
tools/f16_widen_probe.py, wave32 and wave64, MUBUF and MTBUF, formats 13, 29 and 71:
the hardware widens a half NaN to f32 as sign | 0x7F800000 | (payload << 13), keeping
the sign and the quiet bit exactly as the half has them (0x7ddb -> 0x7fbb6000,
0x7fe6 -> 0x7ffcc000, 0xffb2 -> 0xfff64000).

Gen.decode_format decoded every half with UnpackHalf2x16, whose NaN result is
undefined and which the interpreter canonicalises to 0x7fc00000, so the payload was
lost. It now uses UnpackHalf2x16 for the non-NaN halves (an exact widening) and builds
the NaN word from the bits with integer ops. v_cvt_f32_f16 was measured too: it quiets
an sNaN with the payload kept (0x7ffb6000), which the typed load does not.

mem_diff's reference used struct's '<e', which keeps the payload only from Python 3.14;
f16_to_f32 pins the measured rule so the fuzzer is version independent.

tests/semantic/test_buffer_f16_widen_hw.py pins the ten measured words for MUBUF and
MTBUF and formats 13/29/71; tests/test_f16_widen_probe.py covers the probe (models,
fake oracle, CLI); mem_diff --self-test now pins the rule too.
2026-11-23 06:19:54 +03:00
a8e529494a docs/gamedata: clarify NavPred block field range, door section list, and case-insensitive matching 2026-11-23 04:17:51 +01:00
01ae62c873 gamedata_blobs: compute VFX data lines, Region 3 spans, and fix docs/tool alignment 2026-11-23 04:16:33 +01:00
be8570ace1 Merge remote-tracking branch 'origin/main' into triage-r43
# Conflicts:
#	docs/runtime_imports.md
#	runtime/CMakeLists.txt
#	runtime/shims/xgameruntime.cpp
#	runtime/test/xmem_test.cpp
#	tools/rdna2spirv.py
2026-11-22 22:12:50 -05:00
2b53baf125 shader_meta: reject malformed ISG1 semantic names before publishing inputs 2026-11-22 22:11:32 -05:00
7c291519c8 script_qtable: enforce strict DFS preorder, 0x14 array checks, 64 KiB stop, and linear traversal 2026-11-23 04:11:13 +01:00
a3cbe85828 docs/testing.md: Known problems row for the AMD Windows native wave64 shuffle miscompile (#4613)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:09:50 -05:00
f99ff6cbdd Revert "Merge pull request #3487 from TheHoracio"
This reverts commit ce318cd07f, reversing
changes made to a78f170525.
2026-11-22 22:08:28 -05:00
cc603fd8bb docs/textures.md: follow the three diverging textures.rpf streams past the divergence
An in-order alignment finds five different 4 MiB data/ttdb chunks reappearing for 65.8-97.5% of their bytes
in the 6 and 32 MiB streams, in short runs with hundreds of gaps (8.6% for the 12 MiB stream). Recorded as
shared runs, not a copy: five chunks aligning this well says they resemble each other.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 03:05:18 +00:00
7bd5f01dd1 FUZZ-55: Route --oracle hw through hw_oracle, fix zero-sum sign, pin the reference
Review follow-up on #4536 (CHANGES_REQUESTED by Flyander; coverage note by kapitche).

- --oracle hw no longer always exits 77. It opens tools/hw_oracle (same pattern as
  tools/fmisc_diff.py), runs each program as a one-lane wave32 raw kernel in the game's
  inferred MODE, honours --hw-arch, and compares the four words with the reference. 77 is
  returned only when the oracle is unavailable. v_rcp/v_rsq/v_sqrt_f64 are counted skips
  there (native results are approximations, PROC-216); the translator-only known-divergence
  exclusions do not apply to hardware.
- add_bits: an exact zero sum now follows IEEE 754-2019 6.3. +0 + +0 stays +0 in every
  mode; only opposite-signed zeros and x + (-x) give -0 when rounding toward negative.
  Before, every exact zero was -0 in that mode.
- tests: direct table tests for compare (16 conditions x 28 operand pairs), class (10
  classes plus boundaries), div_fixup, frexp and add_bits (NaN, inf, zero signs in all four
  modes), plus fake-oracle tests for hw routing, --hw-arch, exit 77, skips and shrinking.
  Mutating lt to <=, add_bits NaN to 0, or dropping the signed-zero rule now fails them.
- docs/shader_validation.md describes the hw contract. No AMD hardware run has been done.

KNOWN_DIVERGENCES keeps div-fixup-nan-s0 (it waits for TEST-983 to reach main).

AI-assisted (OpenBot team).

Co-authored-by: OpenBot <335604065+openbotgit[bot]@users.noreply.github.com>
2026-11-22 23:55:19 -03:00
3468d024d1 docs: a fall-through into undecodable words is refused (SHADER-813) 2026-11-23 03:54:38 +01:00
a71cd6d8b4 docs/testing.md: the cs_signed_zero_nan Mesa bug on RADV 25.0.7, ANV and llvmpipe 26.0.8 (PROC-227)
The Known problems row named RADV on Mesa 25.2/25.3 and llvmpipe. It adds
the measurements since: RADV 25.0.7 on an RX 7800 XT (@mrbean56, #4421),
ANV 25.2.8 on an Intel UHD 630 (@theswiss24, #4571), and llvmpipe on Mesa
26.0.8, which still gives word 5 = 0 (not judged there by check.py). The
cs_w32_salu64 half is ACO's, so only RADV has it.
2026-11-22 23:54:02 -03:00
54f85283f9 docs/d3d12_vulkan.md: d3d12_uint_clear_test is d3d12_clear_test now
#525 (D3D-45) renamed the test and widened it, but this paragraph kept the
old name and its "seven input sets on all three formats". It now names the
test, its eleven integer input sets on the UINT/SINT formats, and that ctest
runs only its --rgb9e5 mode until #521 lands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 13:52:58 +11:00
67dfec1660 Merge remote-tracking branch 'origin/main' into ttpf-volume-patterns
# Conflicts:
#	tests/test_ttpf_mips.py
2026-11-23 02:48:23 +00:00
16dc3fb7a0 Add a graphics user-signature describer
tools/psocache_usersig.py resolves a graphics PSO to the chunk records its
stage record names, decodes each 0x41 entry (kind, offset, key, count,
space/base/size) and each 0x42 slot word (SS, II, RR), and computes the
32-dword cost as constants + 2 tables and as constants + 1 table. --limit N
summarises the first N graphics PSOs, --entry N prints one, --json dumps the
same report. It reuses the cache parser from psocache_inspect and never
prints a hash.

docs/pso_cache.md maps the graphics records to descriptor tables, ranges and
32-bit constants with a confidence per claim, gives the measured fit numbers
and sketches how a CreateGraphicsPipelineState path would consume them.

tests/test_psocache_usersig.py builds a two-PSO cache that covers SRV, UAV,
CBV, Sampler, constants, a record that does not fit 32 dwords and extra
slots, and checks the summary, the entry listing, --limit, --json and the
error paths.
2026-11-23 05:43:31 +03:00
71d8f86853 Translator: v_permlane16/x16 FI=0 and BOUND_CTRL for source lanes off in EXEC (SHADER-74)
op_sel:[FI, BOUND_CTRL] decides what a lane gets when the lane it reads is off in EXEC (or absent from a
workgroup smaller than the wave): FI=1 reads its value, FI=0 keeps the destination (BOUND_CTRL=0) or writes 0
(BOUND_CTRL=1). Measured on RDNA2 (issue #374). The activity of the source lane is shuffled with absent lanes
redirected first, as ds_lane_read does, and the old destination is a plain load, as dst() does.
cs_w32_permlane_fi (GPU) and test_permlane_fi (CPU); the shuffle-count and destination-select controls of
test_valu_permlane16 follow the extra activity shuffle on the FI=0 path.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-22 21:37:38 -05:00
e7f170c4c7 navmesh_cell_fit: reproducible ASSET-332 measurement; the static tiles are a real control
ricardotanaka asked for the wrapped scan as a tool. Writing its tests showed the
doc's "static tiles are no control" was wrong: a 128 m tile's step is 128/65535,
not 1/512, so only 18.75% of its levels land on a 1/32 m grid. All 137 sampled
static tiles fit 0.0625 (none fits 0.0325), so the 0.0325 meshes are what ties
the local-space meshes to the CVehiclePoints documents.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 15:30:36 +13:00
a54ea0eebf wave64_emulate_opt: keep a folded EXECZ region's exits to the join, so a scalar branch there skips the rest
find_local_exec_folds built the region's sub-CFG from edges inside the region only. An s_cbranch_scc0/scc1 (or any branch) from inside the region straight to the join lost that edge, so cfg_structure.structure placed the next block without a %pc guard and emit_folded_region ran it on the exit path too. Edges to the join now go to an exit node that is dropped from the tree. Test and design.md row added. AI-assisted.
2026-11-22 18:25:27 -08:00