Closed aarongreig closed 5 years ago
@aarongreig, thank you for reporting the issue. Could you attach LLVM IR and SPIR-V files for the repro.
Yes: paramAttr.ll.txt produces paramAttr.spvasm.txt (I had to add the .txt extension for github to accept the file). I realise now that I'm actually using the llvm 6.0 version of the tool, currently building 3.6.1 to see if this will repro with that version as well.
the same IR passed into llvm-spirv
built from the 3.6.1 branch produces this paramAttr.spvasm.txt
Sorry, I mixed this repository with https://github.com/KhronosGroup/SPIRV-LLVM-Translator. There is no active development in this repository anymore. So I suggest to use translator from https://github.com/KhronosGroup/SPIRV-LLVM-Translator. It should work with latest versions of LLVM/Clang.
The new version doesn't exhibit this bug, thanks for pointing me in the right direction.
It is possible to generate SPIR-V that applies function parameter attributes to invalid types. Repro:
Since
bar
isconst
the spir-v generated from this kernel applies theNoWrite
decoration to it, butNoWrite
is only valid for pointer types.