Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that PHI node has an incoming value per each predecessor instance even if the input SPIR-V module is invalid #2852

Conversation

VyacheslavLevytskyy
Copy link
Contributor

The goal of the PR is to ensure that PHI node has an incoming value per each predecessor instance even if the input SPIR-V module is invalid as reported by spirv-val.

This PR fixes solution #2736 intended to fix #2702
This previous version #2736 works well for valid SPIR-V modules, but fails to produce correct LLVM IR if a SPIR-V input is incorrect in terms of OpPhi's number of incoming blocks does not match block's predecessor count.

…nce even if the input SPIR-V module is invalid as reported by spirv-val
@VyacheslavLevytskyy VyacheslavLevytskyy changed the title ensure that PHI node has an incoming value per each predecessor insta… Ensure that PHI node has an incoming value per each predecessor instance even if the input SPIR-V module is invalid as reported by spirv-val Nov 8, 2024
@VyacheslavLevytskyy VyacheslavLevytskyy changed the title Ensure that PHI node has an incoming value per each predecessor instance even if the input SPIR-V module is invalid as reported by spirv-val Ensure that PHI node has an incoming value per each predecessor instance even if the input SPIR-V module is invalid Nov 8, 2024
@VyacheslavLevytskyy VyacheslavLevytskyy merged commit 69f65ef into KhronosGroup:main Nov 8, 2024
9 checks passed
MrSidims pushed a commit to MrSidims/SPIRV-LLVM-Translator that referenced this pull request Nov 9, 2024
…nce even if the input SPIR-V module is invalid as reported by spirv-val (KhronosGroup#2852)
MrSidims pushed a commit to MrSidims/SPIRV-LLVM-Translator that referenced this pull request Nov 9, 2024
…nce even if the input SPIR-V module is invalid as reported by spirv-val (KhronosGroup#2852)
MrSidims pushed a commit to MrSidims/SPIRV-LLVM-Translator that referenced this pull request Nov 9, 2024
…nce even if the input SPIR-V module is invalid as reported by spirv-val (KhronosGroup#2852)
MrSidims pushed a commit to MrSidims/SPIRV-LLVM-Translator that referenced this pull request Nov 9, 2024
…nce even if the input SPIR-V module is invalid as reported by spirv-val (KhronosGroup#2852)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants