Repository navigation
Test that SPIR-V merge instructions precede their branch - #1145
Merged
Merged
Conversation
MachineCSE used to hoist instructions between an OpLoopMerge and its branch, which spirv-val rejects (llvm/llvm-project#245799). Julia's bounds-checked loops hit this since LLVM 23, which gives OpenCL loops with unroll hints an OpLoopMerge (JuliaGPU/GPUArrays.jl#871). SPIRV_LLVM_Backend_jll 23.1.4+7 carries the fix.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1145 +/- ##
==========================================
- Coverage 92.99% 91.52% -1.47%
==========================================
Files 32 32
Lines 8574 8574
==========================================
- Hits 7973 7847 -126
- Misses 601 727 +126 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
MachineCSE could separate
OpLoopMergefrom its branch in bounds-checkedJLArraystatistics kernels, causing SPIR-V validation to fail (JuliaGPU/GPUArrays.jl#871, llvm/llvm-project#245799).The
merge instructionstestset intest/spirv.jlcompiles and validates a reduced loop with both SPIR-V backends. For the LLVM backend, it also checks thatOpBranchConditionalimmediately followsOpLoopMerge. The Khronos translator emits no merge for this loop.The LLVM backend test fails with
SPIRV_LLVM_Backend_jll23.1.4+6 and passes with 23.1.4+7, which carries JuliaPackaging/Yggdrasil#15910.