[llvm] [VPlan] Rewrite sinkScalarOperands (NFC) (PR #151696)

via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 3 04:45:03 PST 2025


================
@@ -151,59 +151,65 @@ static bool cannotHoistOrSinkRecipe(const VPRecipeBase &R) {
 
 static bool sinkScalarOperands(VPlan &Plan) {
   auto Iter = vp_depth_first_deep(Plan.getEntry());
+  bool ScalarVFOnly = Plan.hasScalarVFOnly();
   bool Changed = false;
+
+  auto IsValidSinkCandidate = [ScalarVFOnly](VPBasicBlock *SinkTo,
+                                             VPSingleDefRecipe *Candidate) {
+    // We only know how to duplicate VPReplicateRecipes and
----------------
ayalz wrote:

```suggestion
    // We only know how to sink VPReplicateRecipes and
```

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


More information about the llvm-commits mailing list