<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.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>[PowerPC] eliminate RLWINM instruction following LBARX as possible (#144089)</title>
<updated>2025-06-25T13:26:40+00:00</updated>
<author>
<name>zhijian lin</name>
<email>zhijian@ca.ibm.com</email>
</author>
<published>2025-06-25T13:26:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e99d8bb0dcc5c41268714ad083f6b2924b789cf7'/>
<id>e99d8bb0dcc5c41268714ad083f6b2924b789cf7</id>
<content type='text'>
LBARX loads a byte from memory into a register, automatically setting
the remaining bits of the register to zero. If a subsequent RLWINM
instruction is used to clear those same bits (which LBARX has already
set to zero), the RLWINM is redundant and can be eliminated.

 these redundant clear instructions are introduced by 85a9f2e14859b.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
LBARX loads a byte from memory into a register, automatically setting
the remaining bits of the register to zero. If a subsequent RLWINM
instruction is used to clear those same bits (which LBARX has already
set to zero), the RLWINM is redundant and can be eliminated.

 these redundant clear instructions are introduced by 85a9f2e14859b.</pre>
</div>
</content>
</entry>
<entry>
<title>Use getSignedTargetConstant for offset (#141149)</title>
<updated>2025-05-26T15:08:13+00:00</updated>
<author>
<name>Shimin Cui</name>
<email>scui@ca.ibm.com</email>
</author>
<published>2025-05-26T15:08:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b1017a4b84420894c0aedfe3872ef617f66f087f'/>
<id>b1017a4b84420894c0aedfe3872ef617f66f087f</id>
<content type='text'>
This is to fix an assertion failure with PeepholePPC64. The load/store
offset can be negative. A reduced case from one of our failures is added
as well.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is to fix an assertion failure with PeepholePPC64. The load/store
offset can be negative. A reduced case from one of our failures is added
as well.</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Remove unused local variables (NFC) (#138478)</title>
<updated>2025-05-05T04:33:54+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-05-05T04:33:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=aa15596b5f2cb5b89a2ba7b46b154351bea2d3c9'/>
<id>aa15596b5f2cb5b89a2ba7b46b154351bea2d3c9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[Target] Use *Set::insert_range (NFC) (#132140)</title>
<updated>2025-03-20T16:09:30+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-03-20T16:09:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=71935281e02cfaef2bd109bcb58f0d80039ffd15'/>
<id>71935281e02cfaef2bd109bcb58f0d80039ffd15</id>
<content type='text'>
DenseSet, SmallPtrSet, SmallSet, SetVector, and StringSet recently
gained C++23-style insert_range.  This patch replaces:

  Dest.insert(Src.begin(), Src.end());

with:

  Dest.insert_range(Src);

This patch does not touch custom begin like succ_begin for now.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
DenseSet, SmallPtrSet, SmallSet, SetVector, and StringSet recently
gained C++23-style insert_range.  This patch replaces:

  Dest.insert(Src.begin(), Src.end());

with:

  Dest.insert_range(Src);

This patch does not touch custom begin like succ_begin for now.</pre>
</div>
</content>
</entry>
<entry>
<title>[PowerPC] Support PIC Secure PLT for CALL_RM</title>
<updated>2025-01-06T16:59:42+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2025-01-06T16:59:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5e0be962feb37b224590e91879f9ac4a1fcacb85'/>
<id>5e0be962feb37b224590e91879f9ac4a1fcacb85</id>
<content type='text'>
https://reviews.llvm.org/D111433 introduced PPCISD::CALL_RM for
-frounding-math. -msecure-plt -frounding-math {-fpic,-fPIC} codegen for
PPC32 became incorrect when a function contains function calls but no
global variable references (GlobalBaseReg).

As reported by @q66 , musl/src/dirent/closedir.c implements such a
function, which is miscompiled.

PPCISD::CALL has custom logic to set up the base register
(https://reviews.llvm.org/D42112). Add an extra case for CALL_RM.

While here, improve the test to

* actually test `case PPCISD::CALL`: we need a non-leaf function that
  doesn't access global variables (global variables lead to
  GlobalBaseReg, which call `getGlobalBaseReg()` as well).
* test `ExternalSymbolSDNode` with a memset.

Supersedes: #72758

Pull Request: https://github.com/llvm/llvm-project/pull/121281
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://reviews.llvm.org/D111433 introduced PPCISD::CALL_RM for
-frounding-math. -msecure-plt -frounding-math {-fpic,-fPIC} codegen for
PPC32 became incorrect when a function contains function calls but no
global variable references (GlobalBaseReg).

As reported by @q66 , musl/src/dirent/closedir.c implements such a
function, which is miscompiled.

PPCISD::CALL has custom logic to set up the base register
(https://reviews.llvm.org/D42112). Add an extra case for CALL_RM.

While here, improve the test to

* actually test `case PPCISD::CALL`: we need a non-leaf function that
  doesn't access global variables (global variables lead to
  GlobalBaseReg, which call `getGlobalBaseReg()` as well).
* test `ExternalSymbolSDNode` with a memset.

Supersedes: #72758

Pull Request: https://github.com/llvm/llvm-project/pull/121281
</pre>
</div>
</content>
</entry>
<entry>
<title>[SelectionDAG] Move SDNode::use_iterator::getOperandNo to SDUse. (#120536)</title>
<updated>2024-12-19T17:07:42+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@sifive.com</email>
</author>
<published>2024-12-19T17:07:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f139bde8d85e4f7666f2fd739b61894fa58f2f18'/>
<id>f139bde8d85e4f7666f2fd739b61894fa58f2f18</id>
<content type='text'>
This allows us to write more range based for loops because we no
longer need the iterator. It also matches IR's Use class.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows us to write more range based for loops because we no
longer need the iterator. It also matches IR's Use class.</pre>
</div>
</content>
</entry>
<entry>
<title>[SelectionDAG] Split SDNode::use_iterator into user_iterator and use_iterator. (#120531)</title>
<updated>2024-12-19T16:35:32+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@sifive.com</email>
</author>
<published>2024-12-19T16:35:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e6b24955455d74ee748d1e9986d67de6d40ed22e'/>
<id>e6b24955455d74ee748d1e9986d67de6d40ed22e</id>
<content type='text'>
SDNode::use_iterator now returns an SDUse&amp; when dereferenced.
SDNode::user_iterator returns SDNode*. SDNode::use_begin/use_end/uses
work on use_iterator. SDNode::user_begin/user_end/users work on
user_iterator.

We can now write range based for loops using SDUse&amp; and SDNode::uses().
I've converted many of these in this patch. I didn't update loops that
have additional variables updated in their for statement.

Some loops use SDNode::use_iterator::getOperandNo() which also prevents
using range based for loops. I plan to move this into SDUse in a follow
up patch.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
SDNode::use_iterator now returns an SDUse&amp; when dereferenced.
SDNode::user_iterator returns SDNode*. SDNode::use_begin/use_end/uses
work on use_iterator. SDNode::user_begin/user_end/users work on
user_iterator.

We can now write range based for loops using SDUse&amp; and SDNode::uses().
I've converted many of these in this patch. I didn't update loops that
have additional variables updated in their for statement.

Some loops use SDNode::use_iterator::getOperandNo() which also prevents
using range based for loops. I plan to move this into SDUse in a follow
up patch.</pre>
</div>
</content>
</entry>
<entry>
<title>[SelectionDAG] Add SDNode::user_begin() and use it in some places (#120509)</title>
<updated>2024-12-19T06:13:04+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@sifive.com</email>
</author>
<published>2024-12-19T06:13:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bd261ecc5aeefd62150cb5f04e4a4f0cb7a12e1c'/>
<id>bd261ecc5aeefd62150cb5f04e4a4f0cb7a12e1c</id>
<content type='text'>
Most of these are just places that want the first user and aren't
iterating over the whole list.

While there I changed some use_size() == 1 to hasOneUse() which
is more efficient.

This is part of an effort to rename use_iterator to user_iterator
and provide a use_iterator that dereferences to SDUse&amp;. This patch
helps reduce the diff on later patches.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Most of these are just places that want the first user and aren't
iterating over the whole list.

While there I changed some use_size() == 1 to hasOneUse() which
is more efficient.

This is part of an effort to rename use_iterator to user_iterator
and provide a use_iterator that dereferences to SDUse&amp;. This patch
helps reduce the diff on later patches.</pre>
</div>
</content>
</entry>
<entry>
<title>[SelectionDAG] Rename SDNode::uses() to users(). (#120499)</title>
<updated>2024-12-19T04:09:33+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@sifive.com</email>
</author>
<published>2024-12-19T04:09:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=104ad9258a0f93a969bf7a85ebc0c7d9c533edf1'/>
<id>104ad9258a0f93a969bf7a85ebc0c7d9c533edf1</id>
<content type='text'>
This function is most often used in range based loops or algorithms
where the iterator is implicitly dereferenced. The dereference returns
an SDNode * of the user rather than SDUse * so users() is a better name.

I've long beeen annoyed that we can't write a range based loop over
SDUse when we need getOperandNo. I plan to rename use_iterator to
user_iterator and add a use_iterator that returns SDUse&amp; on dereference.
This will make it more like IR.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This function is most often used in range based loops or algorithms
where the iterator is implicitly dereferenced. The dereference returns
an SDNode * of the user rather than SDUse * so users() is a better name.

I've long beeen annoyed that we can't write a range based loop over
SDUse when we need getOperandNo. I plan to rename use_iterator to
user_iterator and add a use_iterator that returns SDUse&amp; on dereference.
This will make it more like IR.</pre>
</div>
</content>
</entry>
<entry>
<title>[PPC] Use getSignedConstant() for frame index offset</title>
<updated>2024-11-28T09:49:45+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2024-11-28T09:48:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=04a2d50efd668b752718f90811a7c628bfa761d7'/>
<id>04a2d50efd668b752718f90811a7c628bfa761d7</id>
<content type='text'>
The offset is signed. Fixes assertion failure reported at:
https://github.com/llvm/llvm-project/pull/117558#issuecomment-2504413074
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The offset is signed. Fixes assertion failure reported at:
https://github.com/llvm/llvm-project/pull/117558#issuecomment-2504413074
</pre>
</div>
</content>
</entry>
</feed>
