[flang-commits] [flang] [flang][mlir][fir] Unroll inner loops in presence of user vectorizati… (PR #210820)

Scott Manley via flang-commits flang-commits at lists.llvm.org
Wed Jul 22 07:19:12 PDT 2026


rscottmanley wrote:

I'm not sure about this approach. I might argue the motivating example is using the wrong directive. If you want the outer loop vectorized, why not put unroll directives on the inner loops?

The intent of `!dir$ vector always` says to override its cost model IF the loop is vectorizable. So the directive is now making it vectorizable? I don't think I agree with that. Would the loops still be unrolled if the loop is ultimately NOT vectorized? What about cases where loop collapse would be cleaner/more profitable because you can utilize wider vectors?


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


More information about the flang-commits mailing list