[llvm] [LV] Support binary and unary operations with EVL-vectorization (PR #93854)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 17 13:17:09 PDT 2024
================
@@ -8457,14 +8457,15 @@ void LoopVectorizationPlanner::buildVPlansWithVPRecipes(ElementCount MinVF,
for (ElementCount VF = MinVF; ElementCount::isKnownLT(VF, MaxVFTimes2);) {
VFRange SubRange = {VF, MaxVFTimes2};
if (auto Plan = tryToBuildVPlanWithVPRecipes(SubRange)) {
+ bool IsScalarVPlan = Plan->hasVF(ElementCount::getFixed(1));
// Now optimize the initial VPlan.
- if (!Plan->hasVF(ElementCount::getFixed(1)))
+ if (!IsScalarVPlan)
VPlanTransforms::truncateToMinimalBitwidths(
*Plan, CM.getMinimalBitwidths(), PSE.getSE()->getContext());
VPlanTransforms::optimize(*Plan, *PSE.getSE());
// TODO: try to put it close to addActiveLaneMask().
// Discard the plan if it is not EVL-compatible
- if (CM.foldTailWithEVL() &&
----------------
fhahn wrote:
This is independent of the unary/binary support, right? Can be split off + a test that forces VF =1 and IC> 1?
https://github.com/llvm/llvm-project/pull/93854
More information about the llvm-commits
mailing list