summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Transforms
diff options
context:
space:
mode:
authorGil Rapaport <gil.rapaport@intel.com>2019-10-16 21:39:53 +0300
committerGil Rapaport <gil.rapaport@intel.com>2019-12-06 13:41:19 +0200
commit39ccc099c901ca511f0c43f163adef6699038326 (patch)
tree72cad377c703b01e25bdaa56784bbc5d0f1add8e /llvm/unittests/Transforms
parentb31a531f9bbf7a3ae193df6009f5ee542f760017 (diff)
downloadbcm5719-llvm-39ccc099c901ca511f0c43f163adef6699038326.tar.gz
bcm5719-llvm-39ccc099c901ca511f0c43f163adef6699038326.zip
[LV] Record GEP widening decisions in recipe (NFCI)
InnerLoopVectorizer's code called during VPlan execution still relies on original IR's def-use relations to decide which vector code to generate, limiting VPlan transformations ability to modify def-use relations and still have ILV generate the vector code. This commit moves GEP operand queries controlling how GEPs are widened to a dedicated recipe and extracts GEP widening code to its own ILV method taking those recorded decisions as arguments. This reduces ingredient def-use usage by ILV as a step towards full VPlan-based def-use relations. Differential revision: https://reviews.llvm.org/D69067
Diffstat (limited to 'llvm/unittests/Transforms')
-rw-r--r--llvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp b/llvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp
index f5894a4f10f..2b15e627058 100644
--- a/llvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp
+++ b/llvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp
@@ -89,8 +89,8 @@ TEST_F(VPlanHCFGTest, testBuildHCFGInnerLoop) {
LoopVectorizationLegality::InductionList Inductions;
SmallPtrSet<Instruction *, 1> DeadInstructions;
- VPlanHCFGTransforms::VPInstructionsToVPRecipes(Plan, &Inductions,
- DeadInstructions);
+ VPlanHCFGTransforms::VPInstructionsToVPRecipes(
+ LI->getLoopFor(LoopHeader), Plan, &Inductions, DeadInstructions);
}
TEST_F(VPlanHCFGTest, testVPInstructionToVPRecipesInner) {
@@ -119,8 +119,8 @@ TEST_F(VPlanHCFGTest, testVPInstructionToVPRecipesInner) {
LoopVectorizationLegality::InductionList Inductions;
SmallPtrSet<Instruction *, 1> DeadInstructions;
- VPlanHCFGTransforms::VPInstructionsToVPRecipes(Plan, &Inductions,
- DeadInstructions);
+ VPlanHCFGTransforms::VPInstructionsToVPRecipes(
+ LI->getLoopFor(LoopHeader), Plan, &Inductions, DeadInstructions);
VPBlockBase *Entry = Plan->getEntry()->getEntryBasicBlock();
EXPECT_NE(nullptr, Entry->getSingleSuccessor());
@@ -136,7 +136,7 @@ TEST_F(VPlanHCFGTest, testVPInstructionToVPRecipesInner) {
auto *Phi = dyn_cast<VPWidenPHIRecipe>(&*Iter++);
EXPECT_NE(nullptr, Phi);
- auto *Idx = dyn_cast<VPWidenRecipe>(&*Iter++);
+ auto *Idx = dyn_cast<VPWidenGEPRecipe>(&*Iter++);
EXPECT_NE(nullptr, Idx);
auto *Load = dyn_cast<VPWidenMemoryInstructionRecipe>(&*Iter++);
OpenPOWER on IntegriCloud