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

Mel Chen via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 21 06:47:18 PST 2025


================
@@ -2224,16 +2224,46 @@ void VPlanTransforms::cse(VPlan &Plan) {
   }
 }
 
-/// Move loop-invariant recipes out of the vector loop region in \p Plan.
-static void licm(VPlan &Plan) {
-  VPBasicBlock *Preheader = Plan.getVectorPreheader();
+/// Sink recipes with no users inside the vector loop region into a dedicated
+/// exit block.
----------------
Mel-Chen wrote:

Hmm, I think we should keep a dedicated exit block. I think this wording is quite accurate. What do you think?

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


More information about the llvm-commits mailing list