[llvm-branch-commits] [llvm] ae00879 - [VPlan] Use VPTransformState::set in widenGEP.

Florian Hahn via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Nov 27 09:10:30 PST 2020


Author: Florian Hahn
Date: 2020-11-27T17:01:55Z
New Revision: ae008798a42943da709aaedb32936217422e2a6b

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

LOG: [VPlan] Use VPTransformState::set in widenGEP.

This patch updates widenGEP to manage the resulting vector values using
the VPValue of VPWidenGEP recipe.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index d72c18061b82..0f519d136b31 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -4322,7 +4322,7 @@ void InnerLoopVectorizer::widenGEP(GetElementPtrInst *GEP, VPValue *VPDef,
     auto *Clone = Builder.Insert(GEP->clone());
     for (unsigned Part = 0; Part < UF; ++Part) {
       Value *EntryPart = Builder.CreateVectorSplat(VF, Clone);
-      VectorLoopValueMap.setVectorValue(GEP, Part, EntryPart);
+      State.set(VPDef, GEP, EntryPart, Part);
       addMetadata(EntryPart, GEP);
     }
   } else {
@@ -4359,7 +4359,7 @@ void InnerLoopVectorizer::widenGEP(GetElementPtrInst *GEP, VPValue *VPDef,
               : Builder.CreateGEP(GEP->getSourceElementType(), Ptr, Indices);
       assert((VF.isScalar() || NewGEP->getType()->isVectorTy()) &&
              "NewGEP is not a pointer vector");
-      VectorLoopValueMap.setVectorValue(GEP, Part, NewGEP);
+      State.set(VPDef, GEP, NewGEP, Part);
       addMetadata(NewGEP, GEP);
     }
   }


        


More information about the llvm-branch-commits mailing list