<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/test/Transforms/LoopPredication/predicate-exits.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>[llvm] Remove `br i1 undef` from  some regression tests [NFC] (#117112)</title>
<updated>2024-11-21T08:06:56+00:00</updated>
<author>
<name>Lee Wei</name>
<email>lee10202013@gmail.com</email>
</author>
<published>2024-11-21T08:06:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=abb9f9fa06ef22be2b0287b9047d5cfed71d91d4'/>
<id>abb9f9fa06ef22be2b0287b9047d5cfed71d91d4</id>
<content type='text'>
This PR removes tests with `br i1 undef` under
`llvm/tests/Transforms/Loop*, Lower*`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR removes tests with `br i1 undef` under
`llvm/tests/Transforms/Loop*, Lower*`.</pre>
</div>
</content>
</entry>
<entry>
<title>[LoopPredication] Fix where we generate widened condition. PR61963</title>
<updated>2023-04-10T14:37:05+00:00</updated>
<author>
<name>Anna Thomas</name>
<email>anna@azul.com</email>
</author>
<published>2023-04-06T18:42:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=27f8a62a541e650d8d6ee4b7001b78e976519306'/>
<id>27f8a62a541e650d8d6ee4b7001b78e976519306</id>
<content type='text'>
Loop predication's predicateLoopExit pass does two incorrect things:

It sinks the widenable call into the loop, thereby converting an invariant condition to a variant one
It widens the widenable call at a branch thereby converting the branch into a loop-varying one.

The latter is problematic when the branch may have been loop-invariant
and prior optimizations (such as indvars) may have relied on this
fact, and updated the deopt state accordingly.

Now, when we widen this with a loop-varying condition, the deopt state
is no longer correct.
https://github.com/llvm/llvm-project/issues/61963 fixed.

Differential Revision: https://reviews.llvm.org/D147662
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Loop predication's predicateLoopExit pass does two incorrect things:

It sinks the widenable call into the loop, thereby converting an invariant condition to a variant one
It widens the widenable call at a branch thereby converting the branch into a loop-varying one.

The latter is problematic when the branch may have been loop-invariant
and prior optimizations (such as indvars) may have relied on this
fact, and updated the deopt state accordingly.

Now, when we widen this with a loop-varying condition, the deopt state
is no longer correct.
https://github.com/llvm/llvm-project/issues/61963 fixed.

Differential Revision: https://reviews.llvm.org/D147662
</pre>
</div>
</content>
</entry>
<entry>
<title>[Test] Regenerate checks in test file</title>
<updated>2023-03-24T08:43:02+00:00</updated>
<author>
<name>Max Kazantsev</name>
<email>mkazantsev@azul.com</email>
</author>
<published>2023-03-24T08:42:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0858b5369b816fd0d3ec95ef4eef6e790ce8187b'/>
<id>0858b5369b816fd0d3ec95ef4eef6e790ce8187b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[LoopPredication] Convert tests to opaque pointers (NFC)</title>
<updated>2023-01-02T15:52:03+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2023-01-02T15:51:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ba89c66771a8512ddbee7391e8ea11f7149f7ae2'/>
<id>ba89c66771a8512ddbee7391e8ea11f7149f7ae2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC] Port all LoopPredication tests to `-passes=` syntax</title>
<updated>2022-12-07T23:38:46+00:00</updated>
<author>
<name>Roman Lebedev</name>
<email>lebedev.ri@gmail.com</email>
</author>
<published>2022-12-07T23:27:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e23e1594d834726fadb681ee4517d3df42964654'/>
<id>e23e1594d834726fadb681ee4517d3df42964654</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[LoopPredication] Fix MemorySSA crash in predicateLoopExits</title>
<updated>2021-09-03T01:26:07+00:00</updated>
<author>
<name>Anna Thomas</name>
<email>anna@azul.com</email>
</author>
<published>2021-09-02T21:26:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f661ce209f190c993bc8635adba5476edbe90a4a'/>
<id>f661ce209f190c993bc8635adba5476edbe90a4a</id>
<content type='text'>
The attached testcase crashes without the patch (Not the same accesses
in the same order).

When we move instructions before another instruction, we also need to
update the memory accesses corresponding to it.

Reviewed-By: asbirlea
Differential Revision: https://reviews.llvm.org/D109197
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The attached testcase crashes without the patch (Not the same accesses
in the same order).

When we move instructions before another instruction, we also need to
update the memory accesses corresponding to it.

Reviewed-By: asbirlea
Differential Revision: https://reviews.llvm.org/D109197
</pre>
</div>
</content>
</entry>
<entry>
<title>[LoopPredication]  Preserve MemorySSA</title>
<updated>2021-08-26T15:36:25+00:00</updated>
<author>
<name>Anna Thomas</name>
<email>anna@azul.com</email>
</author>
<published>2021-08-25T20:19:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=55bdb14026ca21a2b773f749a01bf7e6f3fa7c0b'/>
<id>55bdb14026ca21a2b773f749a01bf7e6f3fa7c0b</id>
<content type='text'>
Since LICM has now unconditionally moved to MemorySSA based form, all
passes that run in same LPM as LICM need to preserve MemorySSA (i.e. our
downstream pipeline).

Added loop-mssa to all tests and perform -verify-memoryssa within
LoopPredication itself.

Differential Revision: https://reviews.llvm.org/D108724
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since LICM has now unconditionally moved to MemorySSA based form, all
passes that run in same LPM as LICM need to preserve MemorySSA (i.e. our
downstream pipeline).

Added loop-mssa to all tests and perform -verify-memoryssa within
LoopPredication itself.

Differential Revision: https://reviews.llvm.org/D108724
</pre>
</div>
</content>
</entry>
<entry>
<title>[NFCI] SCEVExpander: emit intrinsics for integral {u,s}{min,max} SCEV expressions</title>
<updated>2021-03-06T18:52:46+00:00</updated>
<author>
<name>Roman Lebedev</name>
<email>lebedev.ri@gmail.com</email>
</author>
<published>2021-02-26T13:48:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b46c085d2b6d15873fb53718f0a70b3848e19e4a'/>
<id>b46c085d2b6d15873fb53718f0a70b3848e19e4a</id>
<content type='text'>
These intrinsics, not the icmp+select are the canonical form nowadays,
so we might as well directly emit them.

This should not cause any regressions, but if it does,
then then they would needed to be fixed regardless.

Note that this doesn't deal with `SCEVExpander::isHighCostExpansion()`,
but that is a pessimization, not a correctness issue.

Additionally, the non-intrinsic form has issues with undef,
see https://reviews.llvm.org/D88287#2587863
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These intrinsics, not the icmp+select are the canonical form nowadays,
so we might as well directly emit them.

This should not cause any regressions, but if it does,
then then they would needed to be fixed regardless.

Note that this doesn't deal with `SCEVExpander::isHighCostExpansion()`,
but that is a pessimization, not a correctness issue.

Additionally, the non-intrinsic form has issues with undef,
see https://reviews.llvm.org/D88287#2587863
</pre>
</div>
</content>
</entry>
<entry>
<title>[LoopPred] Robustly handle partially unswitched loops</title>
<updated>2019-11-21T23:44:36+00:00</updated>
<author>
<name>Philip Reames</name>
<email>listmail@philipreames.com</email>
</author>
<published>2019-11-21T23:26:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=dfb7a9091affce6e5a8fdb017b4e2d58675bb9b0'/>
<id>dfb7a9091affce6e5a8fdb017b4e2d58675bb9b0</id>
<content type='text'>
We may end up with a case where we have a widenable branch above the loop, but not all widenable branches within the loop have been removed.  Since a widenable branch inhibit SCEVs ability to reason about exit counts (by design), we have a tradeoff between effectiveness of this optimization and allowing future widening of the branches within the loop.  LoopPred is thought to be one of the most important optimizations for range check elimination, so let's pay the cost.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We may end up with a case where we have a widenable branch above the loop, but not all widenable branches within the loop have been removed.  Since a widenable branch inhibit SCEVs ability to reason about exit counts (by design), we have a tradeoff between effectiveness of this optimization and allowing future widening of the branches within the loop.  LoopPred is thought to be one of the most important optimizations for range check elimination, so let's pay the cost.
</pre>
</div>
</content>
</entry>
<entry>
<title>Broaden the definition of a "widenable branch"</title>
<updated>2019-11-21T18:46:16+00:00</updated>
<author>
<name>Philip Reames</name>
<email>listmail@philipreames.com</email>
</author>
<published>2019-11-21T18:44:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=aaea24802bf5de0420f1ef5f3660a9765e23dea8'/>
<id>aaea24802bf5de0420f1ef5f3660a9765e23dea8</id>
<content type='text'>
As a reminder, a "widenable branch" is the pattern "br i1 (and i1 X, WC()), label %taken, label %untaken" where "WC" is the widenable condition intrinsics. The semantics of such a branch (derived from the semantics of WC) is that a new condition can be added into the condition arbitrarily without violating legality.

Broaden the definition in two ways:
    Allow swapped operands to the br (and X, WC()) form
    Allow widenable branch w/trivial condition (i.e. true) which takes form of br i1 WC()

The former is just general robustness (e.g. for X = non-instruction this is what instcombine produces). The later is specifically important as partial unswitching of a widenable range check produces exactly this form above the loop.

Differential Revision: https://reviews.llvm.org/D70502
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As a reminder, a "widenable branch" is the pattern "br i1 (and i1 X, WC()), label %taken, label %untaken" where "WC" is the widenable condition intrinsics. The semantics of such a branch (derived from the semantics of WC) is that a new condition can be added into the condition arbitrarily without violating legality.

Broaden the definition in two ways:
    Allow swapped operands to the br (and X, WC()) form
    Allow widenable branch w/trivial condition (i.e. true) which takes form of br i1 WC()

The former is just general robustness (e.g. for X = non-instruction this is what instcombine produces). The later is specifically important as partial unswitching of a widenable range check produces exactly this form above the loop.

Differential Revision: https://reviews.llvm.org/D70502
</pre>
</div>
</content>
</entry>
</feed>
