[flang-commits] [flang] [flang] Added fir.is_contiguous_box and fir.box_total_elements ops. (PR #131047)

Slava Zakharin via flang-commits flang-commits at lists.llvm.org
Thu Mar 13 11:56:31 PDT 2025


vzakhari wrote:

> Thanks for this. Why did you decide to lower these ops in a separate pass instead of in early codegen e.g. codegen-rewrite?

I plan to use FIR loops (and maybe SCF ifs) for expanding these ops, so this has to be done before SCF-to-CF conversion, thus, before codegen-rewrite.  I guess I could try to use just `arith.select`'s, but that the loops will be more compact and clear.

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


More information about the flang-commits mailing list