[llvm] [VPlan] Remove underlying instruction check when overwriting recipe c… (PR #106340)

Elvis Wang via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 27 23:28:20 PDT 2024


https://github.com/ElvisWang123 created https://github.com/llvm/llvm-project/pull/106340

…ost.

This patch remove the underlying instruction check when overwriting the recipe cost with option `force-target-instruction-cost`.

>From 5f09f265262b6b700628d09051af8ae983e3a36e Mon Sep 17 00:00:00 2001
From: Elvis Wang <elvis.wang at sifive.com>
Date: Tue, 27 Aug 2024 23:22:11 -0700
Subject: [PATCH] [VPlan] Remove underlying instruction check when overwriting
 recipe cost.

---
 llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
index 53b28a692059f6..128ac6ded1e4ad 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
@@ -282,7 +282,7 @@ InstructionCost VPRecipeBase::cost(ElementCount VF, VPCostContext &Ctx) {
     return 0;
 
   InstructionCost RecipeCost = computeCost(VF, Ctx);
-  if (UI && ForceTargetInstructionCost.getNumOccurrences() > 0 &&
+  if (ForceTargetInstructionCost.getNumOccurrences() > 0 &&
       RecipeCost.isValid())
     RecipeCost = InstructionCost(ForceTargetInstructionCost);
 



More information about the llvm-commits mailing list