llvm-project/llvm/lib/Transforms/Vectorize
Sanjay Patel 7ff57705ba [SLP] allow forming 2-way reduction patterns
We have a vector compare reduction problem seen in PR39665 comment 2:
https://bugs.llvm.org/show_bug.cgi?id=39665#c2

Or slightly reduced here:

define i1 @cmp2(<2 x double> %a0) {
  %a = fcmp ogt <2 x double> %a0, <double 1.0, double 1.0>
  %b = extractelement <2 x i1> %a, i32 0
  %c = extractelement <2 x i1> %a, i32 1
  %d = and i1 %b, %c
  ret i1 %d
}

SLP would not attempt to turn this into a vector reduction because there is an
artificial lower limit on that transform. We can not completely remove that limit
without inducing regressions though, so this patch just hacks an extra attempt at
creating a 2-way reduction to the end of the analysis.

As shown in the test file, we are still not getting some of the motivating cases,
so follow-on patches will be needed to solve those cases.

Differential Revision: https://reviews.llvm.org/D59710
2019-11-07 06:08:42 -05:00
..
CMakeLists.txt [LV][VPlan] Change to implement VPlan based predication for 2019-01-23 22:43:12 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LoadStoreVectorizer.cpp [LoadStoreVectorizer] vectorizeLoadChain - ensure we find a valid Type down the load chain. NFCI. 2019-09-15 16:44:35 +00:00
LoopVectorizationLegality.cpp [Alignment][NFC] Instructions::getLoadStoreAlignment 2019-10-21 14:49:28 +00:00
LoopVectorizationPlanner.h Temporarily Revert "[LV] Apply sink-after & interleave-groups as VPlan transformations (NFC)" 2019-11-06 21:58:28 -08:00
LoopVectorize.cpp Temporarily Revert "[LV] Apply sink-after & interleave-groups as VPlan transformations (NFC)" 2019-11-06 21:58:28 -08:00
SLPVectorizer.cpp [SLP] allow forming 2-way reduction patterns 2019-11-07 06:08:42 -05:00
VPRecipeBuilder.h Temporarily Revert "[LV] Apply sink-after & interleave-groups as VPlan transformations (NFC)" 2019-11-06 21:58:28 -08:00
VPlan.cpp Temporarily Revert "[LV] Apply sink-after & interleave-groups as VPlan transformations (NFC)" 2019-11-06 21:58:28 -08:00
VPlan.h Temporarily Revert "[LV] Apply sink-after & interleave-groups as VPlan transformations (NFC)" 2019-11-06 21:58:28 -08:00
VPlanDominatorTree.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
VPlanHCFGBuilder.cpp Hide two unused debugging methods, NFCI. 2019-03-01 17:15:21 +00:00
VPlanHCFGBuilder.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
VPlanHCFGTransforms.cpp [VPlan] Silence static analyzer dyn_cast null dereference warning. NFCI. 2019-09-22 13:02:00 +00:00
VPlanHCFGTransforms.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
VPlanLoopInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
VPlanPredicator.cpp Update files that were mistakenly added with the old file header to the 2019-02-11 08:07:38 +00:00
VPlanPredicator.h Update files that were mistakenly added with the old file header to the 2019-02-11 08:07:38 +00:00
VPlanSLP.cpp [VPlanSLP] Don't dereference a cast_or_null<VPInstruction> result. NFCI. 2019-09-16 11:22:44 +00:00
VPlanValue.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
VPlanVerifier.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
VPlanVerifier.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Vectorize.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00