<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/test/Transforms/LoopVectorize/vplan-iv-transforms.ll, 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] Use createScalarZExtOrTrunc when expanding expandVPWidenIntOrFpInduction</title>
<updated>2025-06-20T18:18:49+00:00</updated>
<author>
<name>Luke Lau</name>
<email>luke@igalia.com</email>
</author>
<published>2025-06-20T18:17:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=521adc9fa270c1524f125f155327bf8f3743bb87'/>
<id>521adc9fa270c1524f125f155327bf8f3743bb87</id>
<content type='text'>
Split off from #144666
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Split off from #144666
</pre>
</div>
</content>
</entry>
<entry>
<title>[VPlan] Expand VPWidenIntOrFpInductionRecipe into separate recipes (#118638)</title>
<updated>2025-06-17T17:24:07+00:00</updated>
<author>
<name>Luke Lau</name>
<email>luke@igalia.com</email>
</author>
<published>2025-06-17T17:24:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9dd1c66e8ffba73fead13aaf359e290f6e1d4899'/>
<id>9dd1c66e8ffba73fead13aaf359e290f6e1d4899</id>
<content type='text'>
The motivation of this PR is to make #115274 easier to implement, and
should allow us to add EVL support by just passing EVL to the VF
operand.

The current difficulty with widening IVs with EVL is that
VPWidenIntOrFpInductionRecipe generates its own backedge value. Since
it's a VPHeaderPHIRecipe the VF operand must be in the preheader, which
means we can't use the EVL since it's defined in the loop body.

The gist in this PR is to take the approach in #114305 and expand
VPWidenIntOrFpInductionRecipe into several recipes for the initial
value, phi and backedge value just before execution. I.e. this example:

```
  vector.ph:
  Successor(s): vector loop

  &lt;x1&gt; vector loop: {
    vector.body:
      WIDEN-INDUCTION %i = phi %start, %step, %vf
      ...
      EMIT branch-on-count ...
    No successors
  }
```

gets expanded to:

``` 
vector.ph:
  ...
  vp&lt;%induction.start&gt; = ...
  vp&lt;%induction.increment&gt; = ...

Successor(s): vector loop

&lt;x1&gt; vector loop: {
  vector.body:
    ir&lt;%i&gt; = WIDEN-PHI vp&lt;%induction.start&gt;, vp&lt;%vec.ind.next&gt;
    ...
    vp&lt;%vec.ind.next&gt; = add ir&lt;%i&gt;, vp&lt;%induction.increment&gt;
    EMIT branch-on-count ...
  No successors
}
```

This allows us to a value defined in the loop in the backedge value, and
also means we can just reuse the existing backedge fixups in
VPlan::execute without having to specially handle it ourselves.

After this #115274 should just become a matter of setting the VF operand
to EVL (and building the increment step in the loop body, not the
preheader).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The motivation of this PR is to make #115274 easier to implement, and
should allow us to add EVL support by just passing EVL to the VF
operand.

The current difficulty with widening IVs with EVL is that
VPWidenIntOrFpInductionRecipe generates its own backedge value. Since
it's a VPHeaderPHIRecipe the VF operand must be in the preheader, which
means we can't use the EVL since it's defined in the loop body.

The gist in this PR is to take the approach in #114305 and expand
VPWidenIntOrFpInductionRecipe into several recipes for the initial
value, phi and backedge value just before execution. I.e. this example:

```
  vector.ph:
  Successor(s): vector loop

  &lt;x1&gt; vector loop: {
    vector.body:
      WIDEN-INDUCTION %i = phi %start, %step, %vf
      ...
      EMIT branch-on-count ...
    No successors
  }
```

gets expanded to:

``` 
vector.ph:
  ...
  vp&lt;%induction.start&gt; = ...
  vp&lt;%induction.increment&gt; = ...

Successor(s): vector loop

&lt;x1&gt; vector loop: {
  vector.body:
    ir&lt;%i&gt; = WIDEN-PHI vp&lt;%induction.start&gt;, vp&lt;%vec.ind.next&gt;
    ...
    vp&lt;%vec.ind.next&gt; = add ir&lt;%i&gt;, vp&lt;%induction.increment&gt;
    EMIT branch-on-count ...
  No successors
}
```

This allows us to a value defined in the loop in the backedge value, and
also means we can just reuse the existing backedge fixups in
VPlan::execute without having to specially handle it ourselves.

After this #115274 should just become a matter of setting the VF operand
to EVL (and building the increment step in the loop body, not the
preheader).</pre>
</div>
</content>
</entry>
<entry>
<title>[VPlan] Use regular phi printing for resume phis.</title>
<updated>2025-06-07T20:49:54+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-06-07T20:49:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=24bd4e59b9e2901f8797484e7a231178d91807aa'/>
<id>24bd4e59b9e2901f8797484e7a231178d91807aa</id>
<content type='text'>
As discussed in https://github.com/llvm/llvm-project/pull/140405, remove
custom printing for resume-phis and update tests.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As discussed in https://github.com/llvm/llvm-project/pull/140405, remove
custom printing for resume-phis and update tests.
</pre>
</div>
</content>
</entry>
<entry>
<title>[VPlan] Use EMIT-SCALAR when printing single-scalar VPInstructions. (#141428)</title>
<updated>2025-05-29T08:29:06+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-05-29T08:29:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5b85e4b08d2e356c40f5fbe8da98f94467c2f0cb'/>
<id>5b85e4b08d2e356c40f5fbe8da98f94467c2f0cb</id>
<content type='text'>
By using SINGLE-SCALAR when printing, it is clear in the debug output
that those VPInstructions only produce a single scalar.

Split off in preparation for
https://github.com/llvm/llvm-project/pull/140623.

PR: https://github.com/llvm/llvm-project/pull/141428</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
By using SINGLE-SCALAR when printing, it is clear in the debug output
that those VPInstructions only produce a single scalar.

Split off in preparation for
https://github.com/llvm/llvm-project/pull/140623.

PR: https://github.com/llvm/llvm-project/pull/141428</pre>
</div>
</content>
</entry>
<entry>
<title>[VPlan] Connect Entry to scalar preheader during initial construction. (#140132)</title>
<updated>2025-05-27T15:07:56+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-05-27T15:07:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d56deea1e4fb16bdf2789fe1b9a18084f42fd933'/>
<id>d56deea1e4fb16bdf2789fe1b9a18084f42fd933</id>
<content type='text'>
Update initial construction to connect the Plan's entry to the scalar
preheader during initial construction. This moves a small part of the
 skeleton creation out of ILV and will also enable replacing
 VPInstruction::ResumePhi with regular VPPhi recipes.

Resume phis need 2 incoming values to start with, the second being the
bypass value from the scalar ph (and used to replicate the incoming
value for other bypass blocks). Adding the extra edge ensures we
incoming values for resume phis match the incoming blocks.

PR: https://github.com/llvm/llvm-project/pull/140132</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update initial construction to connect the Plan's entry to the scalar
preheader during initial construction. This moves a small part of the
 skeleton creation out of ILV and will also enable replacing
 VPInstruction::ResumePhi with regular VPPhi recipes.

Resume phis need 2 incoming values to start with, the second being the
bypass value from the scalar ph (and used to replicate the incoming
value for other bypass blocks). Adding the extra edge ensures we
incoming values for resume phis match the incoming blocks.

PR: https://github.com/llvm/llvm-project/pull/140132</pre>
</div>
</content>
</entry>
<entry>
<title>[VPlan] Compute induction end values in VPlan. (#112145)</title>
<updated>2024-12-29T19:05:08+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2024-12-29T19:05:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7f3428d3ed71d87a2088b77b6cab9f3d86544234'/>
<id>7f3428d3ed71d87a2088b77b6cab9f3d86544234</id>
<content type='text'>
Use createDerivedIV to compute IV end values directly in VPlan, instead
of creating them up-front.

This allows updating IV users outside the loop as follow-up.

Depends on https://github.com/llvm/llvm-project/pull/110004 and
https://github.com/llvm/llvm-project/pull/109975.

PR: https://github.com/llvm/llvm-project/pull/112145</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use createDerivedIV to compute IV end values directly in VPlan, instead
of creating them up-front.

This allows updating IV users outside the loop as follow-up.

Depends on https://github.com/llvm/llvm-project/pull/110004 and
https://github.com/llvm/llvm-project/pull/109975.

PR: https://github.com/llvm/llvm-project/pull/112145</pre>
</div>
</content>
</entry>
<entry>
<title>[VPlan] Modernize VPWidenIntOrFpInductionRecipe printing (NFC).</title>
<updated>2024-12-15T20:46:52+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2024-12-15T20:45:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=43045051d4114f2490bf0e6b01a7969d5c27ee04'/>
<id>43045051d4114f2490bf0e6b01a7969d5c27ee04</id>
<content type='text'>
Modernize VPWidenIntOrFpInductionRecipe printing by including the result
VPValue and all operand VPValues, similar to VPScalarIVStepsRecipe and
VPDerivedIVRecipe.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Modernize VPWidenIntOrFpInductionRecipe printing by including the result
VPValue and all operand VPValues, similar to VPScalarIVStepsRecipe and
VPDerivedIVRecipe.
</pre>
</div>
</content>
</entry>
<entry>
<title>[VPlan] Hook IR blocks into VPlan during skeleton creation (NFC) (#114292)</title>
<updated>2024-12-12T15:58:16+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2024-12-12T15:58:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6c8f41d3367476d35ac730abf9f980291737193b'/>
<id>6c8f41d3367476d35ac730abf9f980291737193b</id>
<content type='text'>
As a first step to move towards modeling the full skeleton in VPlan,
start by wrapping IR blocks created during legacy skeleton creation in
VPIRBasicBlocks and hook them into the VPlan. This means the skeleton
CFG is represented in VPlan, just before execute. This allows moving
parts of skeleton creation into recipes in the VPBBs gradually.

Note that this allows retiring some manual DT updates, as this will be
handled automatically during VPlan execution.

PR: https://github.com/llvm/llvm-project/pull/114292</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As a first step to move towards modeling the full skeleton in VPlan,
start by wrapping IR blocks created during legacy skeleton creation in
VPIRBasicBlocks and hook them into the VPlan. This means the skeleton
CFG is represented in VPlan, just before execute. This allows moving
parts of skeleton creation into recipes in the VPBBs gradually.

Note that this allows retiring some manual DT updates, as this will be
handled automatically during VPlan execution.

PR: https://github.com/llvm/llvm-project/pull/114292</pre>
</div>
</content>
</entry>
<entry>
<title>[VPlan] Use RPOT for VPlan codegen and printing.</title>
<updated>2024-12-06T21:49:00+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2024-12-06T21:49:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6797b0f0c002c9f3dda7a2b502ddf33e2c8f6777'/>
<id>6797b0f0c002c9f3dda7a2b502ddf33e2c8f6777</id>
<content type='text'>
This split off changes for more complex CFGs in VPlan from both
    https://github.com/llvm/llvm-project/pull/114292
    https://github.com/llvm/llvm-project/pull/112138

This simplifies their respective diffs.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This split off changes for more complex CFGs in VPlan from both
    https://github.com/llvm/llvm-project/pull/114292
    https://github.com/llvm/llvm-project/pull/112138

This simplifies their respective diffs.
</pre>
</div>
</content>
</entry>
<entry>
<title>[VPlan] Introduce scalar loop header in plan, remove VPLiveOut. (#109975)</title>
<updated>2024-10-31T20:36:44+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2024-10-31T20:36:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b021464d35ca9569d430d968034e21c1e592cbb9'/>
<id>b021464d35ca9569d430d968034e21c1e592cbb9</id>
<content type='text'>
Update VPlan to include the scalar loop header. This allows retiring
VPLiveOut, as the remaining live-outs can now be handled by adding
operands to the wrapped phis in the scalar loop header.

Note that the current version only includes the scalar loop header, no
other loop blocks and also does not wrap it in a region block.

PR: https://github.com/llvm/llvm-project/pull/109975</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update VPlan to include the scalar loop header. This allows retiring
VPLiveOut, as the remaining live-outs can now be handled by adding
operands to the wrapped phis in the scalar loop header.

Note that the current version only includes the scalar loop header, no
other loop blocks and also does not wrap it in a region block.

PR: https://github.com/llvm/llvm-project/pull/109975</pre>
</div>
</content>
</entry>
</feed>
