[PATCH] D115261: [LV] Disable runtime unrolling for vectorized loops.

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 16 06:26:05 PST 2022


lebedev.ri added a comment.

Does this disable all unrolling, or only runtime unrolling?
I strongly suspect that the full unrolling should still be allowed.
Consider e.g. `D136806` from the https://godbolt.org/z/fsdMhETh3 from D136806 <https://reviews.llvm.org/D136806>,
there we still need to full-unroll, after vectorization, to get the SROA to trigger.

I'm also a bit vary to the fact that LV unrolling
is functionally different to the normal unrolling/



================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7648
   }
-  // Disable runtime unrolling when vectorizing the epilogue loop.
-  if (CanonicalIVStartValue)
-    AddRuntimeUnrollDisableMetaData(L);
+  AddRuntimeUnrollDisableMetaData(L, "llvm.loop.unroll.disable");
 
----------------
Looks like this is not runtime-specific?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115261/new/

https://reviews.llvm.org/D115261



More information about the llvm-commits mailing list