The SPIR-V Validator has recently started checking for duplicate decorations. This commit fixes duplicate Alignment decorations that affected the test/read_image.cl test.
Alignment decorations have two potential sources during LLVM to SPIR-V translation: the instruction's alignment property and spirv.Decorations metadata. Handle both of these through the setAlignment method, so that duplicates can be avoided.
Calling setAlignment with different alignments for the same entity is probably an error, so add an assert.
The SPIR-V Validator has recently started checking for duplicate decorations. This commit fixes duplicate Alignment decorations that affected the
test/read_image.cl
test.Alignment decorations have two potential sources during LLVM to SPIR-V translation: the instruction's alignment property and
spirv.Decorations
metadata. Handle both of these through thesetAlignment
method, so that duplicates can be avoided.Calling
setAlignment
with different alignments for the same entity is probably an error, so add an assert.Contributes to https://github.com/KhronosGroup/SPIRV-LLVM-Translator/issues/2509