[flang-commits] [flang] [flang] Lower plain DO loops without a secondary-induction iter_arg (PR #207816)
via flang-commits
flang-commits at lists.llvm.org
Fri Jul 17 06:37:59 PDT 2026
jeanPerier wrote:
Thanks for the update @khaki3. I think your not doing exactly what @vzakhari suggested and instead reverting to pre https://reviews.llvm.org/D132176 by inserting a fir.convert that LLVM has trouble vectorizing.
Have you tested CPU perf on SPEC CPU2000 mentioned in D132176 against the current perf?
In general, shouldn't we just update the fir.do_loop to use the user variable type as the IV without any computation generated for it, and to only use the index when lowering to the trip count calculation?
I do not really think we need the IV to be index at that stage nor that we need to introduce the explicit increment on the user type SSA value.
It seems we could have simpler IR (and therefore simpler analysis) and still get good vectorization by having a codegen that matches what lowering is doing today.
The biggest impact would be on all the pass that translates fir.do_loop to whatever other loop representation.
@vzakhari and @tblah, what do you think about it?
https://github.com/llvm/llvm-project/pull/207816
More information about the flang-commits
mailing list