diff options
| author | Gil Rapaport <gil.rapaport@intel.com> | 2019-11-28 13:54:38 +0200 |
|---|---|---|
| committer | Gil Rapaport <gil.rapaport@intel.com> | 2020-01-10 09:24:59 +0200 |
| commit | 8647a72c4a52e0386c0397ce3fbd38121c18b873 (patch) | |
| tree | 1a0f302318d11d128581f1d1a30ef22ae3b24eb8 /llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp | |
| parent | 759c90456d418ffe69e1a2b4bcea2792491a6b5a (diff) | |
| download | bcm5719-llvm-8647a72c4a52e0386c0397ce3fbd38121c18b873.tar.gz bcm5719-llvm-8647a72c4a52e0386c0397ce3fbd38121c18b873.zip | |
[LV] VPValues for memory operation pointers (NFCI)
Memory instruction widening recipes use the pointer operand of their load/store
ingredient for generating the needed GEPs, making it difficult to feed these
recipes with pointers based on other ingredients or none at all.
This patch modifies these recipes to use a VPValue for the pointer instead, in
order to reduce ingredient def-use usage by ILV as a step towards full
VPlan-based def-use relations. The recipes are constructed with VPValues bound
to these ingredients, maintaining current behavior.
Differential revision: https://reviews.llvm.org/D70865
Diffstat (limited to 'llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp index fb81a396bbb..3f6a2efd55c 100644 --- a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp +++ b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp @@ -56,7 +56,9 @@ void VPlanTransforms::VPInstructionsToVPRecipes( VPRecipeBase *NewRecipe = nullptr; // Create VPWidenMemoryInstructionRecipe for loads and stores. if (isa<LoadInst>(Inst) || isa<StoreInst>(Inst)) - NewRecipe = new VPWidenMemoryInstructionRecipe(*Inst, nullptr /*Mask*/); + NewRecipe = new VPWidenMemoryInstructionRecipe( + *Inst, Plan->getOrAddVPValue(getLoadStorePointerOperand(Inst)), + nullptr /*Mask*/); else if (PHINode *Phi = dyn_cast<PHINode>(Inst)) { InductionDescriptor II = Inductions->lookup(Phi); if (II.getKind() == InductionDescriptor::IK_IntInduction || |

