Skip to content

User defined/declared functions are wrongly identified as OpenCL builtins #2513

@asudarsa

Description

@asudarsa

Existing checks in OCLIsBuiltin(...) function are not sufficient to identify OpenCL builtins correctly. There is a possibility that user can define/declare functions with names that could cause them to be identified as OpenCL builtins.

An LLVM IR test that showcases this issue has been added as part of an ongoing PR:
https://github.com/KhronosGroup/SPIRV-LLVM-Translator/pull/2512/files#diff-7bb994ec5258f2246431ab51bfff2ff1643b801fefdd7a498c666ba5c1480ac4

Without the fix in this PR (#2512), this test will fail.

The above PR addresses user-defined functions. However, we do not currently have a resolution for user-declared functions.

Thanks

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