[flang-commits] [flang] [flang] Option to drop iter_arg for do-concurrent nested loops (PR #207816)
Slava Zakharin via flang-commits
flang-commits at lists.llvm.org
Tue Jul 7 08:44:19 PDT 2026
vzakhari wrote:
Yes, the iteration argument of the original IV's data type was added in https://reviews.llvm.org/D132176 (see performance results at the end of the commit message). I suppose the following representation will be equivalent to LLVM (I did not check), but I am not sure if it is helpful to any MLIR optimization:
```
fir.store %lb to %user_iv_ref
%loop_iv = fir.do_loop ... -> (index) {
...
%user_iv = fir.load %user_iv_ref
%inc = arith.add %user_iv, %step
fir.store %inc to %user_iv_ref
}
%cvt = fir.convert %loop_iv : (index) -> i32
fir.store %cvt to %user_iv_ref
```
FWIW, mem2reg will probably transform this into an extra iter arg of i32 type (basically, switching back to what we have now from the lowering).
https://github.com/llvm/llvm-project/pull/207816
More information about the flang-commits
mailing list