[llvm] [VPlan] First step towards VPlan cost modeling (LegacyCM in CostCtx) (PR #92555)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 3 12:52:43 PDT 2024


================
@@ -910,6 +910,10 @@ static void simplifyRecipe(VPRecipeBase &R, VPTypeAnalysis &TypeInfo) {
                                  : Instruction::ZExt;
         auto *VPC =
             new VPWidenCastRecipe(Instruction::CastOps(ExtOpcode), A, TruncTy);
+        if (auto *UnderlyingExt = R.getOperand(0)->getUnderlyingValue()) {
+          // UnderlyingExt has distinct return type, used to retain legacy cost.
----------------
ayalz wrote:

If the original Trunc is set as underlying, the result type would match that of the recipe, but the cost of original Ext is more accurate for this recipe, being an Ext?

https://github.com/llvm/llvm-project/pull/92555


More information about the llvm-commits mailing list