[llvm] [LoopVectorize] Add an option to test potential issues with VPlan (PR #121154)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 4 01:22:59 PST 2025


================
@@ -3448,8 +3453,9 @@ bool LoopVectorizationCostModel::isPredicatedInst(Instruction *I) const {
   // If predication is not needed, avoid it.
   // TODO: We can use the loop-preheader as context point here and get
   // context sensitive reasoning for isSafeToSpeculativelyExecute.
+  Instruction *CtxI = CheckSpeculatabilityAtUse ? I->getNextNode() : nullptr;
----------------
fhahn wrote:

But in that case, wouldn't it be `isSafeToSpeculativelyExecute`'s responsibility to make sure that the pointer operand isn't poison?

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


More information about the llvm-commits mailing list