<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Transforms/Vectorize/VPlanUtils.h, branch users/nico/python-2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[VPlan] Simplify code in single scalar transform code (NFC).</title>
<updated>2025-06-28T21:53:14+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-06-28T21:52:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bdb299a67eb863b1b1e6241d7964e7108f1a42aa'/>
<id>bdb299a67eb863b1b1e6241d7964e7108f1a42aa</id>
<content type='text'>
Adjust code as suggested post-commit 3b7b95f78e2.

https://github.com/llvm/llvm-project/commit/3b7b95f78e24aca5175b8f864bfea2953a2dd34f#r160997427
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adjust code as suggested post-commit 3b7b95f78e2.

https://github.com/llvm/llvm-project/commit/3b7b95f78e24aca5175b8f864bfea2953a2dd34f#r160997427
</pre>
</div>
</content>
</entry>
<entry>
<title>[VPlan] Support VPWidenSelectRecipe in narrowToSingleScalar.</title>
<updated>2025-06-27T14:42:42+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-06-27T14:42:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3b7b95f78e24aca5175b8f864bfea2953a2dd34f'/>
<id>3b7b95f78e24aca5175b8f864bfea2953a2dd34f</id>
<content type='text'>
VPWidenSelectRecipes are single scalars if all their operands are. Add
support for narrowing them to a single scalar VPReplicateRecipe.

This fixes a crash after
https://github.com/llvm/llvm-project/pull/142433 (aa24029319083) when
due to a replicate recipe not being converted to single-scalar being
hoisted to the vector preheader.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
VPWidenSelectRecipes are single scalars if all their operands are. Add
support for narrowing them to a single scalar VPReplicateRecipe.

This fixes a crash after
https://github.com/llvm/llvm-project/pull/142433 (aa24029319083) when
due to a replicate recipe not being converted to single-scalar being
hoisted to the vector preheader.
</pre>
</div>
</content>
</entry>
<entry>
<title>[VPlan] Add getIndexFor(Predecessor|Successor) helpers (NFC).</title>
<updated>2025-05-31T11:53:05+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-05-31T11:53:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=78eafb14f7c91a40d493b29a3ce977f327c13892'/>
<id>78eafb14f7c91a40d493b29a3ce977f327c13892</id>
<content type='text'>
Move code to get the index of a predecessor and successor to helpers in
VPBlockBase, to avoid duplication and enable future reuse.

Split off from https://github.com/llvm/llvm-project/pull/140409.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move code to get the index of a predecessor and successor to helpers in
VPBlockBase, to avoid duplication and enable future reuse.

Split off from https://github.com/llvm/llvm-project/pull/140409.
</pre>
</div>
</content>
</entry>
<entry>
<title>[VPlan] Replace VPRegionBlock with explicit CFG before execute (NFCI). (#117506)</title>
<updated>2025-05-24T18:17:16+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-05-24T18:17:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=dcef154b5caf6556e69bb18bbb0506d274aa474e'/>
<id>dcef154b5caf6556e69bb18bbb0506d274aa474e</id>
<content type='text'>
Building on top of https://github.com/llvm/llvm-project/pull/114305,
replace VPRegionBlocks with explicit CFG before executing.

This brings the final VPlan closer to the IR that is generated and
helps to simplify codegen.

It will also enable further simplifications of phi handling during
execution and transformations that do not have to preserve the 
canonical IV required by loop regions. This for example could include
replacing the canonical IV with an EVL based phi while completely
removing the original canonical IV.

PR: https://github.com/llvm/llvm-project/pull/117506</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Building on top of https://github.com/llvm/llvm-project/pull/114305,
replace VPRegionBlocks with explicit CFG before executing.

This brings the final VPlan closer to the IR that is generated and
helps to simplify codegen.

It will also enable further simplifications of phi handling during
execution and transformations that do not have to preserve the 
canonical IV required by loop regions. This for example could include
replacing the canonical IV with an EVL based phi while completely
removing the original canonical IV.

PR: https://github.com/llvm/llvm-project/pull/117506</pre>
</div>
</content>
</entry>
<entry>
<title>[VPlan] Rename isUniform(AfterVectorization) to isSingleScalar (NFC). (#140134)</title>
<updated>2025-05-16T15:38:39+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-05-16T15:38:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=04fde85057cb4da2e560da629df7a52702eac489'/>
<id>04fde85057cb4da2e560da629df7a52702eac489</id>
<content type='text'>
Update the naming in VPReplicateRecipe and vputils to the more accurate
isSingleScalar, as the functions check for cases where only a single
scalar is needed, either because it produces the same value for all
lanes or has only their first lane used.

Discussed in https://github.com/llvm/llvm-project/pull/139150.

PR: https://github.com/llvm/llvm-project/pull/140134</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update the naming in VPReplicateRecipe and vputils to the more accurate
isSingleScalar, as the functions check for cases where only a single
scalar is needed, either because it produces the same value for all
lanes or has only their first lane used.

Discussed in https://github.com/llvm/llvm-project/pull/139150.

PR: https://github.com/llvm/llvm-project/pull/140134</pre>
</div>
</content>
</entry>
<entry>
<title>[VPlan] Don't rely on region check in isUniformAfterVectorization. (#137883)</title>
<updated>2025-05-02T14:42:21+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-05-02T14:42:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9a26b2903bd1c3fbb3a71747f9c53aec93158595'/>
<id>9a26b2903bd1c3fbb3a71747f9c53aec93158595</id>
<content type='text'>
Generalize isUniformAfterVectorization check to not rely on the region,
but purely work on checking operands and opcodes.

This will be needed when disolving the vector region
(https://github.com/llvm/llvm-project/pull/117506) and improves codegen
slightly in some cases.

PR: https://github.com/llvm/llvm-project/pull/137883</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Generalize isUniformAfterVectorization check to not rely on the region,
but purely work on checking operands and opcodes.

This will be needed when disolving the vector region
(https://github.com/llvm/llvm-project/pull/117506) and improves codegen
slightly in some cases.

PR: https://github.com/llvm/llvm-project/pull/137883</pre>
</div>
</content>
</entry>
<entry>
<title>[VPlan] Use replaceSuccessor/replacePredecessor in insertBlock (NFC).</title>
<updated>2025-04-25T19:46:10+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-04-25T19:46:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c4d84e1b0021a231898cb0325db4f9687908dd82'/>
<id>c4d84e1b0021a231898cb0325db4f9687908dd82</id>
<content type='text'>
Use replaceSuccessor/replacePredecessor in
insertBlockAfter/insertBlockBefore. This preserves the predecessor
order, which in turns is needed to not invalidate existing phi recipes.

At the moment this is NFC, but enables additional uses in the future.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use replaceSuccessor/replacePredecessor in
insertBlockAfter/insertBlockBefore. This preserves the predecessor
order, which in turns is needed to not invalidate existing phi recipes.

At the moment this is NFC, but enables additional uses in the future.
</pre>
</div>
</content>
</entry>
<entry>
<title>[VPlan] Introduce VPInstructionWithType, use instead of VPScalarCast(NFC) (#129706)</title>
<updated>2025-04-10T21:30:40+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-04-10T21:30:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6a9e8fc50c87a01798b847e623139fc21249c2bb'/>
<id>6a9e8fc50c87a01798b847e623139fc21249c2bb</id>
<content type='text'>
There are some opcodes that currently require specialized recipes, due
to their result type not being implied by their operands, including
casts.

This leads to duplication from defining multiple full recipes.

This patch introduces a new VPInstructionWithType subclass that also
stores the result type. The general idea is to have opcodes needing to
specify a result type to use this general recipe. The current patch
replaces VPScalarCastRecipe with VInstructionWithType, a similar patch
for VPWidenCastRecipe will follow soon.

There are a few proposed opcodes that should also benefit, without the
need of workarounds:
* https://github.com/llvm/llvm-project/pull/129508
* https://github.com/llvm/llvm-project/pull/119284

PR: https://github.com/llvm/llvm-project/pull/129706</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are some opcodes that currently require specialized recipes, due
to their result type not being implied by their operands, including
casts.

This leads to duplication from defining multiple full recipes.

This patch introduces a new VPInstructionWithType subclass that also
stores the result type. The general idea is to have opcodes needing to
specify a result type to use this general recipe. The current patch
replaces VPScalarCastRecipe with VInstructionWithType, a similar patch
for VPWidenCastRecipe will follow soon.

There are a few proposed opcodes that should also benefit, without the
need of workarounds:
* https://github.com/llvm/llvm-project/pull/129508
* https://github.com/llvm/llvm-project/pull/119284

PR: https://github.com/llvm/llvm-project/pull/129706</pre>
</div>
</content>
</entry>
<entry>
<title>[VPlan] Remove duplicated VPDerivedIVRecipe handling (NFC).</title>
<updated>2025-03-30T21:27:44+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-03-30T21:27:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5f56eaff8b033e5d87818bdc9543c1463cc0a755'/>
<id>5f56eaff8b033e5d87818bdc9543c1463cc0a755</id>
<content type='text'>
Also handled by an earlier, more general if above.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also handled by an earlier, more general if above.
</pre>
</div>
</content>
</entry>
<entry>
<title>[VPlan] Handle scalar casts and blend in isUniformAfterVectorization.</title>
<updated>2025-03-30T21:21:12+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-03-30T21:20:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fd8fb7148674456ce3fb338864c9aa9f576feb22'/>
<id>fd8fb7148674456ce3fb338864c9aa9f576feb22</id>
<content type='text'>
Currently should be NFC, but will be used by
https://github.com/llvm/llvm-project/pull/117506.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently should be NFC, but will be used by
https://github.com/llvm/llvm-project/pull/117506.
</pre>
</div>
</content>
</entry>
</feed>
