Skip to content

Make libdevice work with -ffast-math #10517

Open
@hdelan

Description

@hdelan

See discussion here #9768

Libdevice doesn't do anything for -ffast-math. We should enable branching so that __spirv_ocl_cos or __spirv_ocl_native_cos are chosen based on the value set for -ffast-math. This may require a compiler pass since we link libdevice as bc bundles.

SPIR-V is currently getting -ffast-math behaviour for cosf since it relies on use of compiler intrinsics, but these don't have full coverage so some tests fail. When this is implemented this test should be re-enabled for SPIR-V https://github.com/intel/llvm/pull/9768/files#diff-bcdb4487c2827e573175267bdceb404b166460192e119ee45199d32d5fc13288R5

Tag @steffenlarsen

Metadata

Metadata

Assignees

No one assigned

    Labels

    SPIR-VIssues related to SPIRV-LLVM-TranslatorconfirmedenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions