<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp, 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>[InstCombine] Fold icmp of gep chain with base (#144065)</title>
<updated>2025-07-02T07:23:36+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-07-02T07:23:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=83272a48493948c5190be00e7e734a0335be86f8'/>
<id>83272a48493948c5190be00e7e734a0335be86f8</id>
<content type='text'>
Fold icmp between a chain of geps and its base pointer. Previously only
a single gep was supported.
    
This will be extended to handle the case of two gep chains with a common
base in a followup.

This helps to avoid regressions after #137297.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fold icmp between a chain of geps and its base pointer. Previously only
a single gep was supported.
    
This will be extended to handle the case of two gep chains with a common
base in a followup.

This helps to avoid regressions after #137297.</pre>
</div>
</content>
</entry>
<entry>
<title>[InstCombine] Fix use after free</title>
<updated>2025-07-01T13:18:49+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-07-01T13:18:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bedd7ddb7fb54c24a296ea6c32606f8172d13896'/>
<id>bedd7ddb7fb54c24a296ea6c32606f8172d13896</id>
<content type='text'>
Load the nowrap flags before calling EmitGEPOffset(), as this may
free the instruction.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Load the nowrap flags before calling EmitGEPOffset(), as this may
free the instruction.
</pre>
</div>
</content>
</entry>
<entry>
<title>[InstCombine] Rewrite multi-use GEPs when simplifying comparison (#146100)</title>
<updated>2025-07-01T12:26:47+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-07-01T12:26:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b8b74945514358f1ebeac0874172f37fc7bfa38e'/>
<id>b8b74945514358f1ebeac0874172f37fc7bfa38e</id>
<content type='text'>
We already do this when both sides are a GEP, but not if only one is.
This ensures that the offset arithmetic is not duplicated.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We already do this when both sides are a GEP, but not if only one is.
This ensures that the offset arithmetic is not duplicated.</pre>
</div>
</content>
</entry>
<entry>
<title>[InstCombine] Fold `ceil(X / (2 ^ C)) == 0` -&gt; `X == 0` (#143683)</title>
<updated>2025-06-23T02:51:17+00:00</updated>
<author>
<name>Iris Shi</name>
<email>0.0@owo.li</email>
</author>
<published>2025-06-23T02:51:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=32f911f3e83b0a3d2242502940c487998672ffd4'/>
<id>32f911f3e83b0a3d2242502940c487998672ffd4</id>
<content type='text'>
Co-authored-by: Yingwei Zheng &lt;dtcxzyw2333@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Yingwei Zheng &lt;dtcxzyw2333@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[InstCombine] fold icmp with add/sub instructions having the same operands (#143241)</title>
<updated>2025-06-16T15:05:30+00:00</updated>
<author>
<name>Acthinks Yang</name>
<email>yangzhh@mail.ustc.edu.cn</email>
</author>
<published>2025-06-16T15:05:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f2734aa25e808e8c1967f7125fdea6c8b2dab9e1'/>
<id>f2734aa25e808e8c1967f7125fdea6c8b2dab9e1</id>
<content type='text'>
Closes #143211.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes #143211.</pre>
</div>
</content>
</entry>
<entry>
<title>[ValueTracking] Make Depth last default arg (NFC) (#142384)</title>
<updated>2025-06-03T16:12:24+00:00</updated>
<author>
<name>Ramkumar Ramachandra</name>
<email>ramkumar.ramachandra@codasip.com</email>
</author>
<published>2025-06-03T16:12:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b40e4ceaa61c5f14ca261e2952e7f85a066403e2'/>
<id>b40e4ceaa61c5f14ca261e2952e7f85a066403e2</id>
<content type='text'>
Having a finite Depth (or recursion limit) for computeKnownBits is very
limiting, but is currently a load-bearing necessity, as all KnownBits
are recomputed on each call and there is no caching. As a prerequisite
for an effort to remove the recursion limit altogether, either using a
clever caching technique, or writing a easily-invalidable KnownBits
analysis, make the Depth argument in APIs in ValueTracking uniformly the
last argument with a default value. This would aid in removing the
argument when the time comes, as many callers that currently pass 0
explicitly are now updated to omit the argument altogether.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Having a finite Depth (or recursion limit) for computeKnownBits is very
limiting, but is currently a load-bearing necessity, as all KnownBits
are recomputed on each call and there is no caching. As a prerequisite
for an effort to remove the recursion limit altogether, either using a
clever caching technique, or writing a easily-invalidable KnownBits
analysis, make the Depth argument in APIs in ValueTracking uniformly the
last argument with a default value. This would aid in removing the
argument when the time comes, as many callers that currently pass 0
explicitly are now updated to omit the argument altogether.</pre>
</div>
</content>
</entry>
<entry>
<title>[InstCombine] Fix comment typo that incorrectly described fold (NFC) (#141105)</title>
<updated>2025-05-22T18:28:45+00:00</updated>
<author>
<name>AZero13</name>
<email>gfunni234@gmail.com</email>
</author>
<published>2025-05-22T18:28:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=eaf911bb98509e47b35376ffbc800dca6c803793'/>
<id>eaf911bb98509e47b35376ffbc800dca6c803793</id>
<content type='text'>
icmp ne X, (sext (icmp ne X, 0)) --&gt; X != 0 &amp;&amp; X != -1, not X != 0 &amp;&amp; X
== -1, which would go to X == -1 anyway.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
icmp ne X, (sext (icmp ne X, 0)) --&gt; X != 0 &amp;&amp; X != -1, not X != 0 &amp;&amp; X
== -1, which would go to X == -1 anyway.</pre>
</div>
</content>
</entry>
<entry>
<title>[InstCombine] Introduce `foldICmpBinOpWithConstantViaTruthTable` folding</title>
<updated>2025-05-13T07:04:25+00:00</updated>
<author>
<name>Antonio Frighetto</name>
<email>me@antoniofrighetto.com</email>
</author>
<published>2025-05-13T07:04:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=adfd59fdb8bfff0b68e54b3ce84c88154f4de2d3'/>
<id>adfd59fdb8bfff0b68e54b3ce84c88154f4de2d3</id>
<content type='text'>
Match icmps of binops where both operands are select with constant arms,
i.e., `icmp pred (select A ? C1 : C2) binop (select B ? C3 : C4), C5`.
Fold such patterns by creating a truth table of the possible four
constant variants, and materialize back the optimal logic from it via
`createLogicFromTable` helper. This also generalizes an existing fold,
which has therefore been dropped.

Proofs: https://alive2.llvm.org/ce/z/NS7Vzu.

Fixes: https://github.com/llvm/llvm-project/issues/138212.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Match icmps of binops where both operands are select with constant arms,
i.e., `icmp pred (select A ? C1 : C2) binop (select B ? C3 : C4), C5`.
Fold such patterns by creating a truth table of the possible four
constant variants, and materialize back the optimal logic from it via
`createLogicFromTable` helper. This also generalizes an existing fold,
which has therefore been dropped.

Proofs: https://alive2.llvm.org/ce/z/NS7Vzu.

Fixes: https://github.com/llvm/llvm-project/issues/138212.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix MSVC "not all control paths return a value" warning. NFC.</title>
<updated>2025-04-30T11:32:22+00:00</updated>
<author>
<name>Simon Pilgrim</name>
<email>llvm-dev@redking.me.uk</email>
</author>
<published>2025-04-30T11:31:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=26da8870ede83fb9759a5c068b713beb742399ec'/>
<id>26da8870ede83fb9759a5c068b713beb742399ec</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[InstCombine] Offset both sides of an equality icmp (#134086)</title>
<updated>2025-04-29T16:19:23+00:00</updated>
<author>
<name>Yingwei Zheng</name>
<email>dtcxzyw2333@gmail.com</email>
</author>
<published>2025-04-29T16:19:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d20796dab776f80c26915c44d558357f3459a184'/>
<id>d20796dab776f80c26915c44d558357f3459a184</id>
<content type='text'>
Proof: https://alive2.llvm.org/ce/z/zQ2UW4
Closes https://github.com/llvm/llvm-project/issues/134024</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Proof: https://alive2.llvm.org/ce/z/zQ2UW4
Closes https://github.com/llvm/llvm-project/issues/134024</pre>
</div>
</content>
</entry>
</feed>
