<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/test/Transforms/SimplifyCFG/switch_create.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>[SimplifyCFG] Regenerate test checks (NFC)</title>
<updated>2024-06-05T15:06:25+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2024-06-05T15:05:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=07b9d231ff9baa6473b0dd588a3ce5330d3e4871'/>
<id>07b9d231ff9baa6473b0dd588a3ce5330d3e4871</id>
<content type='text'>
The output for many of these slightly changed (mainly due to
switch indentation), so mass-regenerate them.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The output for many of these slightly changed (mainly due to
switch indentation), so mass-regenerate them.
</pre>
</div>
</content>
</entry>
<entry>
<title>[SimplifyCFG] Convert tests to opaque pointers (NFC)</title>
<updated>2022-12-14T14:14:12+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2022-12-14T13:40:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8979ae42769e529b0f6fce3268492ffb49bd54b9'/>
<id>8979ae42769e529b0f6fce3268492ffb49bd54b9</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 runlines for SimplifyCFG pass tests to -passes syntax</title>
<updated>2022-12-05T18:12:20+00:00</updated>
<author>
<name>Roman Lebedev</name>
<email>lebedev.ri@gmail.com</email>
</author>
<published>2022-12-05T18:10:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d1d129356909af2f6fefd6f1b9335a39fe172e9a'/>
<id>d1d129356909af2f6fefd6f1b9335a39fe172e9a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[SimplifyCFG][PhaseOrdering] Defer lowering switch into an integer range comparison and branch until after at least the IPSCCP</title>
<updated>2022-02-17T09:13:55+00:00</updated>
<author>
<name>Roman Lebedev</name>
<email>lebedev.ri@gmail.com</email>
</author>
<published>2022-02-17T09:07:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=371fcb720e15906e8c63600253afcb806b9b10d0'/>
<id>371fcb720e15906e8c63600253afcb806b9b10d0</id>
<content type='text'>
That transformation is lossy, as discussed in
https://github.com/llvm/llvm-project/issues/53853
and https://github.com/rust-lang/rust/issues/85133#issuecomment-904185574

This is an alternative to D119839,
which would add a limited IPSCCP into SimplifyCFG.

Unlike lowering switch to lookup, we still want this transformation
to happen relatively early, but after giving a chance for the things
like CVP to do their thing. It seems like deferring it just until
the IPSCCP is enough for the tests at hand, but perhaps we need to
be more aggressive and disable it until CVP.

Fixes https://github.com/llvm/llvm-project/issues/53853
Refs. https://github.com/rust-lang/rust/issues/85133

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D119854
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
That transformation is lossy, as discussed in
https://github.com/llvm/llvm-project/issues/53853
and https://github.com/rust-lang/rust/issues/85133#issuecomment-904185574

This is an alternative to D119839,
which would add a limited IPSCCP into SimplifyCFG.

Unlike lowering switch to lookup, we still want this transformation
to happen relatively early, but after giving a chance for the things
like CVP to do their thing. It seems like deferring it just until
the IPSCCP is enough for the tests at hand, but perhaps we need to
be more aggressive and disable it until CVP.

Fixes https://github.com/llvm/llvm-project/issues/53853
Refs. https://github.com/rust-lang/rust/issues/85133

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D119854
</pre>
</div>
</content>
</entry>
<entry>
<title>[SimplifyCFG] Fix SimplifyBranchOnICmpChain to be undef/poison safe.</title>
<updated>2021-07-13T06:35:18+00:00</updated>
<author>
<name>hyeongyu kim</name>
<email>gusrb406@snu.ac.kr</email>
</author>
<published>2021-07-13T06:34:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e338d08ae609bf07b1f43ad15a6488e7c302800b'/>
<id>e338d08ae609bf07b1f43ad15a6488e7c302800b</id>
<content type='text'>
This patch fixes the problem of SimplifyBranchOnICmpChain that occurs
when extra values are Undef or poison.

Suppose the %mode is 51 and the %Cond is poison, and let's look at the
case below.
```
	%A = icmp ne i32 %mode, 0
	%B = icmp ne i32 %mode, 51
	%C = select i1 %A, i1 %B, i1 false
	%D = select i1 %C, i1 %Cond, i1 false
	br i1 %D, label %T, label %F
=&gt;
	br i1 %Cond, label %switch.early.test, label %F
switch.early.test:
	switch i32 %mode, label %T [
		i32 51, label %F
		i32 0, label %F
	]
```
incorrectness: https://alive2.llvm.org/ce/z/BWScX

Code before transformation will not raise UB because %C and %D is false,
and it will not use %Cond. But after transformation, %Cond is being used
immediately, and it will raise UB.

This problem can be solved by adding freeze instruction.

correctness: https://alive2.llvm.org/ce/z/x9x4oY

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D104569
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes the problem of SimplifyBranchOnICmpChain that occurs
when extra values are Undef or poison.

Suppose the %mode is 51 and the %Cond is poison, and let's look at the
case below.
```
	%A = icmp ne i32 %mode, 0
	%B = icmp ne i32 %mode, 51
	%C = select i1 %A, i1 %B, i1 false
	%D = select i1 %C, i1 %Cond, i1 false
	br i1 %D, label %T, label %F
=&gt;
	br i1 %Cond, label %switch.early.test, label %F
switch.early.test:
	switch i32 %mode, label %T [
		i32 51, label %F
		i32 0, label %F
	]
```
incorrectness: https://alive2.llvm.org/ce/z/BWScX

Code before transformation will not raise UB because %C and %D is false,
and it will not use %Cond. But after transformation, %Cond is being used
immediately, and it will raise UB.

This problem can be solved by adding freeze instruction.

correctness: https://alive2.llvm.org/ce/z/x9x4oY

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D104569
</pre>
</div>
</content>
</entry>
<entry>
<title>[SimplifyCFG] Tail-merging all blocks with `ret` terminator</title>
<updated>2021-06-24T10:15:39+00:00</updated>
<author>
<name>Roman Lebedev</name>
<email>lebedev.ri@gmail.com</email>
</author>
<published>2021-06-24T10:15:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9c4c2f24725e9f98b96fb360894276d342c3ba50'/>
<id>9c4c2f24725e9f98b96fb360894276d342c3ba50</id>
<content type='text'>
Based ontop of D104598, which is a NFCI-ish refactoring.
Here, a restriction, that only empty blocks can be merged, is lifted.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D104597
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Based ontop of D104598, which is a NFCI-ish refactoring.
Here, a restriction, that only empty blocks can be merged, is lifted.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D104597
</pre>
</div>
</content>
</entry>
<entry>
<title>[SimplifyCFG] Make test more robust (NFC)</title>
<updated>2021-04-04T15:14:59+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>nikita.ppv@gmail.com</email>
</author>
<published>2021-04-04T14:47:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=cb4443994e72ab524c70854dc93cd272ac1c4026'/>
<id>cb4443994e72ab524c70854dc93cd272ac1c4026</id>
<content type='text'>
These are supposed to test creation of a switch, so make sure
there is some actual code in the branches. Otherwise this could
be turned into a select instead.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These are supposed to test creation of a switch, so make sure
there is some actual code in the branches. Otherwise this could
be turned into a select instead.
</pre>
</div>
</content>
</entry>
<entry>
<title>[SimplifyCFG] Update SimplifyBranchOnICmpChain to recognize select form of and/or</title>
<updated>2021-01-18T23:53:40+00:00</updated>
<author>
<name>Juneyoung Lee</name>
<email>aqjune@gmail.com</email>
</author>
<published>2021-01-18T04:32:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=395c737d9fcefb0fb99ac6c524b1d47e697d31d6'/>
<id>395c737d9fcefb0fb99ac6c524b1d47e697d31d6</id>
<content type='text'>
This patch teaches SimplifyCFG::SimplifyBranchOnICmpChain to understand select form of
(x == C1 || x == C2 || ...) / (x != C1 &amp;&amp; x != C2 &amp;&amp; ...) and optimize them into switch if possible.
D93065 has more context about the transition, including links to the list of optimizations being updated.

Differential Revision: https://reviews.llvm.org/D93943
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch teaches SimplifyCFG::SimplifyBranchOnICmpChain to understand select form of
(x == C1 || x == C2 || ...) / (x != C1 &amp;&amp; x != C2 &amp;&amp; ...) and optimize them into switch if possible.
D93065 has more context about the transition, including links to the list of optimizations being updated.

Differential Revision: https://reviews.llvm.org/D93943
</pre>
</div>
</content>
</entry>
<entry>
<title>[SimplifyCFG] Teach tryToSimplifyUncondBranchWithICmpInIt() to preserve DomTree</title>
<updated>2021-01-01T00:25:25+00:00</updated>
<author>
<name>Roman Lebedev</name>
<email>lebedev.ri@gmail.com</email>
</author>
<published>2020-12-31T23:44:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e1440d43bca5438544a12bebe82a3cd1a37157f1'/>
<id>e1440d43bca5438544a12bebe82a3cd1a37157f1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add tests for D93943 (NFC)</title>
<updated>2020-12-31T20:59:52+00:00</updated>
<author>
<name>Juneyoung Lee</name>
<email>aqjune@gmail.com</email>
</author>
<published>2020-12-31T20:59:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3c60e9bac86804a32bf515b9381c91fb64d769f8'/>
<id>3c60e9bac86804a32bf515b9381c91fb64d769f8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
