[llvm] [LoopVectorize] Add support for vectorisation of simple early exit loops (PR #88385)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Thu May 9 00:59:00 PDT 2024


================
@@ -181,6 +181,16 @@ static cl::opt<bool> EnableEpilogueVectorization(
     "enable-epilogue-vectorization", cl::init(true), cl::Hidden,
     cl::desc("Enable vectorization of epilogue loops."));
 
+static cl::opt<bool> EnableEarlyExitVectorization(
+    "enable-early-exit-vectorization", cl::init(false), cl::Hidden,
+    cl::desc("Enable vectorization of early exit loops."));
+
+static cl::opt<bool> AssumeNoMemFault(
+    "vectorizer-no-mem-fault", cl::init(false), cl::Hidden,
----------------
david-arm wrote:

The intention really was for general testing, i.e. running the LLVM test suite, SPEC2017, etc. and making sure that tests/benchmarks are behaving correctly. With the flag enabled over 2000 loops in the LLVM test suite suddenly start vectorising. Well-behaved programs shouldn't fault if they've specified a trip count, but obviously it's completely unsafe to enable this in general. It was for convenience really - I could remove the flag, but it just means every time we want to test auto-vectorisation with wider coverage we have to hack the vectoriser every time manually.

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


More information about the llvm-commits mailing list