<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/test/CodeGen/PowerPC, 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>[PHIElimination] Revert #131837 #146320 #146337 (#146850)</title>
<updated>2025-07-03T11:48:08+00:00</updated>
<author>
<name>Guy David</name>
<email>49722543+guy-david@users.noreply.github.com</email>
</author>
<published>2025-07-03T11:48:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=76274eb2b3439aac6991c6b505248e00627e5693'/>
<id>76274eb2b3439aac6991c6b505248e00627e5693</id>
<content type='text'>
Reverting because mis-compiles:
- https://github.com/llvm/llvm-project/pull/131837
- https://github.com/llvm/llvm-project/pull/146320
- https://github.com/llvm/llvm-project/pull/146337</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reverting because mis-compiles:
- https://github.com/llvm/llvm-project/pull/131837
- https://github.com/llvm/llvm-project/pull/146320
- https://github.com/llvm/llvm-project/pull/146337</pre>
</div>
</content>
</entry>
<entry>
<title>[PowerPC] Fix ppc-reduce-cr-ops mishandling of subregister uses (#144405)</title>
<updated>2025-07-02T19:28:44+00:00</updated>
<author>
<name>Lei Huang</name>
<email>lei@ca.ibm.com</email>
</author>
<published>2025-07-02T19:28:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0a822f82de91215151a3958c852ddd142815a3f5'/>
<id>0a822f82de91215151a3958c852ddd142815a3f5</id>
<content type='text'>
Corrects the erroneous assumption that CR-logical operation's operands
are always defined by a subreg copy.

Fixes https://github.com/llvm/llvm-project/issues/141643
Patch by Nemanja Ivanovic</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Corrects the erroneous assumption that CR-logical operation's operands
are always defined by a subreg copy.

Fixes https://github.com/llvm/llvm-project/issues/141643
Patch by Nemanja Ivanovic</pre>
</div>
</content>
</entry>
<entry>
<title>[InstrEmitter] Use AddOperand in EmitCopyToRegClassNode. (#146637)</title>
<updated>2025-07-02T16:44:54+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@sifive.com</email>
</author>
<published>2025-07-02T16:44:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b62826cc054cfff75f2b5c83b980f1e12fc25e3a'/>
<id>b62826cc054cfff75f2b5c83b980f1e12fc25e3a</id>
<content type='text'>
This is alternative to #145965 that allows RegisterSDNode to be handled
without making a special case.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is alternative to #145965 that allows RegisterSDNode to be handled
without making a special case.</pre>
</div>
</content>
</entry>
<entry>
<title>[DAG] Refactor X86 combineVSelectWithAllOnesOrZeros fold into a generic DAG Combine (#145298)</title>
<updated>2025-07-02T14:07:48+00:00</updated>
<author>
<name>woruyu</name>
<email>99597449+woruyu@users.noreply.github.com</email>
</author>
<published>2025-07-02T14:07:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bbcebec3af5ac473f5d3557683f18a79a4b12ab5'/>
<id>bbcebec3af5ac473f5d3557683f18a79a4b12ab5</id>
<content type='text'>
This PR resolves https://github.com/llvm/llvm-project/issues/144513

The modification include five pattern :
1.vselect Cond, 0, 0 → 0
2.vselect Cond, -1, 0 → bitcast Cond
3.vselect Cond, -1, x → or Cond, x
4.vselect Cond, x, 0 → and Cond, x
5.vselect Cond, 000..., X -&gt; andn Cond, X

1-4 have been migrated to DAGCombine. 5 still in x86 code.

The reason is that you cannot use the andn instruction directly in
DAGCombine, you can only use and+xor, which will introduce optimization
order issues. For example, in the x86 backend, select Cond, 0, x →
(~Cond) &amp; x, the backend will first check whether the cond node of
(~Cond) is a setcc node. If so, it will modify the comparison operator
of the condition.So the x86 backend cannot complete the optimization of
andn.In short, I think it is a better choice to keep the pattern of
vselect Cond, 000..., X instead of and+xor in combineDAG.

For commit, the first is code changes and x86 test(note 1), the second
is tests in other backend(node 2).

---------

Co-authored-by: Simon Pilgrim &lt;llvm-dev@redking.me.uk&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR resolves https://github.com/llvm/llvm-project/issues/144513

The modification include five pattern :
1.vselect Cond, 0, 0 → 0
2.vselect Cond, -1, 0 → bitcast Cond
3.vselect Cond, -1, x → or Cond, x
4.vselect Cond, x, 0 → and Cond, x
5.vselect Cond, 000..., X -&gt; andn Cond, X

1-4 have been migrated to DAGCombine. 5 still in x86 code.

The reason is that you cannot use the andn instruction directly in
DAGCombine, you can only use and+xor, which will introduce optimization
order issues. For example, in the x86 backend, select Cond, 0, x →
(~Cond) &amp; x, the backend will first check whether the cond node of
(~Cond) is a setcc node. If so, it will modify the comparison operator
of the condition.So the x86 backend cannot complete the optimization of
andn.In short, I think it is a better choice to keep the pattern of
vselect Cond, 000..., X instead of and+xor in combineDAG.

For commit, the first is code changes and x86 test(note 1), the second
is tests in other backend(node 2).

---------

Co-authored-by: Simon Pilgrim &lt;llvm-dev@redking.me.uk&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[DAG] visitFREEZE - always allow freezing multiple operands (#145939)</title>
<updated>2025-07-02T10:28:37+00:00</updated>
<author>
<name>Simon Pilgrim</name>
<email>llvm-dev@redking.me.uk</email>
</author>
<published>2025-07-02T10:28:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=38200e94f1428b586dc1778133120541e65c20b5'/>
<id>38200e94f1428b586dc1778133120541e65c20b5</id>
<content type='text'>
Always try to fold freeze(op(....)) -&gt; op(freeze(),freeze(),freeze(),...).

This patch proposes we drop the opt-in limit for opcodes that are allowed to push a freeze through the op to freeze all its operands, through the tree towards the roots.

I'm struggling to find a strong reason for this limit apart from the DAG freeze handling being immature for so long - as we've improved coverage in canCreateUndefOrPoison/isGuaranteedNotToBeUndefOrPoison it looks like the regressions are not as severe.

Hopefully this will help some of the regression issues in #143102 etc.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Always try to fold freeze(op(....)) -&gt; op(freeze(),freeze(),freeze(),...).

This patch proposes we drop the opt-in limit for opcodes that are allowed to push a freeze through the op to freeze all its operands, through the tree towards the roots.

I'm struggling to find a strong reason for this limit apart from the DAG freeze handling being immature for so long - as we've improved coverage in canCreateUndefOrPoison/isGuaranteedNotToBeUndefOrPoison it looks like the regressions are not as severe.

Hopefully this will help some of the regression issues in #143102 etc.</pre>
</div>
</content>
</entry>
<entry>
<title>[DAGCombiner] Remove `UnsafeFPMath` usage in `visitFSUBForFMACombine` etc. (#145637)</title>
<updated>2025-06-30T00:41:23+00:00</updated>
<author>
<name>paperchalice</name>
<email>liujunchang97@outlook.com</email>
</author>
<published>2025-06-30T00:41:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=613222ec332bb698fc053e22619270032c305c2c'/>
<id>613222ec332bb698fc053e22619270032c305c2c</id>
<content type='text'>
Remove `UnsafeFPMath` in `visitFMULForFMADistributiveCombine`,
`visitFSUBForFMACombine` and `visitFDIV`.
All affected tests are fixed by add fast math flags manually.
Propagate fast math flags when lowering fdiv in NVPTX backend, so it can
produce optimized dag when `unsafe-fp-math` is absent.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove `UnsafeFPMath` in `visitFMULForFMADistributiveCombine`,
`visitFSUBForFMACombine` and `visitFDIV`.
All affected tests are fixed by add fast math flags manually.
Propagate fast math flags when lowering fdiv in NVPTX backend, so it can
produce optimized dag when `unsafe-fp-math` is absent.</pre>
</div>
</content>
</entry>
<entry>
<title>[PHIElimination] Reuse existing COPY in predecessor basic block (#131837)</title>
<updated>2025-06-29T18:28:42+00:00</updated>
<author>
<name>Guy David</name>
<email>49722543+guy-david@users.noreply.github.com</email>
</author>
<published>2025-06-29T18:28:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f5c62ee0fa0466382cb11f6fad80d323b0fca057'/>
<id>f5c62ee0fa0466382cb11f6fad80d323b0fca057</id>
<content type='text'>
The insertion point of COPY isn't always optimal and could eventually
lead to a worse block layout, see the regression test in the first
commit.

This change affects many architectures but the amount of total
instructions in the test cases seems too be slightly lower.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The insertion point of COPY isn't always optimal and could eventually
lead to a worse block layout, see the regression test in the first
commit.

This change affects many architectures but the amount of total
instructions in the test cases seems too be slightly lower.</pre>
</div>
</content>
</entry>
<entry>
<title>GlobalISel: Replace use of report_fatal_error (#145866)</title>
<updated>2025-06-27T12:16:23+00:00</updated>
<author>
<name>Matt Arsenault</name>
<email>Matthew.Arsenault@amd.com</email>
</author>
<published>2025-06-27T12:16:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7e2e030121434443f173af3a7fd789ba778ab928'/>
<id>7e2e030121434443f173af3a7fd789ba778ab928</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<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>[PowerPC] Support for Packed BCD conversion builtins (#142723)</title>
<updated>2025-06-25T09:17:38+00:00</updated>
<author>
<name>Himadhith</name>
<email>79003240+Himadhith@users.noreply.github.com</email>
</author>
<published>2025-06-25T09:17:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=32febe60f36441f8a139b4119a99d17285ca0b4b'/>
<id>32febe60f36441f8a139b4119a99d17285ca0b4b</id>
<content type='text'>
Support the following packed BCD builtins for PowerPC.
  
```
__builtin_national2packed - Conversion of National format to Packed decimal format.
__builtin_packed2national - Conversion of Packed decimal format to national format.
__builtin_packed2zoned    - Conversion of Packed decimal format to Zoned decimal format.
__builtin_zoned2packed    - Conversion of Zoned decimal format to Packed decimal format.
```
### Prototypes: 
`vector unsigned char __builtin_national2packed(vector unsigned char a,
unsigned char b);`
`vector unsigned char __builtin_packed2zoned(vector unsigned char,
unsigned char);`
`vector unsigned char __builtin_zoned2packed(vector unsigned char,
unsigned char);`

The condition for the 2nd parameter is consistent over all the 3
prototypes (0 or 1 only).

`vector unsigned char __builtin_packed2national(vector unsigned char);`

Co-authored-by: himadhith &lt;himadhith.v@ibm.com&gt;
Co-authored-by: Tony Varghese &lt;tonypalampalliyil@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Support the following packed BCD builtins for PowerPC.
  
```
__builtin_national2packed - Conversion of National format to Packed decimal format.
__builtin_packed2national - Conversion of Packed decimal format to national format.
__builtin_packed2zoned    - Conversion of Packed decimal format to Zoned decimal format.
__builtin_zoned2packed    - Conversion of Zoned decimal format to Packed decimal format.
```
### Prototypes: 
`vector unsigned char __builtin_national2packed(vector unsigned char a,
unsigned char b);`
`vector unsigned char __builtin_packed2zoned(vector unsigned char,
unsigned char);`
`vector unsigned char __builtin_zoned2packed(vector unsigned char,
unsigned char);`

The condition for the 2nd parameter is consistent over all the 3
prototypes (0 or 1 only).

`vector unsigned char __builtin_packed2national(vector unsigned char);`

Co-authored-by: himadhith &lt;himadhith.v@ibm.com&gt;
Co-authored-by: Tony Varghese &lt;tonypalampalliyil@gmail.com&gt;</pre>
</div>
</content>
</entry>
</feed>
