[flang][hlfir] allow recursive intrinsic lowering
authorTom Eccles <tom.eccles@arm.com>
Tue, 6 Jun 2023 15:15:25 +0000 (15:15 +0000)
committerTom Eccles <tom.eccles@arm.com>
Sat, 10 Jun 2023 14:36:07 +0000 (14:36 +0000)
commit7c8ef818f8d4a33d59c8d8b8bcfaad2ec51805b5
treed578dc5b0635734e92111f1e31f8a3c0dce9622c
parent631c965483e03355cdc1dba578e787b259c4d79d
[flang][hlfir] allow recursive intrinsic lowering

We need to allow recursive application of intrinsic lowering patterns,
otherwise we cannot lower nested calls of the same intrinsic e.g.
matmul(matmul(a, b), c).

matmul(matmul(a, b), matmul(c, d)) requires hlfir.associate of hlfir
expr with more than one use (TODO).

Differential Revision: https://reviews.llvm.org/D152284
flang/lib/Optimizer/HLFIR/Transforms/LowerHLFIRIntrinsics.cpp
flang/test/HLFIR/matmul-lowering.fir