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

Graham Hunter via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 11 06:29:14 PDT 2024


================
@@ -2423,6 +2571,13 @@ void LoopAccessInfo::analyzeLoop(AAResults *AA, LoopInfo *LI,
       // Save 'store' instructions. Abort if other instructions write to memory.
       if (I.mayWriteToMemory()) {
         auto *St = dyn_cast<StoreInst>(&I);
+        if (SpeculativeEarlyExitingBB) {
+          recordAnalysis("CantVectorizeInstruction", St)
----------------
huntergr-arm wrote:

What happens if St is null here?

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


More information about the llvm-commits mailing list