History log of /llvm-project/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp (Results 1 – 25 of 265)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init
# 713482fc 27-Jan-2025 Florian Hahn <flo@fhahn.com>

[VPlan] Use State.get to extract lane mask for BranchOnMask.

Simplifies the code slightly and avoids redundant extracts/broadcasts if
the operand is live-in or already scalar.


# 09a29fcc 27-Jan-2025 Florian Hahn <flo@fhahn.com>

[VPlan] Don't collect live-ins in collectUsersInExitBlocks. (NFC) (#123819)

Live-ins don't need to be handled, other than adding to the exit phi
recipe. Do that early and assert that otherwise the

[VPlan] Don't collect live-ins in collectUsersInExitBlocks. (NFC) (#123819)

Live-ins don't need to be handled, other than adding to the exit phi
recipe. Do that early and assert that otherwise the exit value is
defined in the vector loop region.

This should enable simply skipping other exit values that do not need
further fixing, e.g. if handling the exit value from the early exit
directly in handleUncountableEarlyExit.

PR: https://github.com/llvm/llvm-project/pull/123819

show more ...


# aff1242b 24-Jan-2025 Elvis Wang <elvis.wang@sifive.com>

[LV] Align debug location of the widen-phi to the original phi. (#120338)

This patch align the debug location of the widen-phi to the debug
location of original phi.

Split from: #120054


# 6c787ff6 21-Jan-2025 Florian Hahn <flo@fhahn.com>

Revert "[LV]: Teach LV to recursively (de)interleave. (#122989)"

This reverts commit 9491f75e1d912b277247450d1c7b6d56f7faf885.

This triggers an assert when building with SVE enabled.
https://lab.ll

Revert "[LV]: Teach LV to recursively (de)interleave. (#122989)"

This reverts commit 9491f75e1d912b277247450d1c7b6d56f7faf885.

This triggers an assert when building with SVE enabled.
https://lab.llvm.org/buildbot/#/builders/143/builds/4795

show more ...


# edf3a55b 17-Jan-2025 John Brawn <john.brawn@arm.com>

[LoopVectorize][NFC] Centralize the setting of CostKind (#121937)

In each class which calculates instruction costs (VPCostContext,
LoopVectorizationCostModel, GeneratedRTChecks) set the CostKind on

[LoopVectorize][NFC] Centralize the setting of CostKind (#121937)

In each class which calculates instruction costs (VPCostContext,
LoopVectorizationCostModel, GeneratedRTChecks) set the CostKind once in
the constructor instead of in each function that calculates a cost. This
is in preparation for potentially changing the CostKind when compiling
for optsize.

show more ...


# 9491f75e 17-Jan-2025 Hassnaa Hamdi <hassnaa.hamdi@arm.com>

Reland: [LV]: Teach LV to recursively (de)interleave. (#122989)

This commit relands the changes from "[LV]: Teach LV to recursively
(de)interleave. #89018"

Reason for revert:
- The patch expose

Reland: [LV]: Teach LV to recursively (de)interleave. (#122989)

This commit relands the changes from "[LV]: Teach LV to recursively
(de)interleave. #89018"

Reason for revert:
- The patch exposed a bug in the IA pass, the bug is now fixed and landed by commit: #122643

show more ...


# 0294dab7 15-Jan-2025 LiqinWeng <liqin.weng@spacemit.com>

[LV][VPlan] Add fast flags for selectRecipe (#121023)

Change the inheritance of class VPWidenSelectRecipe to class
VPRecipeWithIRFlags, which allows recipe of the select to pass the
fastmath flags

[LV][VPlan] Add fast flags for selectRecipe (#121023)

Change the inheritance of class VPWidenSelectRecipe to class
VPRecipeWithIRFlags, which allows recipe of the select to pass the
fastmath flags.The patch of #119847 will add the fastmath flag to for
recipe

show more ...


Revision tags: llvmorg-19.1.7
# 795e35a6 13-Jan-2025 Sam Tebbs <samuel.tebbs@arm.com>

Reland "[LoopVectorizer] Add support for partial reductions" with non-phi operand fix. (#121744)

This relands the reverted #120721 with a fix for cases where neither
reduction operand are the reduct

Reland "[LoopVectorizer] Add support for partial reductions" with non-phi operand fix. (#121744)

This relands the reverted #120721 with a fix for cases where neither
reduction operand are the reduction phi. Only
63114239cc8d26225a0ef9920baacfc7cc00fc58 and
63114239cc8d26225a0ef9920baacfc7cc00fc58 are new on top of the reverted
PR.

---------

Co-authored-by: Nicholas Guy <nicholas.guy@arm.com>

show more ...


# f0d5104c 08-Jan-2025 Luke Lau <luke@igalia.com>

[VPlan] Handle some VPInstructions in may{Read,Write}FromMemory (#120058)

This just copies the same conservative definition from mayWriteToMemory,
and enables more VPInstructions to be hoisted out i

[VPlan] Handle some VPInstructions in may{Read,Write}FromMemory (#120058)

This just copies the same conservative definition from mayWriteToMemory,
and enables more VPInstructions to be hoisted out in LICM.

I think this should give more accurate costs, and I was able to build
llvm-test-suite without the legacy-vplan cost model assertion going off.

show more ...


# a77346ba 06-Jan-2025 Yingwei Zheng <dtcxzyw2333@gmail.com>

[IRBuilder] Refactor FMF interface (#121657)

Up to now, the only way to set specified FMF flags in IRBuilder is to
use `FastMathFlagGuard`. It makes the code ugly and hard to maintain.

This patc

[IRBuilder] Refactor FMF interface (#121657)

Up to now, the only way to set specified FMF flags in IRBuilder is to
use `FastMathFlagGuard`. It makes the code ugly and hard to maintain.

This patch introduces a helper class `FMFSource` to replace the original
parameter `Instruction *FMFSource` in IRBuilder. To maximize the
compatibility, it accepts an instruction or a specified FMF.
This patch also removes the use of `FastMathFlagGuard` in some simple
cases.

Compile-time impact:
https://llvm-compile-time-tracker.com/compare.php?from=f87a9db8322643ccbc324e317a75b55903129b55&to=9397e712f6010be15ccf62f12740e9b4a67de2f4&stat=instructions%3Au

show more ...


# f4230b43 05-Jan-2025 Florian Hahn <flo@fhahn.com>

[VPlan] Add and use debug location for VPScalarCastRecipe.

Update the recipe it always take a debug location and set it.


# b06a45c6 31-Dec-2024 Florian Hahn <flo@fhahn.com>

[VPlan] Add all blocks to outer loop if present during ::execute (NFCI).

This ensures that all blocks created during VPlan execution are properly
added to an enclosing loop, if present.

Split off f

[VPlan] Add all blocks to outer loop if present during ::execute (NFCI).

This ensures that all blocks created during VPlan execution are properly
added to an enclosing loop, if present.

Split off from https://github.com/llvm/llvm-project/pull/108378 and also
needed once more of the skeleton blocks are created directly via VPlan.

This also allows removing the custom logic for early-exit loop
vectorization added as part of
https://github.com/llvm/llvm-project/pull/117008.

show more ...


# 332d2647 30-Dec-2024 Muhammad Omair Javaid <omair.javaid@linaro.org>

Revert "[LV]: Teach LV to recursively (de)interleave. (#89018)"

This reverts commit ccfe0de0e1e37ed369c9bf89dd0188ba0afb2e9a.

This breaks LLVM build on AArch64 SVE Linux buildbots
https://lab.llvm

Revert "[LV]: Teach LV to recursively (de)interleave. (#89018)"

This reverts commit ccfe0de0e1e37ed369c9bf89dd0188ba0afb2e9a.

This breaks LLVM build on AArch64 SVE Linux buildbots
https://lab.llvm.org/buildbot/#/builders/143/builds/4462
https://lab.llvm.org/buildbot/#/builders/17/builds/4902
https://lab.llvm.org/buildbot/#/builders/4/builds/4399
https://lab.llvm.org/buildbot/#/builders/41/builds/4299

show more ...


# 4d8f9594 27-Dec-2024 Zequan Wu <zequanwu@google.com>

Revert "Reland "[LoopVectorizer] Add support for partial reductions" (#120721)"

This reverts commit c858bf620c3ab2a4db53e84b9365b553c3ad1aa6 as it casuse optimization crash on -O2, see https://githu

Revert "Reland "[LoopVectorizer] Add support for partial reductions" (#120721)"

This reverts commit c858bf620c3ab2a4db53e84b9365b553c3ad1aa6 as it casuse optimization crash on -O2, see https://github.com/llvm/llvm-project/pull/120721#issuecomment-2563192057

show more ...


# ccfe0de0 27-Dec-2024 Hassnaa Hamdi <hassnaa.hamdi@arm.com>

[LV]: Teach LV to recursively (de)interleave. (#89018)

Currently available intrinsics are only ld2/st2, which don't support interleaving factor > 2.
This patch teaches the LV to use ld2/st2 recurs

[LV]: Teach LV to recursively (de)interleave. (#89018)

Currently available intrinsics are only ld2/st2, which don't support interleaving factor > 2.
This patch teaches the LV to use ld2/st2 recursively to support high
interleaving factors.

show more ...


# 47e1c87a 27-Dec-2024 Elvis Wang <elvis.wang@sifive.com>

[VPlan] Set debug location for VPReduction/VPWidenIntrinsicRecipe. (#120054)

This patch add missing debug location for
VPReduction/VPWidenIntrinsicRecipe.


# 2dfe1b40 26-Dec-2024 Florian Hahn <flo@fhahn.com>

[VPlan] Remove stray space when printing reverse vector pointer.

printFlags() takes care of printing the required space, remove the extra
printed space between flags and operands.


# 2d038cae 24-Dec-2024 Florian Hahn <flo@fhahn.com>

[VPlan] Remove stray space when printing VPWidenCastRecipe.

printFlags() already takes care of printing a single space if there are
no flags. Remove the extra space when printing a recipe without fl

[VPlan] Remove stray space when printing VPWidenCastRecipe.

printFlags() already takes care of printing a single space if there are
no flags. Remove the extra space when printing a recipe without flags.

show more ...


# c858bf62 24-Dec-2024 Sam Tebbs <samuel.tebbs@arm.com>

Reland "[LoopVectorizer] Add support for partial reductions" (#120721)

This re-lands the reverted #92418

When the VF is small enough so that dividing the VF by the scaling
factor results in 1, the

Reland "[LoopVectorizer] Add support for partial reductions" (#120721)

This re-lands the reverted #92418

When the VF is small enough so that dividing the VF by the scaling
factor results in 1, the reduction phi execution thinks the VF is scalar
and sets the reduction's output as a scalar value, tripping assertions
expecting a vector value. The latest commit in this PR fixes that by
using `State.VF` in the scalar check, rather than the divided VF.

---------

Co-authored-by: Nicholas Guy <nicholas.guy@arm.com>

show more ...


# 9ab5474e 23-Dec-2024 Benjamin Maxwell <benjamin.maxwell@arm.com>

[LV] Rename `ToVectorTy` to `toVectorTy` (NFC) (#120404)

This is for consistency with other helpers (and also follows the LLVM
naming conventions).


# e1833e3a 22-Dec-2024 Florian Hahn <flo@fhahn.com>

[VPlan] Simplify redundant VPDerivedIVRecipe (NFC).

Split DerivedIV simplification off from
https://github.com/llvm/llvm-project/pull/112145 and use to remove the
need for extra checks in createScal

[VPlan] Simplify redundant VPDerivedIVRecipe (NFC).

Split DerivedIV simplification off from
https://github.com/llvm/llvm-project/pull/112145 and use to remove the
need for extra checks in createScalarIVSteps. Required an extra
simplification run after IV transforms.

show more ...


# 9b496deb 21-Dec-2024 Florian Hahn <flo@fhahn.com>

[VPlan] Set and use debug location for VPPredInstPHIRecipe.

Update the recipe it always set its debug location and use it during IR
generation.


# bb86c5dd 21-Dec-2024 Florian Hahn <flo@fhahn.com>

[VPlan] Use inferScalarType in VPInstruction::ResumePhi codegen (NFC).

Use VPlan-based type analysis to retrieve type of phi node. Also adds
missing type inference for ResumePhi and ComputeReduction

[VPlan] Use inferScalarType in VPInstruction::ResumePhi codegen (NFC).

Use VPlan-based type analysis to retrieve type of phi node. Also adds
missing type inference for ResumePhi and ComputeReductionResult opcodes.

show more ...


# 5f096fd2 19-Dec-2024 Florian Hahn <flo@fhahn.com>

Revert "[LoopVectorizer] Add support for partial reductions (#92418)"

This reverts commit 060d62b48aeb5080ffcae1dc56e41a06c6f56701.

It looks like this is triggering an assertion when build llvm-tes

Revert "[LoopVectorizer] Add support for partial reductions (#92418)"

This reverts commit 060d62b48aeb5080ffcae1dc56e41a06c6f56701.

It looks like this is triggering an assertion when build llvm-test-suite
on ARM64 macOS.

Reproducer from MultiSource/Benchmarks/Ptrdist/bc/number.c

target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-n32:64-S128-Fn32"
target triple = "arm64-apple-macosx15.0.0"

define void @test(i64 %idx.neg, i8 %0) #0 {
entry:
br label %while.body

while.body: ; preds = %while.body, %entry
%n1ptr.0.idx131 = phi i64 [ %n1ptr.0.add, %while.body ], [ %idx.neg, %entry ]
%n2ptr.0.idx130 = phi i64 [ %n2ptr.0.add, %while.body ], [ 0, %entry ]
%sum.1129 = phi i64 [ %add99, %while.body ], [ 0, %entry ]
%n1ptr.0.add = add i64 %n1ptr.0.idx131, 1
%conv = sext i8 %0 to i64
%n2ptr.0.add = add i64 %n2ptr.0.idx130, 1
%1 = load i8, ptr null, align 1
%conv97 = sext i8 %1 to i64
%mul = mul i64 %conv97, %conv
%add99 = add i64 %mul, %sum.1129
%cmp94 = icmp ugt i64 %n1ptr.0.idx131, 0
%cmp95 = icmp ne i64 %n2ptr.0.idx130, -1
%2 = and i1 %cmp94, %cmp95
br i1 %2, label %while.body, label %while.end.loopexit

while.end.loopexit: ; preds = %while.body
%add99.lcssa = phi i64 [ %add99, %while.body ]
ret void
}

attributes #0 = { "target-cpu"="apple-m1" }

> opt -p loop-vectorize
Assertion failed: ((VF.isScalar() || V->getType()->isVectorTy()) && "scalar values must be stored as (0, 0)"), function set, file VPlan.h, line 284.

show more ...


# 45c01e8a 19-Dec-2024 Finn Plummer <50529406+inbelic@users.noreply.github.com>

[NFC][TargetTransformInfo][VectorUtils] Consolidate `isVectorIntrinsic...` api (#117635)

- update `VectorUtils:isVectorIntrinsicWithScalarOpAtArg` to use TTI for
all uses, to allow specifiction of

[NFC][TargetTransformInfo][VectorUtils] Consolidate `isVectorIntrinsic...` api (#117635)

- update `VectorUtils:isVectorIntrinsicWithScalarOpAtArg` to use TTI for
all uses, to allow specifiction of target specific intrinsics
- add TTI to the `isVectorIntrinsicWithStructReturnOverloadAtField` api
- update TTI api to provide `isTargetIntrinsicWith...` functions and
consistently name them
- move `isTriviallyScalarizable` to VectorUtils

- update all uses of the api and provide the TTI parameter

Resolves #117030

show more ...


1234567891011