[llvm] [VPlan] Sink recipes from the vector loop region in licm. (PR #168031)

Mel Chen via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 26 06:05:18 PST 2026


================
@@ -2545,6 +2545,58 @@ static void licm(VPlan &Plan) {
       R.moveBefore(*Preheader, Preheader->end());
     }
   }
+
+  VPDominatorTree VPDT(Plan);
+  // Sink recipes with no users inside the vector loop region into a dedicated
+  // exit block.
+  // TODO: Sinking to non-dedicated exits is not supported yet, as it would
+  // require splitting the edge to create a dedicated exit block. Without this,
+  // the sunk instruction would incorrectly execute on paths entering the exit
+  // block from other predecessors.
----------------
Mel-Chen wrote:

Removed it, thanks.
385ed83437bd7b93e14141c8ec96e1b9e08e6147

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


More information about the llvm-commits mailing list