llvm-project/llvm/lib/Transforms/Vectorize
Simon Pilgrim 876e99bf2c [SLPVectorizer] Add initial alternate opcode support for cast instructions. (REAPPLIED)
We currently only support binary instructions in the alternate opcode shuffles.

This patch is an initial attempt at adding cast instructions as well, this raises several issues that we probably want to address as we continue to generalize the alternate mechanism:

1 - Duplication of cost determination - we should probably add scalar/vector costs helper functions and get BoUpSLP::getEntryCost to use them instead of determining costs directly.
2 - Support alternate instructions with the same opcode (e.g. casts with different src types) - alternate vectorization of calls with different IntrinsicIDs will require this.
3 - Allow alternates to be a different instruction type - mixing binary/cast/call etc.
4 - Allow passthrough of unsupported alternate instructions - related to PR30787/D28907 'copyable' elements.

Reapplied with fix to only accept 2 different casts if they come from the same source type.

Differential Revision: https://reviews.llvm.org/D49135

llvm-svn: 336812
2018-07-11 15:05:10 +00:00
..
CMakeLists.txt [VPlan] Add VPInstruction to VPRecipe transformation. 2018-06-18 18:28:49 +00:00
LLVMBuild.txt
LoadStoreVectorizer.cpp Move Analysis/Utils/Local.h back to Transforms 2018-06-04 21:23:21 +00:00
LoopVectorizationLegality.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
LoopVectorizationPlanner.h [VPlan] Move recipe construction to VPRecipeBuilder. 2018-06-08 17:30:45 +00:00
LoopVectorize.cpp [DebugInfo][LoopVectorize] Preserve DL in induction PHI and Add 2018-07-10 13:29:50 +00:00
SLPVectorizer.cpp [SLPVectorizer] Add initial alternate opcode support for cast instructions. (REAPPLIED) 2018-07-11 15:05:10 +00:00
VPRecipeBuilder.h [VPlan] Move recipe construction to VPRecipeBuilder. 2018-06-08 17:30:45 +00:00
VPlan.cpp [VPlan][LV] Introduce condition bit in VPBlockBase 2018-07-09 15:57:09 +00:00
VPlan.h [VPlan][LV] Introduce condition bit in VPBlockBase 2018-07-09 15:57:09 +00:00
VPlanHCFGBuilder.cpp [VPlan][LV] Introduce condition bit in VPBlockBase 2018-07-09 15:57:09 +00:00
VPlanHCFGBuilder.h [VPlan] Reland r332654 and silence unused func warning 2018-05-21 18:14:23 +00:00
VPlanHCFGTransforms.cpp [VPlan] Add VPInstruction to VPRecipe transformation. 2018-06-18 18:28:49 +00:00
VPlanHCFGTransforms.h [VPlan] Add VPInstruction to VPRecipe transformation. 2018-06-18 18:28:49 +00:00
VPlanValue.h [VPlan] Reland r332654 and silence unused func warning 2018-05-21 18:14:23 +00:00
VPlanVerifier.cpp [VPlan][LV] Introduce condition bit in VPBlockBase 2018-07-09 15:57:09 +00:00
VPlanVerifier.h [VPlan] Reland r332654 and silence unused func warning 2018-05-21 18:14:23 +00:00
Vectorize.cpp [LLVM-C] [OCaml] Remove LLVMAddBBVectorizePass 2018-05-28 16:58:10 +00:00