[llvm] [VPlan] Strip erroneous poisonGuaranteesUB (PR #189374)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 8 09:58:18 PDT 2026
================
@@ -83,61 +83,6 @@ bool vputils::isHeaderMask(const VPValue *V, const VPlan &Plan) {
B == Plan.getBackedgeTakenCount();
}
-/// Returns true if \p R propagates poison from any operand to its result.
-static bool propagatesPoisonFromRecipeOp(const VPRecipeBase *R) {
- return TypeSwitch<const VPRecipeBase *, bool>(R)
- .Case<VPWidenGEPRecipe, VPWidenCastRecipe>(
- [](const VPRecipeBase *) { return true; })
- .Case([](const VPReplicateRecipe *Rep) {
- // GEP and casts propagate poison from all operands.
- unsigned Opcode = Rep->getOpcode();
- return Opcode == Instruction::GetElementPtr ||
- Instruction::isCast(Opcode);
- })
- .Default([](const VPRecipeBase *) { return false; });
----------------
artagnon wrote:
@fhahn Can you comment on this patch? I discovered the problem by changing this to match all GEPs via m_GetElementPtr, which causes cost-model crashes.
https://github.com/llvm/llvm-project/pull/189374
More information about the llvm-commits
mailing list