[llvm] [VPlan] Introduce vputils::getSingleScalarClone (PR #161667)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 21 10:03:30 PDT 2025


================
@@ -250,3 +250,24 @@ vputils::getRecipesForUncountableExit(VPlan &Plan,
 
   return UncountableCondition;
 }
+
+VPSingleDefRecipe *vputils::getSingleScalarClone(VPSingleDefRecipe *R) {
+  return TypeSwitch<VPSingleDefRecipe *, VPSingleDefRecipe *>(R)
+      .Case<VPInstruction, VPWidenRecipe, VPWidenSelectRecipe,
----------------
artagnon wrote:

Should be fine for the moment, as all the uses in the use-sites are covered: when we add more recipes to handle in the use-sites, we should update this (follow-ups planned).

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


More information about the llvm-commits mailing list