<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.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>[DAG] canCreateUndefOrPoison - remove isGuaranteedNotToBeUndefOrPoison check for insert/extract vector element indices (#146514)</title>
<updated>2025-07-01T13:01:54+00:00</updated>
<author>
<name>Simon Pilgrim</name>
<email>llvm-dev@redking.me.uk</email>
</author>
<published>2025-07-01T13:01:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=72f87d2d69b2a735f6a68e7ee53fa9a7597b6b3a'/>
<id>72f87d2d69b2a735f6a68e7ee53fa9a7597b6b3a</id>
<content type='text'>
No longer necessary now that #146490 has landed</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No longer necessary now that #146490 has landed</pre>
</div>
</content>
</entry>
<entry>
<title>[DAG] canCreateUndefOrPoison - remove isGuaranteedNotToBeUndefOrPoison check for shift nodes (#146502)</title>
<updated>2025-07-01T11:44:59+00:00</updated>
<author>
<name>Simon Pilgrim</name>
<email>llvm-dev@redking.me.uk</email>
</author>
<published>2025-07-01T11:44:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=89fe429262933ee7fcadc717c376e7fad8a48157'/>
<id>89fe429262933ee7fcadc717c376e7fad8a48157</id>
<content type='text'>
No longer necessary now that #146490 has landed - we still have the test coverage from #94145 that covers this.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No longer necessary now that #146490 has landed - we still have the test coverage from #94145 that covers this.</pre>
</div>
</content>
</entry>
<entry>
<title>[DAG] canCreateUndefOrPoison - add handling for CTTZ/CTLZ_ZERO_UNDEF nodes (#146501)</title>
<updated>2025-07-01T11:44:45+00:00</updated>
<author>
<name>Simon Pilgrim</name>
<email>llvm-dev@redking.me.uk</email>
</author>
<published>2025-07-01T11:44:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=56841565db77af6eb668b59add3cb1d0f38875e8'/>
<id>56841565db77af6eb668b59add3cb1d0f38875e8</id>
<content type='text'>
CTTZ/CTLZ_ZERO_UNDEF nodes can only create poison if the source value is zero - so check with isKnownNeverZero

Pulled out of #146361 and reapplied now that #146490 has landed.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
CTTZ/CTLZ_ZERO_UNDEF nodes can only create poison if the source value is zero - so check with isKnownNeverZero

Pulled out of #146361 and reapplied now that #146490 has landed.</pre>
</div>
</content>
</entry>
<entry>
<title>[DAG] canCreateUndefOrPoison - explicitly state the AssertSext/Zext/Align/NoFPClass can create poison. NFC. (#146493)</title>
<updated>2025-07-01T10:31:47+00:00</updated>
<author>
<name>Simon Pilgrim</name>
<email>llvm-dev@redking.me.uk</email>
</author>
<published>2025-07-01T10:31:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a97826a13b7cc5a56e7e87066d3f976ae6aef938'/>
<id>a97826a13b7cc5a56e7e87066d3f976ae6aef938</id>
<content type='text'>
This keeps getting forgotten (e.g. #66603) - so make a point of adding
it here to make it clear instead of relying on the implicit default of
returning true.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This keeps getting forgotten (e.g. #66603) - so make a point of adding
it here to make it clear instead of relying on the implicit default of
returning true.</pre>
</div>
</content>
</entry>
<entry>
<title>[DAG] canCreateUndefOrPoison - add handling for CTTZ/CTLZ nodes (#146361)</title>
<updated>2025-06-30T16:48:05+00:00</updated>
<author>
<name>Simon Pilgrim</name>
<email>llvm-dev@redking.me.uk</email>
</author>
<published>2025-06-30T16:48:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=529508c187e948f5bb73af9ee8207f706899bdb4'/>
<id>529508c187e948f5bb73af9ee8207f706899bdb4</id>
<content type='text'>
ISD::CTTZ/CTLZ nodes handle all input values and do not create undef/poison.

The *_ZERO_UNDEF variants will be handled in a future patch.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ISD::CTTZ/CTLZ nodes handle all input values and do not create undef/poison.

The *_ZERO_UNDEF variants will be handled in a future patch.</pre>
</div>
</content>
</entry>
<entry>
<title>[DAG] canCreateUndefOrPoison - add handling for ADD/SUB/MUL overflow nodes (#146322)</title>
<updated>2025-06-30T12:26:57+00:00</updated>
<author>
<name>Simon Pilgrim</name>
<email>llvm-dev@redking.me.uk</email>
</author>
<published>2025-06-30T12:26:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b9e4679976e247b4b46454a78b8c212ebbfa7221'/>
<id>b9e4679976e247b4b46454a78b8c212ebbfa7221</id>
<content type='text'>
Neither the arithmetic value or overflow result can create undef/poison from regular operands values.

We have complete test coverage for all ADDO/SUBO nodes, 32-bit codegen handles the _CARRY variants but until #145939 lands AND DAGCombiner::visitFREEZE handles multiple results we can't see any codegen change.

Pulled out of #145939</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Neither the arithmetic value or overflow result can create undef/poison from regular operands values.

We have complete test coverage for all ADDO/SUBO nodes, 32-bit codegen handles the _CARRY variants but until #145939 lands AND DAGCombiner::visitFREEZE handles multiple results we can't see any codegen change.

Pulled out of #145939</pre>
</div>
</content>
</entry>
<entry>
<title>[SelectionDAG] Combine range metadata when loads are CSEd. (#146026)</title>
<updated>2025-06-27T15:58:06+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@sifive.com</email>
</author>
<published>2025-06-27T15:58:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9df1c81fee5b304ca412f45eb922d8069b0aa996'/>
<id>9df1c81fee5b304ca412f45eb922d8069b0aa996</id>
<content type='text'>
When CSEing a load with an existing load with different range
metadata, clear the range metadata on the existing
load.

This is conservative, alternatively we could calculate new range
metadata using MDNode::getMostGenericRange. Without a test case I wasn't
sure it was worth it.

MDnode::getMostGenericRange takes a non-const MDNode*, but all of
SelectionDAG
uses const MDNode*. A const_cast will need to be used somewhere or
we need to make the codebase consistent about whether MDNode pointers
should be const or not.

I'm sure this isn't the only place that needs to be updated to handle
the CSE.
    
Fixes #145363.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When CSEing a load with an existing load with different range
metadata, clear the range metadata on the existing
load.

This is conservative, alternatively we could calculate new range
metadata using MDNode::getMostGenericRange. Without a test case I wasn't
sure it was worth it.

MDnode::getMostGenericRange takes a non-const MDNode*, but all of
SelectionDAG
uses const MDNode*. A const_cast will need to be used somewhere or
we need to make the codebase consistent about whether MDNode pointers
should be const or not.

I'm sure this isn't the only place that needs to be updated to handle
the CSE.
    
Fixes #145363.</pre>
</div>
</content>
</entry>
<entry>
<title>[DAG] canCreateUndefOrPoison - add handling for ISD::SELECT (#146046)</title>
<updated>2025-06-27T10:49:08+00:00</updated>
<author>
<name>Simon Pilgrim</name>
<email>llvm-dev@redking.me.uk</email>
</author>
<published>2025-06-27T10:49:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7dde6027a0791267add993ca5d4450e44b75b870'/>
<id>7dde6027a0791267add993ca5d4450e44b75b870</id>
<content type='text'>
Followup to #143760 which handled ISD::VSELECT

I've moved ISD::SELECT/VSELECT under the "No poison except from flags
(which is handled above)" subgroup to try to remind people that these
can have poison generating FMFs (NINF/NNAN), even though this hasn't
been well explained anywhere I can find :(

Helps with regressions from #145939</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Followup to #143760 which handled ISD::VSELECT

I've moved ISD::SELECT/VSELECT under the "No poison except from flags
(which is handled above)" subgroup to try to remind people that these
can have poison generating FMFs (NINF/NNAN), even though this hasn't
been well explained anywhere I can find :(

Helps with regressions from #145939</pre>
</div>
</content>
</entry>
<entry>
<title>PowerPC: Stop reporting memcpy as an alias of memmove on AIX (#143836)</title>
<updated>2025-06-23T13:15:37+00:00</updated>
<author>
<name>Matt Arsenault</name>
<email>Matthew.Arsenault@amd.com</email>
</author>
<published>2025-06-23T13:15:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a65e0edd6ac522a21744fa51cef6593fd782dea4'/>
<id>a65e0edd6ac522a21744fa51cef6593fd782dea4</id>
<content type='text'>
Instead of reporting ___memmove as an implementation of memcpy,
make it unavailable and let the lowering logic consider memmove as
a fallback path.

This avoids a special case 1:N mapping for libcall implementations.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of reporting ___memmove as an implementation of memcpy,
make it unavailable and let the lowering logic consider memmove as
a fallback path.

This avoids a special case 1:N mapping for libcall implementations.</pre>
</div>
</content>
</entry>
<entry>
<title>[SelectionDAG][RISCV] Preserve nneg flag when folding (trunc (zext X))-&gt;(zext X). (#144807)</title>
<updated>2025-06-19T15:06:07+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@sifive.com</email>
</author>
<published>2025-06-19T15:06:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5eb24fde11cd82a08f208509f80f428da90c89c9'/>
<id>5eb24fde11cd82a08f208509f80f428da90c89c9</id>
<content type='text'>
If X is known non-negative, that's still true if we fold the truncate
to create a smaller zext.
    
In the i128 tests, SelectionDAGBuilder aggressively truncates the
`zext nneg` to i64 to match `getShiftAmountTy`. If we don't preserve
the `nneg` we can't see that the shift amount argument being `signext`
means we don't need to do any extension</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If X is known non-negative, that's still true if we fold the truncate
to create a smaller zext.
    
In the i128 tests, SelectionDAGBuilder aggressively truncates the
`zext nneg` to i64 to match `getShiftAmountTy`. If we don't preserve
the `nneg` we can't see that the shift amount argument being `signext`
means we don't need to do any extension</pre>
</div>
</content>
</entry>
</feed>
