This is an archive of the discontinued LLVM Phabricator instance.

[Flang] Lower the exp, log, log10 intrinsics
ClosedPublic

Authored by kiranchandramohan on Mar 21 2022, 5:49 AM.

Details

Summary

The intrinsic computes the exponent, log real and complex numbers and
log10 for real numbers. By default they are lowered to runtime calls to
libpgmath. kind=10 and 16 are not supported. With the llvm option, it
can be lowered to llvm intrinsics (not all types .eg. complex are
supported for llvm lowering).

This is part of the upstreaming effort from the fir-dev branch in [1].
[1] https://github.com/flang-compiler/f18-llvm-project

Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
Co-authored-by: William S Moses <gh@wsmoses.com>

Diff Detail

Event Timeline

Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
Herald added a subscriber: mehdi_amini. · View Herald Transcript
kiranchandramohan requested review of this revision.Mar 21 2022, 5:49 AM
PeteSteinfeld accepted this revision.Mar 21 2022, 6:49 AM
PeteSteinfeld added a subscriber: PeteSteinfeld.

All builds and tests correctly and looks good.

This revision is now accepted and ready to land.Mar 21 2022, 6:49 AM

Thanks @PeteSteinfeld.

@schweitz Is outlining math intrinsics desirable? Wouldn't this might affect vectorisation and other optimisations?

This revision was automatically updated to reflect the committed changes.