Skip to content

Floating point llvm lowering of intrinsics #1497

@kiranchandramohan

Description

@kiranchandramohan

The floating-point lowering of Fortran intrinsics like abs uses the llvm intrinsics. Currently, we only have the f32 and f64 floating types handled. If a quad precision or a half-precision then this will result in being converted to a 32 bit type and then the llvm.fabs.f32 llvm intrinsic is used to handle the conversion. For a precision higher than 64 this will cause an assert in a build with assert but will proceed with conversions in a release build. The documentation for llvm.fabs mentions several types that can be used with the fabs intrinsic but also cautions that all targets might not support these.

I am in the process of upstreaming this code, and I have the following questions,

  1. Is this a first-cut implementation handling the most commonly used types (32, 64)?
  2. Or was a conclusion reached that the 32 and 64 bit types are the only ones that are handled by all targets?

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