[llvm] [LV] Fix unsafe canVectorizeWithIfConvert() checks (PR #203273)
Gaƫtan Bossu via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 15 03:48: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.
const BasicBlock *Latch = TheLoop->getLoopLatch();
+ if (!Latch)
----------------
gbossu wrote:
Done that. `LoopAccessInfo::blockNeedsPredication` is back to how it was except it now has an explicit precondition.
https://github.com/llvm/llvm-project/pull/203273
More information about the llvm-commits
mailing list