<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/test/CodeGen/SystemZ/memcmp-01.ll, 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>[SystemZ][NFC] Opaque pointer migration.</title>
<updated>2022-10-11T21:09:43+00:00</updated>
<author>
<name>Kai Nacke</name>
<email>kai.peter.nacke@ibm.com</email>
</author>
<published>2022-10-11T20:59:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a1710eb3cd5823c5d14899112ca3086acbdbe9cb'/>
<id>a1710eb3cd5823c5d14899112ca3086acbdbe9cb</id>
<content type='text'>
The LIT test cases were migrated with the script provided by
Nikita Popov.

No manual changes were made. Committed without review since
no functional changes, after consultation with uweigand.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The LIT test cases were migrated with the script provided by
Nikita Popov.

No manual changes were made. Committed without review since
no functional changes, after consultation with uweigand.
</pre>
</div>
</content>
</entry>
<entry>
<title>[SystemZ] Reapply memcmp and memcpy patches.</title>
<updated>2021-10-14T08:37:33+00:00</updated>
<author>
<name>Jonas Paulsson</name>
<email>paulsson@linux.vnet.ibm.com</email>
</author>
<published>2021-10-12T10:35:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a33e4c8ae925e99e565b2ca5dcda8ec2edbb78ee'/>
<id>a33e4c8ae925e99e565b2ca5dcda8ec2edbb78ee</id>
<content type='text'>
This reverts 3562076 and includes some refactoring as well.

Review: Ulrich Weigand

Differential Revision: https://reviews.llvm.org/D111733
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts 3562076 and includes some refactoring as well.

Review: Ulrich Weigand

Differential Revision: https://reviews.llvm.org/D111733
</pre>
</div>
</content>
</entry>
<entry>
<title>[SystemZ] Temporarily revert memcmp and memcpy patches</title>
<updated>2021-10-06T09:05:18+00:00</updated>
<author>
<name>Jonas Paulsson</name>
<email>paulsson@linux.vnet.ibm.com</email>
</author>
<published>2021-10-06T08:48:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3562076dfc0b505854e1ecade1c1b420b61197b8'/>
<id>3562076dfc0b505854e1ecade1c1b420b61197b8</id>
<content type='text'>
Seem to cause test failures in compiler-rt.

Revert "[SystemZ] Implement memcmp of variable length with CLC."
This reverts commit 7a4e9a0c73667cb80e4572d41535a9e48f1ed9ef.

Revert "[SystemZ] Implement memcpy of variable length with MVC."
This reverts commit c6c13c58eebda605a9a05f1f13cac1e46407afc7.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Seem to cause test failures in compiler-rt.

Revert "[SystemZ] Implement memcmp of variable length with CLC."
This reverts commit 7a4e9a0c73667cb80e4572d41535a9e48f1ed9ef.

Revert "[SystemZ] Implement memcpy of variable length with MVC."
This reverts commit c6c13c58eebda605a9a05f1f13cac1e46407afc7.
</pre>
</div>
</content>
</entry>
<entry>
<title>[SystemZ] Implement memcmp of variable length with CLC.</title>
<updated>2021-10-05T16:20:36+00:00</updated>
<author>
<name>Jonas Paulsson</name>
<email>paulsson@linux.vnet.ibm.com</email>
</author>
<published>2021-08-03T17:49:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7a4e9a0c73667cb80e4572d41535a9e48f1ed9ef'/>
<id>7a4e9a0c73667cb80e4572d41535a9e48f1ed9ef</id>
<content type='text'>
Following the same pattern of memset/memcpy, this patch implements a variable
length memcmp with a CLC loop followed by an EXRL instruction.

Review: Ulrich Weigand

Differential Revision: https://reviews.llvm.org/D107380
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Following the same pattern of memset/memcpy, this patch implements a variable
length memcmp with a CLC loop followed by an EXRL instruction.

Review: Ulrich Weigand

Differential Revision: https://reviews.llvm.org/D107380
</pre>
</div>
</content>
</entry>
<entry>
<title>[SystemZ] Do not return INT_MIN from strcmp/memcmp</title>
<updated>2019-02-06T15:10:13+00:00</updated>
<author>
<name>Ulrich Weigand</name>
<email>ulrich.weigand@de.ibm.com</email>
</author>
<published>2019-02-06T15:10:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=17a00126872438ad1d3f9dec09a50895beb011cb'/>
<id>17a00126872438ad1d3f9dec09a50895beb011cb</id>
<content type='text'>
The IPM sequence currently generated to compute the strcmp/memcmp
result will return INT_MIN for the "less than zero" case.  While
this is in compliance with the standard, strictly speaking, it
turns out that common applications cannot handle this, e.g. because
they negate a comparison result in order to implement reverse
compares.

This patch changes code to use a different sequence that will result
in -2 for the "less than zero" case (same as GCC).  However, this
requires that the two source operands of the compare instructions
are inverted, which breaks the optimization in removeIPMBasedCompare.
Therefore, I've removed this (and all of optimizeCompareInstr), and
replaced it with a mostly equivalent optimization in combineCCMask
at the DAGcombine level.

llvm-svn: 353304
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The IPM sequence currently generated to compute the strcmp/memcmp
result will return INT_MIN for the "less than zero" case.  While
this is in compliance with the standard, strictly speaking, it
turns out that common applications cannot handle this, e.g. because
they negate a comparison result in order to implement reverse
compares.

This patch changes code to use a different sequence that will result
in -2 for the "less than zero" case (same as GCC).  However, this
requires that the two source operands of the compare instructions
are inverted, which breaks the optimization in removeIPMBasedCompare.
Therefore, I've removed this (and all of optimizeCompareInstr), and
replaced it with a mostly equivalent optimization in combineCCMask
at the DAGcombine level.

llvm-svn: 353304
</pre>
</div>
</content>
</entry>
<entry>
<title>[SystemZ] Implement conditional returns</title>
<updated>2016-04-07T16:11:44+00:00</updated>
<author>
<name>Ulrich Weigand</name>
<email>ulrich.weigand@de.ibm.com</email>
</author>
<published>2016-04-07T16:11:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2eb027d21f882e03f0658cddbdfee31efbf08663'/>
<id>2eb027d21f882e03f0658cddbdfee31efbf08663</id>
<content type='text'>
Return is now considered a predicable instruction, and is converted
to a newly-added CondReturn (which maps to BCR to %r14) instruction by
the if conversion pass.

Also, fused compare-and-branch transform knows about conditional
returns, emitting the proper fused instructions for them.

This transform triggers on a *lot* of tests, hence the huge diffstat.
The changes are mostly jX to br %r14 -&gt; bXr %r14.

Author: koriakin

Differential Revision: http://reviews.llvm.org/D17339

llvm-svn: 265689
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Return is now considered a predicable instruction, and is converted
to a newly-added CondReturn (which maps to BCR to %r14) instruction by
the if conversion pass.

Also, fused compare-and-branch transform knows about conditional
returns, emitting the proper fused instructions for them.

This transform triggers on a *lot* of tests, hence the huge diffstat.
The changes are mostly jX to br %r14 -&gt; bXr %r14.

Author: koriakin

Differential Revision: http://reviews.llvm.org/D17339

llvm-svn: 265689
</pre>
</div>
</content>
</entry>
<entry>
<title>[SystemZ] Extend memcmp support to all constant lengths</title>
<updated>2013-08-28T09:01:51+00:00</updated>
<author>
<name>Richard Sandiford</name>
<email>rsandifo@linux.vnet.ibm.com</email>
</author>
<published>2013-08-28T09:01:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=be133a8757103c430a36f15d6210f99a0206921f'/>
<id>be133a8757103c430a36f15d6210f99a0206921f</id>
<content type='text'>
This uses the infrastructure added for memcpy and memmove in r189331.

llvm-svn: 189458
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This uses the infrastructure added for memcpy and memmove in r189331.

llvm-svn: 189458
</pre>
</div>
</content>
</entry>
<entry>
<title>[SystemZ] Fix handling of 64-bit memcmp results</title>
<updated>2013-08-16T10:55:47+00:00</updated>
<author>
<name>Richard Sandiford</name>
<email>rsandifo@linux.vnet.ibm.com</email>
</author>
<published>2013-08-16T10:55:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e3827751e2f70d61e998233661e90a7daecb9745'/>
<id>e3827751e2f70d61e998233661e90a7daecb9745</id>
<content type='text'>
Generalize r188163 to cope with return types other than MVT::i32, just
as the existing visitMemCmpCall code did.  I've split this out into a
subroutine so that it can be used for other upcoming patches.

I also noticed that I'd used the wrong API to record the out chain.
It's a load that uses DAG.getRoot() rather than getRoot(), so the out
chain should go on PendingLoads.  I don't have a testcase for that because
we don't do any interesting scheduling on z yet.

llvm-svn: 188540
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Generalize r188163 to cope with return types other than MVT::i32, just
as the existing visitMemCmpCall code did.  I've split this out into a
subroutine so that it can be used for other upcoming patches.

I also noticed that I'd used the wrong API to record the out chain.
It's a load that uses DAG.getRoot() rather than getRoot(), so the out
chain should go on PendingLoads.  I don't have a testcase for that because
we don't do any interesting scheduling on z yet.

llvm-svn: 188540
</pre>
</div>
</content>
</entry>
<entry>
<title>[SystemZ] Fix sign of integer memcmp result</title>
<updated>2013-08-16T10:22:54+00:00</updated>
<author>
<name>Richard Sandiford</name>
<email>rsandifo@linux.vnet.ibm.com</email>
</author>
<published>2013-08-16T10:22:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a59012577cc2cfab98d56b66c85d304a49cf6c4d'/>
<id>a59012577cc2cfab98d56b66c85d304a49cf6c4d</id>
<content type='text'>
r188163 used CLC to implement memcmp.  Code that compares the result
directly against zero can test the CC value produced by CLC, but code
that needs an integer result must use IPM.  The sequence I'd used was:

   ipm &lt;reg&gt;
   sll &lt;reg&gt;, 2
   sra &lt;reg&gt;, 30

but I'd forgotten that this inverts the order, so that CC==1 ("less")
becomes an integer greater than zero, and CC==2 ("greater") becomes
an integer less than zero.  This sequence should only be used if the
CLC arguments are reversed to compensate.  The problem then is that
the branch condition must also be reversed when testing the CLC
result directly.

Rather than do that, I went for a different sequence that works with
the natural CLC order:

   ipm &lt;reg&gt;
   srl &lt;reg&gt;, 28
   rll &lt;reg&gt;, &lt;reg&gt;, 31

One advantage of this is that it doesn't clobber CC.  A disadvantage
is that any sign extension to 64 bits must be done separately,
rather than being folded into the shifts.

llvm-svn: 188538
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
r188163 used CLC to implement memcmp.  Code that compares the result
directly against zero can test the CC value produced by CLC, but code
that needs an integer result must use IPM.  The sequence I'd used was:

   ipm &lt;reg&gt;
   sll &lt;reg&gt;, 2
   sra &lt;reg&gt;, 30

but I'd forgotten that this inverts the order, so that CC==1 ("less")
becomes an integer greater than zero, and CC==2 ("greater") becomes
an integer less than zero.  This sequence should only be used if the
CLC arguments are reversed to compensate.  The problem then is that
the branch condition must also be reversed when testing the CLC
result directly.

Rather than do that, I went for a different sequence that works with
the natural CLC order:

   ipm &lt;reg&gt;
   srl &lt;reg&gt;, 28
   rll &lt;reg&gt;, &lt;reg&gt;, 31

One advantage of this is that it doesn't clobber CC.  A disadvantage
is that any sign extension to 64 bits must be done separately,
rather than being folded into the shifts.

llvm-svn: 188538
</pre>
</div>
</content>
</entry>
<entry>
<title>[SystemZ] Use CLC and IPM to implement memcmp</title>
<updated>2013-08-12T10:28:10+00:00</updated>
<author>
<name>Richard Sandiford</name>
<email>rsandifo@linux.vnet.ibm.com</email>
</author>
<published>2013-08-12T10:28:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=564681c88d643ecbb3e5b9fd47479b83f4608c0a'/>
<id>564681c88d643ecbb3e5b9fd47479b83f4608c0a</id>
<content type='text'>
For now this is restricted to fixed-length comparisons with a length
in the range [1, 256], as for memcpy() and MVC.

llvm-svn: 188163
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For now this is restricted to fixed-length comparisons with a length
in the range [1, 256], as for memcpy() and MVC.

llvm-svn: 188163
</pre>
</div>
</content>
</entry>
</feed>
