[llvm] [VPlan] Remove ExtractLastLane for plans with scalar VFs. (PR #171145)

via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 11 06:18:12 PST 2025


================
@@ -371,10 +371,9 @@ void UnrollState::unrollBlock(VPBlockBase *VPB) {
       continue;
     }
 
-    if (match(&R, m_ExtractLastLaneOfLastPart(m_VPValue(Op0))) ||
-        match(&R, m_ExtractPenultimateElement(m_VPValue(Op0)))) {
-      addUniformForAllParts(cast<VPSingleDefRecipe>(&R));
-      if (Plan.hasScalarVFOnly()) {
+    if (Plan.hasScalarVFOnly()) {
+      if (match(&R, m_ExtractLastPart(m_VPValue(Op0))) ||
+          match(&R, m_ExtractPenultimateElement(m_VPValue(Op0)))) {
----------------
ayalz wrote:

Would be simpler handle each match separately?

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


More information about the llvm-commits mailing list