<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/spirv/infinite-loop.slang, branch master</title>
<subtitle>Making it easier to work with shaders</subtitle>
<id>https://git.yummers.dev/slang.git/atom?h=master</id>
<link rel='self' href='https://git.yummers.dev/slang.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/'/>
<updated>2025-10-17T01:22:39+00:00</updated>
<entry>
<title>Fix infinite loop in SPIRVLegalizationContext::processWorkList (#8712)</title>
<updated>2025-10-17T01:22:39+00:00</updated>
<author>
<name>davli-nv</name>
<email>davli@nvidia.com</email>
</author>
<published>2025-10-17T01:22:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=ff064b9a0f1316007f46710432f854777a520fdf'/>
<id>urn:sha1:ff064b9a0f1316007f46710432f854777a520fdf</id>
<content type='text'>
When slangc is invoked with -g, a source shader that has static infinite
loop can generate IR that have branch to a block that contains a branch
to the first block that contains the first branch, resulting in infinite
loop.

Change SPIRVLegalizationContext::processWorkList to only add branch
target to work list via its parent, this avoids the infinite loop above.

Also change addToWorkList to stop addUsersToWorkList, users should be
added explicitly by logic for specific insts.

Add regression test as tests/spirv/infinite-loop.slang

Fixes #8669</content>
</entry>
</feed>
