[llvm] [VPlan] Expand VPBlendRecipes to select instructions. NFC (PR #133993)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 22 07:14:55 PDT 2025


================
@@ -2711,6 +2711,20 @@ void VPlanTransforms::convertToConcreteRecipes(VPlan &Plan,
         continue;
       }
 
+      // Expand VPBlendRecipe into VPInstruction::Select
+      VPBuilder Builder(&R);
+      if (auto *Blend = dyn_cast<VPBlendRecipe>(&R)) {
+        VPValue *Select = Blend->getIncomingValue(0);
+        for (unsigned I = 1; I != Blend->getNumIncomingValues(); ++I) {
+          Select = Builder.createSelect(Blend->getMask(I),
+                                        Blend->getIncomingValue(I), Select,
+                                        R.getDebugLoc(), "predphi");
+          Select->setUnderlyingValue(Blend->getUnderlyingValue());
----------------
fhahn wrote:

Do we need this in the latest version?

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


More information about the llvm-commits mailing list