Skip to content

Commit 4091f4d

Browse files
authored
Reland [flang] Generalized simplification of HLFIR reduction ops. (#136071) (#136246)
This change generalizes SumAsElemental inlining in SimplifyHLFIRIntrinsics pass so that it can be applied to ALL, ANY, COUNT, MAXLOC, MAXVAL, MINLOC, MINVAL, SUM. This change makes the special handling of the reduction operations in OptimizedBufferization redundant: once HLFIR operations are inlined, the hlfir.elemental inlining should do the rest of the job.
1 parent 7c51e42 commit 4091f4d

16 files changed

+2233
-2002
lines changed

flang/lib/Optimizer/HLFIR/Transforms/OptimizedBufferization.cpp

Lines changed: 0 additions & 465 deletions
Large diffs are not rendered by default.

flang/lib/Optimizer/HLFIR/Transforms/SimplifyHLFIRIntrinsics.cpp

Lines changed: 864 additions & 200 deletions
Large diffs are not rendered by default.

flang/test/HLFIR/all-elemental.fir

Lines changed: 0 additions & 91 deletions
This file was deleted.

flang/test/HLFIR/any-elemental.fir

Lines changed: 0 additions & 190 deletions
This file was deleted.

0 commit comments

Comments
 (0)