[llvm] [VPlan] First step towards VPlan cost modeling (LegacyCM in CostCtx) (PR #92555)
via llvm-commits
llvm-commits at lists.llvm.org
Sun May 26 10:01:42 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;
----------------
ayalz wrote:
Worth adding a TODO to match additional patterns preserving uniformity of booleans, e.g., AND/OR/etc.?
https://github.com/llvm/llvm-project/pull/92555
More information about the llvm-commits
mailing list