[llvm] [LV] Fix unsafe canVectorizeWithIfConvert() checks (PR #203273)

Gaƫtan Bossu via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 11 07:52:18 PDT 2026


================
@@ -2962,7 +2962,10 @@ bool LoopAccessInfo::blockNeedsPredication(const BasicBlock *BB,
   assert(TheLoop->contains(BB) && "Unknown block used");
 
   // Blocks that do not dominate the latch need predication.
+  // Treat blocks in loops with no unique latch as always needing predication.
----------------
gbossu wrote:

I meant for these two comments to go hand in hand, but I don't mind moving the first one down if you think that's clearer. :)

I'm also wondering whether I should add more context here because this in theory does not belong to LoopVectorizer.

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


More information about the llvm-commits mailing list