This is an archive of the discontinued LLVM Phabricator instance.

[flang] Lower power operations
ClosedPublic

Authored by clementval on Feb 25 2022, 5:28 AM.

Details

Summary

Lower the power operation for real, integer
and complex.

The power operation is lowered to library calls.

This patch is part of the upstreaming effort from fir-dev branch.

Depends on D120403

Diff Detail

Event Timeline

clementval created this revision.Feb 25 2022, 5:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 25 2022, 5:28 AM
Herald added a subscriber: mehdi_amini. · View Herald Transcript
clementval requested review of this revision.Feb 25 2022, 5:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 25 2022, 5:28 AM
rovka added a subscriber: rovka.Feb 25 2022, 5:50 AM

Shouldn't you also have tests for real :: x, y, z and real(8) :: x, y, z? You don't seem to be covering llvm.pow.f32 and llvm.pow.f64. Also, what happens when you mix real and real(8) base and exponents?

flang/include/flang/Lower/IntrinsicCall.h
87
schweitz accepted this revision.Feb 25 2022, 8:37 AM
This revision is now accepted and ready to land.Feb 25 2022, 8:37 AM
clementval marked an inline comment as done.

Rebase + add tests

This revision was automatically updated to reflect the committed changes.