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

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Sun May 26 18:26:37 PDT 2024


================
@@ -1472,3 +1563,15 @@ VPValue *vputils::getOrCreateVPValueForSCEVExpr(VPlan &Plan, const SCEV *Expr,
   Plan.addSCEVExpansion(Expr, Expanded);
   return Expanded;
 }
+
+bool vputils::isUniformBoolean(VPValue *Cond) {
+  if (match(Cond, m_Not(m_VPValue())))
+    Cond = Cond->getDefiningRecipe()->getOperand(0);
+  auto *R = Cond->getDefiningRecipe();
+  if (!R)
+    return true;
----------------
fhahn wrote:

Done, thanks!

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


More information about the llvm-commits mailing list