Repository navigation
spirv-opt: Correct ADCE bug keeping dead DebugValue Value operands - #6368
Merged
s-perron merged 1 commit intoOct 31, 2025
Merged
Conversation
s-perron
approved these changes
Oct 17, 2025
SteveUrquhart
force-pushed
the
fix-adce-debugvalue_value
branch
from
October 17, 2025 23:59
da2baf8 to
622fe09
Compare
s-perron
approved these changes
Oct 21, 2025
auto-merge was automatically disabled
October 22, 2025 21:31
Head branch was pushed to by a user without write access
SteveUrquhart
force-pushed
the
fix-adce-debugvalue_value
branch
from
October 22, 2025 21:31
622fe09 to
0893625
Compare
s-perron
enabled auto-merge (squash)
October 23, 2025 14:46
s-perron
approved these changes
Oct 30, 2025
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. |
Collaborator
|
The Macos builds have been flakey lately. I tried getting it restarted, but it didn't work. I got it going now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.