[flang-commits] [flang] [flang] add simplification for ProductOp intrinsic (PR #169575)

via flang-commits flang-commits at lists.llvm.org
Wed Nov 26 06:45:28 PST 2025


stomfaig wrote:

> You should also add a lowering (to FIR) test that at `-O1` checks that product operation is inlined.

As I see currently there are tests for the optimizations `simplify-hlfir-intrinsics-*` , but I could not find explicit checks for simplifying the other intrinsics based on the flag -O1. So I just added checks in the same format as for the previous simplifications.

This should cover what you mention, since it is tested that (a) the pass `SimplifyHLFIRIntrinsics` is called upon setting the -O1 flag, and (b) `SimplifyHLFIRIntrinsics` simplifies products as expected.

Let me know if you'd like something done differently.

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


More information about the flang-commits mailing list