@@ -3530,17 +3530,16 @@ class VPScalarIVStepsRecipe : public VPRecipeWithIRFlags,
35303530
35313531// / Casting from VPRecipeBase -> VPPhiAccessors is supported for all recipe
35323532// / types implementing VPPhiAccessors. Used by isa<> & co.
3533- template <typename SrcTy > struct CastIsPossible <VPPhiAccessors, SrcTy > {
3534- static inline bool isPossible (SrcTy f) {
3533+ template <> struct CastIsPossible <VPPhiAccessors, const VPRecipeBase * > {
3534+ static inline bool isPossible (const VPRecipeBase * f) {
35353535 // TODO: include VPPredInstPHIRecipe too, once it implements VPPhiAccessors.
35363536 return isa<VPIRPhi, VPHeaderPHIRecipe, VPWidenPHIRecipe, VPPhi>(f);
35373537 }
35383538};
35393539// / Support casting from VPRecipeBase -> VPPhiAccessors, by down-casting to the
35403540// / recipe types implementing VPPhiAccessors. Used by cast<>, dyn_cast<> & co.
35413541template <typename SrcTy>
3542- struct CastInfo <VPPhiAccessors, SrcTy>
3543- : public CastIsPossible<VPPhiAccessors, SrcTy> {
3542+ struct CastInfoVPPhiAccessors : public CastIsPossible <VPPhiAccessors, SrcTy> {
35443543
35453544 using Self = CastInfo<VPPhiAccessors, SrcTy>;
35463545
@@ -3567,6 +3566,12 @@ struct CastInfo<VPPhiAccessors, SrcTy>
35673566 return doCast (f);
35683567 }
35693568};
3569+ template <>
3570+ struct CastInfo <VPPhiAccessors, VPRecipeBase *>
3571+ : CastInfoVPPhiAccessors<VPRecipeBase *> {};
3572+ template <>
3573+ struct CastInfo <VPPhiAccessors, const VPRecipeBase *>
3574+ : CastInfoVPPhiAccessors<const VPRecipeBase *> {};
35703575
35713576// / VPBasicBlock serves as the leaf of the Hierarchical Control-Flow Graph. It
35723577// / holds a sequence of zero or more VPRecipe's each representing a sequence of
0 commit comments