[flang-commits] [flang] [Flang] Minloc elemental intrinsic lowering (PR #74828)

via flang-commits flang-commits at lists.llvm.org
Fri Dec 8 06:04:36 PST 2023


https://github.com/jeanPerier commented:

Was there a lot of duplication rewriting it to an hlfir.elemental in in SimplifyHLFIRIntrinsics?

I would favor doing it there because I think having it as an hlfir.elemental is more powerful in general since it can then be composed if it is used as an operand to some other array operation.

Think: `array1 = offset + minloc(array2, dim=dim)`

That is the direction I wanted to go to implement https://github.com/llvm/llvm-project/blob/main/flang/docs/ArrayComposition.md and avoid array temporaries as much as possible.

https://github.com/llvm/llvm-project/pull/74828


More information about the flang-commits mailing list