[flang] Lower elemental calls
authorValentin Clement <clementval@gmail.com>
Mon, 14 Mar 2022 16:38:47 +0000 (17:38 +0100)
committerValentin Clement <clementval@gmail.com>
Mon, 14 Mar 2022 16:40:11 +0000 (17:40 +0100)
commit7b917fd2841312c11c1dfe8a860d12a8f24feb3f
treed8b657ac0559fb6caa685966ef7d55238ff18e00
parent55cf09ae2600066045ad9f9d81b330bc4d52b7e4
[flang] Lower elemental calls

This patch adds more lowering of operations sub-expression inside elemental call arguments.
It tests array contexts where an address is needed for each element (for
the argument), but part of the array sub-expression must be lowered by value
(for the operation)

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

Reviewed By: PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D121606

Co-authored-by: Jean Perier <jperier@nvidia.com>
Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
flang/lib/Lower/ConvertExpr.cpp
flang/lib/Lower/IntrinsicCall.cpp
flang/test/Lower/array-elemental-calls-2.f90 [moved from flang/lib/Lower/array-elemental-calls-2.f90 with 99% similarity]