This repository was archived by the owner on Oct 9, 2019. It is now read-only.

Description
Running code containing the llvm.bswap intrinsic through llvm-spirv crashes with
Fails to save LLVM as SPIRV: InvalidFunctionCall: Unexpected llvm intrinsic
According to the LLVM Language Reference, this intrinsic is used to swap the bytes in integers, e.g. to move from little-endian to big-endian and vice versa.
Since the SPIR-V specification offers no instruction to swap bytes, I guess this intrinsic should be implemented by manually shifting the single bytes in the integer numbers.