<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Transforms/Scalar/EarlyCSE.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>[EarlyCSE] Add support for writeonly call CSE (#145474)</title>
<updated>2025-06-30T09:56:32+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-06-30T09:56:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=de6b8cdc41123b71c2306384fd177a18a504a187'/>
<id>de6b8cdc41123b71c2306384fd177a18a504a187</id>
<content type='text'>
Add support for CSE of writeonly calls, similar to the existing support
for readonly calls.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add support for CSE of writeonly calls, similar to the existing support
for readonly calls.</pre>
</div>
</content>
</entry>
<entry>
<title>[EarlyCSE] Remove void return restriction for call CSE (#145320)</title>
<updated>2025-06-24T07:20:03+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-06-24T07:20:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0112f12eb61b2ea5cde750506c31afbfc8b9ea8a'/>
<id>0112f12eb61b2ea5cde750506c31afbfc8b9ea8a</id>
<content type='text'>
For readonly/readnone calls returning void we can't CSE the return
value. However, making these participate in CSE is still useful,
because it allows DCE of calls that are not willreturn/nounwind
(something no other part of LLVM is capable of removing).

The more interesting use-case is CSE for writeonly calls (not
yet supported), but I figured this change makes sense independently.

There is no impact on compile-time.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For readonly/readnone calls returning void we can't CSE the return
value. However, making these participate in CSE is still useful,
because it allows DCE of calls that are not willreturn/nounwind
(something no other part of LLVM is capable of removing).

The more interesting use-case is CSE for writeonly calls (not
yet supported), but I figured this change makes sense independently.

There is no impact on compile-time.</pre>
</div>
</content>
</entry>
<entry>
<title>[EarlyCSE] Fix dead store elimination for unwinding readnone calls (#145287)</title>
<updated>2025-06-23T10:44:14+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-06-23T10:44:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=cfcb7888c71c7b5468e3fc55b6de0804403dc3fe'/>
<id>cfcb7888c71c7b5468e3fc55b6de0804403dc3fe</id>
<content type='text'>
EarlyCSE already resets LastStore when it hits an potentially unwinding
instruction, as the memory state may be observed by the caller after the
unwind.

There also was a test specifically making sure that this works even for
unwinding readnone calls -- however, the call in that test did not
participate in EarlyCSE in the first place, because it returns void
(relaxing that is how I got here), so it was not actually testing the
right thing.

Move the check for unwinding instructions earlier, so it also handles
the readnone case.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
EarlyCSE already resets LastStore when it hits an potentially unwinding
instruction, as the memory state may be observed by the caller after the
unwind.

There also was a test specifically making sure that this works even for
unwinding readnone calls -- however, the call in that test did not
participate in EarlyCSE in the first place, because it returns void
(relaxing that is how I got here), so it was not actually testing the
right thing.

Move the check for unwinding instructions earlier, so it also handles
the readnone case.</pre>
</div>
</content>
</entry>
<entry>
<title>[EarlyCSE] Check attributes for commutative intrinsics (#142610)</title>
<updated>2025-06-04T07:04:27+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-06-04T07:04:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9a0197c3a443caf275a9b1b86669b398ea615c9f'/>
<id>9a0197c3a443caf275a9b1b86669b398ea615c9f</id>
<content type='text'>
Commutative intrinsics go through a separate code path, which did not
check for attribute compatibility, resulting in a later assertion
failure.

Fixes https://github.com/llvm/llvm-project/issues/142462.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commutative intrinsics go through a separate code path, which did not
check for attribute compatibility, resulting in a later assertion
failure.

Fixes https://github.com/llvm/llvm-project/issues/142462.</pre>
</div>
</content>
</entry>
<entry>
<title>[EarlyCSE] Correcting assertion for DSE with invariant loads (#141495)</title>
<updated>2025-05-28T10:29:34+00:00</updated>
<author>
<name>zGoldthorpe</name>
<email>zgoldtho@ualberta.ca</email>
</author>
<published>2025-05-28T10:29:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0291f495dbea64231212a8d51ecef653e10aed33'/>
<id>0291f495dbea64231212a8d51ecef653e10aed33</id>
<content type='text'>
This patch corrects an assertion to handle an edge case where there is a
dead store into an `!invariant.load`'s pointer, but there is an
interleaving store to a different (non-aliasing) address.

In this case we know that the interleaved store cannot modify the
address even without MemorySSA, so the assert does not hold.

This bug was found through the AMD fuzzing project.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch corrects an assertion to handle an edge case where there is a
dead store into an `!invariant.load`'s pointer, but there is an
interleaving store to a different (non-aliasing) address.

In this case we know that the interleaved store cannot modify the
address even without MemorySSA, so the assert does not hold.

This bug was found through the AMD fuzzing project.</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Use hash_combine_range with ranges (NFC) (#137530)</title>
<updated>2025-04-27T19:31:28+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-04-27T19:31:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1f56716a7eb42be67b9e42d11d95b622fdb605e5'/>
<id>1f56716a7eb42be67b9e42d11d95b622fdb605e5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>EarlyCSE: fix CmpPredicate duplicate-hashing (#119902)</title>
<updated>2024-12-13T22:06:39+00:00</updated>
<author>
<name>Ramkumar Ramachandra</name>
<email>ramkumar.ramachandra@codasip.com</email>
</author>
<published>2024-12-13T22:06:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5528388e3664c6d7d292f20a739f1bf1c8ef768d'/>
<id>5528388e3664c6d7d292f20a739f1bf1c8ef768d</id>
<content type='text'>
Strip hash_value() for CmpPredicate, as different callers have different
hashing use-cases. In this case, there is just one caller, namely
EarlyCSE, which calls hash_combine() on a CmpPredicate, which used to
call hash_combine() on a CmpInst::Predicate prior to 4a0d53a
(PatternMatch: migrate to CmpPredicate). This has uncovered a bug where
two icmp instructions differing in just the fact that one of them has
the samesign flag on it are hashed differently, leading to divergent
hashing, and a crash. Fix this crash by dropping samesign information on
icmp instructions before hashing them, preserving the former behavior.

Fixes #119893.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Strip hash_value() for CmpPredicate, as different callers have different
hashing use-cases. In this case, there is just one caller, namely
EarlyCSE, which calls hash_combine() on a CmpPredicate, which used to
call hash_combine() on a CmpInst::Predicate prior to 4a0d53a
(PatternMatch: migrate to CmpPredicate). This has uncovered a bug where
two icmp instructions differing in just the fact that one of them has
the samesign flag on it are hashed differently, leading to divergent
hashing, and a crash. Fix this crash by dropping samesign information on
icmp instructions before hashing them, preserving the former behavior.

Fixes #119893.</pre>
</div>
</content>
</entry>
<entry>
<title>PatternMatch: migrate to CmpPredicate (#118534)</title>
<updated>2024-12-13T14:18:33+00:00</updated>
<author>
<name>Ramkumar Ramachandra</name>
<email>ramkumar.ramachandra@codasip.com</email>
</author>
<published>2024-12-13T14:18:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4a0d53a0b0a58a3c6980a7c551357ac71ba3db10'/>
<id>4a0d53a0b0a58a3c6980a7c551357ac71ba3db10</id>
<content type='text'>
With the introduction of CmpPredicate in 51a895a (IR: introduce struct
with CmpInst::Predicate and samesign), PatternMatch is one of the first
key pieces of infrastructure that must be updated to match a CmpInst
respecting samesign information. Implement this change to Cmp-matchers.

This is a preparatory step in migrating the codebase over to
CmpPredicate. Since we no functional changes are desired at this stage,
we have chosen not to migrate CmpPredicate::operator==(CmpPredicate)
calls to use CmpPredicate::getMatching(), as that would have visible
impact on tests that are not yet written: instead, we call
CmpPredicate::operator==(Predicate), preserving the old behavior, while
also inserting a few FIXME comments for follow-ups.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With the introduction of CmpPredicate in 51a895a (IR: introduce struct
with CmpInst::Predicate and samesign), PatternMatch is one of the first
key pieces of infrastructure that must be updated to match a CmpInst
respecting samesign information. Implement this change to Cmp-matchers.

This is a preparatory step in migrating the codebase over to
CmpPredicate. Since we no functional changes are desired at this stage,
we have chosen not to migrate CmpPredicate::operator==(CmpPredicate)
calls to use CmpPredicate::getMatching(), as that would have visible
impact on tests that are not yet written: instead, we call
CmpPredicate::operator==(Predicate), preserving the old behavior, while
also inserting a few FIXME comments for follow-ups.</pre>
</div>
</content>
</entry>
<entry>
<title>EarlyCSE: refactor getOrCreateResult (NFC) (#113339)</title>
<updated>2024-11-05T14:27:48+00:00</updated>
<author>
<name>Ramkumar Ramachandra</name>
<email>ramkumar.ramachandra@codasip.com</email>
</author>
<published>2024-11-05T14:27:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=119aac00d5d3001cce80dbe6cba065873836e1d4'/>
<id>119aac00d5d3001cce80dbe6cba065873836e1d4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[EarlyCSE] De-Duplicate callsites with differing attrs</title>
<updated>2024-10-04T15:36:28+00:00</updated>
<author>
<name>Noah Goldstein</name>
<email>goldstein.w.n@gmail.com</email>
</author>
<published>2024-10-02T20:53:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b98c405f954f9ef6150c655f6ffc68e377d2ac84'/>
<id>b98c405f954f9ef6150c655f6ffc68e377d2ac84</id>
<content type='text'>
We only do this if the attributes of the two callsites are compatible
(intersectable) which is probably not in fact necessary.

Closes #110929
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We only do this if the attributes of the two callsites are compatible
(intersectable) which is probably not in fact necessary.

Closes #110929
</pre>
</div>
</content>
</entry>
</feed>
