================ @@ -1338,6 +1339,34 @@ class VPWidenCastRecipe : public VPRecipeWithIRFlags { Type *getResultType() const { return ResultTy; } }; +/// VPScalarCastRecipe is a recipe o create scalar cast instructions. +class VPScalarCastRecipe : public VPRecipeBase, public VPValue { + /// Cast instruction opcode. + Instruction::CastOps Opcode; + + /// Result type for the cast. + Type *ResultTy; + + Value *generate(VPTransformState &State, unsigned Part); + +public: + VPScalarCastRecipe(Instruction::CastOps Opcode, VPValue *Op, Type *ResultTy) + : VPRecipeBase(VPDef::VPScalarCastSC, {Op}), VPValue(this), + Opcode(Opcode), ResultTy(ResultTy) {} + + ~VPScalarCastRecipe() override = default; + + VP_CLASSOF_IMPL(VPDef::VPWidenIntOrFpInductionSC) ---------------- ayalz wrote:
VPWidenIntOrFpInductionSC ? https://github.com/llvm/llvm-project/pull/78113 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits