[llvm] 21ac5c8 - [VPlan] Remove duplicated ExtractFromEnd handling from unoll (NFC).

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 26 03:39:29 PDT 2024


Author: Florian Hahn
Date: 2024-09-26T11:38:45+01:00
New Revision: 21ac5c86614b13686f4d7611064d9e71c3af30c8

URL: https://github.com/llvm/llvm-project/commit/21ac5c86614b13686f4d7611064d9e71c3af30c8
DIFF: https://github.com/llvm/llvm-project/commit/21ac5c86614b13686f4d7611064d9e71c3af30c8.diff

LOG: [VPlan] Remove duplicated ExtractFromEnd handling from unoll (NFC).

ExtractFromEnd is already handled earlier, remove duplicated code.

Added: 
    

Modified: 
    llvm/lib/Transforms/Vectorize/VPlanUnroll.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/VPlanUnroll.cpp b/llvm/lib/Transforms/Vectorize/VPlanUnroll.cpp
index 4907d3f0397274..ca78f32506ef71 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanUnroll.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanUnroll.cpp
@@ -264,24 +264,6 @@ void UnrollState::unrollRecipeByUF(VPRecipeBase &R) {
     return;
 
   if (auto *VPI = dyn_cast<VPInstruction>(&R)) {
-    VPValue *Op0, *Op1;
-    if (match(VPI, m_VPInstruction<VPInstruction::ExtractFromEnd>(
-                       m_VPValue(Op0), m_VPValue(Op1)))) {
-      VPI->setOperand(1, getValueForPart(Op1, UF - 1));
-      addUniformForAllParts(VPI);
-      if (Plan.hasScalarVFOnly()) {
-        // Extracting from end with VF = 1 implies retrieving the scalar part UF
-        // - Op1.
-        unsigned Offset =
-            cast<ConstantInt>(Op1->getLiveInIRValue())->getZExtValue();
-        VPI->replaceAllUsesWith(getValueForPart(Op0, UF - Offset));
-      } else {
-        // Otherwise we extract from the last part.
-        remapOperands(VPI, UF - 1);
-      }
-      return;
-    }
-
     if (vputils::onlyFirstPartUsed(VPI)) {
       addUniformForAllParts(VPI);
       return;


        


More information about the llvm-commits mailing list