[llvm] [VPlan] Fold VPDef into VPRecipeBase (NFC). (PR #174282)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 8 05:46:56 PST 2026
================
@@ -120,14 +118,14 @@ VPRecipeBase *VPValue::getDefiningRecipe() {
auto *DefValue = dyn_cast<VPRecipeValue>(this);
if (!DefValue)
return nullptr;
- return cast<VPRecipeBase>(DefValue->Def);
+ return DefValue->Def;
}
const VPRecipeBase *VPValue::getDefiningRecipe() const {
auto *DefValue = dyn_cast<VPRecipeValue>(this);
if (!DefValue)
return nullptr;
- return cast<VPRecipeBase>(DefValue->Def);
+ return DefValue->Def;
----------------
ayalz wrote:
```suggestion
return DefValue ? DefValue->Def : nullptr;
```
https://github.com/llvm/llvm-project/pull/174282
More information about the llvm-commits
mailing list