[llvm] [VPlan] Fix classof() in VPWiden{Load|Store}Recipe NFC. (PR #119691)
Elvis Wang via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 12 05:56:13 PST 2024
================
@@ -2966,7 +2966,15 @@ struct VPWidenLoadRecipe final : public VPWidenMemoryRecipe, public VPValue {
getDebugLoc());
}
- VP_CLASSOF_IMPL(VPDef::VPWidenLoadSC);
+ static inline bool classof(const VPRecipeBase *R) {
----------------
ElvisWang123 wrote:
Yes. But we need to add the derived class's ID to the parent class `classof()` implementation.
Otherwise `isa<VPWidenLoadRecipe>(VPWidenLoadEVLRecipe)` return `false`.
We can found that there are some similar implementation such as `VPReductionRecipe::classof()` and `VPWidenREcipe::classof()`.
https://github.com/llvm/llvm-project/pull/119691
More information about the llvm-commits
mailing list