Skip to content

spirv-opt: Correct ADCE bug keeping dead DebugValue Value operands - #6368

Merged
s-perron merged 1 commit into
KhronosGroup:mainfrom
SteveUrquhart:fix-adce-debugvalue_value
Oct 31, 2025
Merged

s-perron merged 1 commit into
KhronosGroup:mainfrom
SteveUrquhart:fix-adce-debugvalue_value

Conversation

@SteveUrquhart

Copy link
Copy Markdown
Contributor

A logic error in ProcessDebugInfo(), a pass recently added to ADCE, causes some shaders to fail optimization. When examining the Value operand of a DebugValue instruction, we should only be reading the live list, as this change corrects. Previously, we were using the .Set method, which was incorrectly marking these instructions live. Since other dependencies may have been killed, the SPIR-V is left in an inconsistent state.

This PR partially corrects microsoft/DirectXShaderCompiler#7744. The remaining issue is in scalar-replacement=0. Since this PR has more wide-ranging benefits and I haven't root-caused the remaining problem, I'm submitting it now.

auto-merge was automatically disabled October 22, 2025 21:31

Head branch was pushed to by a user without write access

@SteveUrquhart
SteveUrquhart force-pushed the fix-adce-debugvalue_value branch from 622fe09 to 0893625 Compare October 22, 2025 21:31
@s-perron
s-perron enabled auto-merge (squash) October 23, 2025 14:46
@SteveUrquhart

Copy link
Copy Markdown
Contributor Author

@s-perron, I can't see the details about the failing macos job. I get "fusion2 IP address unknown."

This is the fix for both #6217 and microsoft/DirectXShaderCompiler#7744.

@s-perron

Copy link
Copy Markdown
Collaborator

The Macos builds have been flakey lately. I tried getting it restarted, but it didn't work. I got it going now.

@s-perron
s-perron merged commit 917617c into KhronosGroup:main Oct 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants