<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp, branch users/mingmingl-llvm/samplefdo-profile-format</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][VectorCombine][NFC] Unify uses of lossless inverse cast (#156597)</title>
<updated>2025-09-08T13:30:06+00:00</updated>
<author>
<name>Hongyu Chen</name>
<email>xxs_chy@outlook.com</email>
</author>
<published>2025-09-08T13:30:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=75b0c89e626f21e9ba9c920c878cc9e81471f4cf'/>
<id>75b0c89e626f21e9ba9c920c878cc9e81471f4cf</id>
<content type='text'>
This patch addresses
https://github.com/llvm/llvm-project/pull/155216#discussion_r2297724663.
This patch adds a helper function to put the inverse cast on constants,
with cast flags preserved(optional).
Follow-up patches will add trunc/ext handling on VectorCombine and flags
preservation on InstCombine.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch addresses
https://github.com/llvm/llvm-project/pull/155216#discussion_r2297724663.
This patch adds a helper function to put the inverse cast on constants,
with cast flags preserved(optional).
Follow-up patches will add trunc/ext handling on VectorCombine and flags
preservation on InstCombine.</pre>
</div>
</content>
</entry>
<entry>
<title>[IR] Add utilities for manipulating length of MemIntrinsic [nfc] (#153856)</title>
<updated>2025-08-20T20:50:11+00:00</updated>
<author>
<name>Philip Reames</name>
<email>preames@rivosinc.com</email>
</author>
<published>2025-08-20T20:50:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e6b4a21849f0588b1c4fb39802a3999d7ac51dad'/>
<id>e6b4a21849f0588b1c4fb39802a3999d7ac51dad</id>
<content type='text'>
Goal is simply to reduce direct usage of getLength and setLength so that
if we end up moving memset.pattern (whose length is in elements) there
are fewer places to audit.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Goal is simply to reduce direct usage of getLength and setLength so that
if we end up moving memset.pattern (whose length is in elements) there
are fewer places to audit.</pre>
</div>
</content>
</entry>
<entry>
<title>[RemoveDIs][NFC] Remove getAssignmentMarkers (#153214)</title>
<updated>2025-08-13T09:56:19+00:00</updated>
<author>
<name>Orlando Cazalet-Hyams</name>
<email>orlando.hyams@sony.com</email>
</author>
<published>2025-08-13T09:56:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d13341db26fde0cb9764222f6d36db8b786d6119'/>
<id>d13341db26fde0cb9764222f6d36db8b786d6119</id>
<content type='text'>
getAssignmentMarkers was for debug intrinsics. getDVRAssignmentMarkers
is used for DbgRecords.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
getAssignmentMarkers was for debug intrinsics. getDVRAssignmentMarkers
is used for DbgRecords.</pre>
</div>
</content>
</entry>
<entry>
<title>[InstCombine] Match intrinsic recurrences when known to be hoisted</title>
<updated>2025-08-08T07:31:50+00:00</updated>
<author>
<name>Antonio Frighetto</name>
<email>me@antoniofrighetto.com</email>
</author>
<published>2025-08-08T07:31:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e977b28c37c174c1b93ad78314650e03b545f560'/>
<id>e977b28c37c174c1b93ad78314650e03b545f560</id>
<content type='text'>
For value-accumulating recurrences of kind:
```
  %umax.acc = phi i8 [ %umax, %backedge ], [ %a, %entry ]
  %umax = call i8 @llvm.umax.i8(i8 %umax.acc, i8 %b)
```
The binary intrinsic may be simplified into an intrinsic with init
value and the other operand, if the latter is loop-invariant:
```
  %umax = call i8 @llvm.umax.i8(i8 %a, i8 %b)
```

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

Fixes: https://github.com/llvm/llvm-project/issues/145875.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For value-accumulating recurrences of kind:
```
  %umax.acc = phi i8 [ %umax, %backedge ], [ %a, %entry ]
  %umax = call i8 @llvm.umax.i8(i8 %umax.acc, i8 %b)
```
The binary intrinsic may be simplified into an intrinsic with init
value and the other operand, if the latter is loop-invariant:
```
  %umax = call i8 @llvm.umax.i8(i8 %a, i8 %b)
```

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

Fixes: https://github.com/llvm/llvm-project/issues/145875.
</pre>
</div>
</content>
</entry>
<entry>
<title>[InstCombine] Support folding intrinsics into phis (#151115)</title>
<updated>2025-07-31T10:32:37+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-07-31T10:32:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=16d73839b1a5393ae094d709a0eef2b89cb3735f'/>
<id>16d73839b1a5393ae094d709a0eef2b89cb3735f</id>
<content type='text'>
Call foldOpIntoPhi() for speculatable intrinsics. We already do this for
FoldOpIntoSelect().

Among other things, this partially subsumes
https://github.com/llvm/llvm-project/pull/149858.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Call foldOpIntoPhi() for speculatable intrinsics. We already do this for
FoldOpIntoSelect().

Among other things, this partially subsumes
https://github.com/llvm/llvm-project/pull/149858.</pre>
</div>
</content>
</entry>
<entry>
<title>[InstCombine] Propagate neg `nsw` when folding `abs(-x)` to `abs(x)` (#150460)</title>
<updated>2025-07-24T20:45:37+00:00</updated>
<author>
<name>Pedro Lobo</name>
<email>pedro.lobo@tecnico.ulisboa.pt</email>
</author>
<published>2025-07-24T20:45:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d9952a7a5f806a419bcbc8aa82cfda179837e189'/>
<id>d9952a7a5f806a419bcbc8aa82cfda179837e189</id>
<content type='text'>
We can propagate the nsw in the neg to abs, as `-x` is only poison if x
== INT_MIN.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can propagate the nsw in the neg to abs, as `-x` is only poison if x
== INT_MIN.</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Introduce callee_type metadata</title>
<updated>2025-07-18T21:40:54+00:00</updated>
<author>
<name>Prabhu Rajasekaran</name>
<email>prabhukr@google.com</email>
</author>
<published>2025-07-18T21:40:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=921c6dbecaf49e3ed24b94802f094cd7f61f1873'/>
<id>921c6dbecaf49e3ed24b94802f094cd7f61f1873</id>
<content type='text'>
Introduce `callee_type` metadata which will be attached to the indirect
call instructions.

The `callee_type` metadata will be used to generate `.callgraph` section
described in this RFC:
https://lists.llvm.org/pipermail/llvm-dev/2021-July/151739.html

Reviewers: morehouse, petrhosek, nikic, ilovepi

Reviewed By: nikic, ilovepi

Pull Request: https://github.com/llvm/llvm-project/pull/87573
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce `callee_type` metadata which will be attached to the indirect
call instructions.

The `callee_type` metadata will be used to generate `.callgraph` section
described in this RFC:
https://lists.llvm.org/pipermail/llvm-dev/2021-July/151739.html

Reviewers: morehouse, petrhosek, nikic, ilovepi

Reviewed By: nikic, ilovepi

Pull Request: https://github.com/llvm/llvm-project/pull/87573
</pre>
</div>
</content>
</entry>
<entry>
<title>[DebugInfo] Remove getPrevNonDebugInstruction (#148859)</title>
<updated>2025-07-16T10:41:32+00:00</updated>
<author>
<name>Jeremy Morse</name>
<email>jeremy.morse@sony.com</email>
</author>
<published>2025-07-16T10:41:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5b8c15c6e7f3ac17383c12483f466a721b1040ba'/>
<id>5b8c15c6e7f3ac17383c12483f466a721b1040ba</id>
<content type='text'>
With the advent of intrinsic-less debug-info, we no longer need to
scatter calls to getPrevNonDebugInstruction around the codebase. Remove
most of them -- there are one or two that have the "SkipPseudoOp" flag
turned on, however they don't seem to be in positions where skipping
anything would be reasonable.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With the advent of intrinsic-less debug-info, we no longer need to
scatter calls to getPrevNonDebugInstruction around the codebase. Remove
most of them -- there are one or two that have the "SkipPseudoOp" flag
turned on, however they don't seem to be in positions where skipping
anything would be reasonable.
</pre>
</div>
</content>
</entry>
<entry>
<title>[InstCombine] Combine ptrauth intrin. callee into same-key bundle. (#94707)</title>
<updated>2025-07-15T21:39:53+00:00</updated>
<author>
<name>Ahmed Bougacha</name>
<email>ahmed@bougacha.org</email>
</author>
<published>2025-07-15T21:39:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=77bcab835aca155b67548c4a3cb1ae583abb1a14'/>
<id>77bcab835aca155b67548c4a3cb1ae583abb1a14</id>
<content type='text'>
Try to optimize a call to the result of a ptrauth intrinsic, potentially
into the ptrauth call bundle:
    call(ptrauth.resign(p)), ["ptrauth"()] -&gt;  call p, ["ptrauth"()]
    call(ptrauth.sign(p)),   ["ptrauth"()] -&gt;  call p

as long as the key/discriminator are the same in sign and auth-bundle,
and we don't change the key in the bundle (to a potentially-invalid
key.)

Generating a plain call to a raw unauthenticated pointer is generally
undesirable, but if we ended up seeing a naked ptrauth.sign in the first
place, we already have suspicious code. Unauthenticated calls are also
easier to spot than naked signs, so let the indirect call shine.


Note that there is an arguably unsafe extension to this, where we don't
bother checking that the key in bundle and intrinsic are the same (and
also allow folding away an auth into a bundle.)

This can end up generating calls with a bundle that has an invalid key
(which an informed frontend wouldn't have otherwise done), which can be
problematic. The C that generates that is straightforward but arguably
unreasonable. That wouldn't be an issue if we were to bite the bullet
and make these fully AArch64-specific, allowing key knowledge to be
embedded here.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Try to optimize a call to the result of a ptrauth intrinsic, potentially
into the ptrauth call bundle:
    call(ptrauth.resign(p)), ["ptrauth"()] -&gt;  call p, ["ptrauth"()]
    call(ptrauth.sign(p)),   ["ptrauth"()] -&gt;  call p

as long as the key/discriminator are the same in sign and auth-bundle,
and we don't change the key in the bundle (to a potentially-invalid
key.)

Generating a plain call to a raw unauthenticated pointer is generally
undesirable, but if we ended up seeing a naked ptrauth.sign in the first
place, we already have suspicious code. Unauthenticated calls are also
easier to spot than naked signs, so let the indirect call shine.


Note that there is an arguably unsafe extension to this, where we don't
bother checking that the key in bundle and intrinsic are the same (and
also allow folding away an auth into a bundle.)

This can end up generating calls with a bundle that has an invalid key
(which an informed frontend wouldn't have otherwise done), which can be
problematic. The C that generates that is straightforward but arguably
unreasonable. That wouldn't be an issue if we were to bite the bullet
and make these fully AArch64-specific, allowing key knowledge to be
embedded here.</pre>
</div>
</content>
</entry>
<entry>
<title>[InstCombine] Combine ptrauth constant callee into bundle. (#94706)</title>
<updated>2025-07-15T20:37:07+00:00</updated>
<author>
<name>Ahmed Bougacha</name>
<email>ahmed@bougacha.org</email>
</author>
<published>2025-07-15T20:37:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=42d2ae1034b287eb60563c370dbf52c59b66db20'/>
<id>42d2ae1034b287eb60563c370dbf52c59b66db20</id>
<content type='text'>
Try to optimize a call to a ptrauth constant, into its ptrauth bundle:
    call(ptrauth(f)), ["ptrauth"()] -&gt;  call f
as long as the key/discriminator are the same in constant and bundle.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Try to optimize a call to a ptrauth constant, into its ptrauth bundle:
    call(ptrauth(f)), ["ptrauth"()] -&gt;  call f
as long as the key/discriminator are the same in constant and bundle.</pre>
</div>
</content>
</entry>
</feed>
