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

Intrinsic llvm.bswap not supported #210

@doe300

Description

@doe300

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions