This is an archive of the discontinued LLVM Phabricator instance.

[flang] Lower exponentiation without using pgmath.
ClosedPublic

Authored by vzakhari on Dec 11 2022, 7:47 PM.

Details

Summary

Exponentiation is lowered to either math::FPowI or Fortran runtime
call (in case of --math-runtime=precise).

MathToFuncs convertor will convert math::FPowI operations with
exponent width >32 to calls of outlined implementations and otherwise
will leave the operation to MathToLLVM convertor.

Depends on D129812, D139804

Diff Detail

Event Timeline

vzakhari created this revision.Dec 11 2022, 7:47 PM
Herald added a project: Restricted Project. · View Herald Transcript
vzakhari requested review of this revision.Dec 11 2022, 7:47 PM
jeanPerier accepted this revision.Dec 12 2022, 4:58 AM

Looks great, thanks !

This revision is now accepted and ready to land.Dec 12 2022, 4:58 AM
vzakhari updated this revision to Diff 482151.Dec 12 2022, 8:51 AM

Thank you for the review, Jean!

This change-set fixes an issue in the unit test.

vzakhari updated this revision to Diff 482188.Dec 12 2022, 10:33 AM

Fixed #if checks for real10/real16.

vzakhari updated this revision to Diff 482915.Dec 14 2022, 10:20 AM

Conflict resolution for CodeGen.cpp due to changes in D139804.

This revision was automatically updated to reflect the committed changes.