<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/test/CodeGen/AMDGPU/extract-lowbits.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>AMDGPU: Update pattern matching from "x&amp;(-1&gt;&gt;(32-y))" to "bfe x, 0, y" (#116115)</title>
<updated>2024-11-14T20:21:34+00:00</updated>
<author>
<name>Changpeng Fang</name>
<email>changpeng.fang@amd.com</email>
</author>
<published>2024-11-14T20:21:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e3e7c756fb439f4e92691c6f8c891fecd2c918ed'/>
<id>e3e7c756fb439f4e92691c6f8c891fecd2c918ed</id>
<content type='text'>
It is not correct to lower "x&amp;(-1&gt;&gt;(32-y))" to "bfe x, 0, y". When y
equals 32, "-1" is not shifted, so x&amp;(-1&gt;&gt;(32-32) is still x, but "bfe
x, 0, 32" is 0. However, if we know y is at most of 5 bits (&lt; 32), we
can still do the pattern matching.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is not correct to lower "x&amp;(-1&gt;&gt;(32-y))" to "bfe x, 0, y". When y
equals 32, "-1" is not shifted, so x&amp;(-1&gt;&gt;(32-32) is still x, but "bfe
x, 0, 32" is 0. However, if we know y is at most of 5 bits (&lt; 32), we
can still do the pattern matching.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "AMDGPU: Don't avoid clamp of bit shift in BFE pattern (#115372)" (#116091)</title>
<updated>2024-11-13T22:01:21+00:00</updated>
<author>
<name>Changpeng Fang</name>
<email>changpeng.fang@amd.com</email>
</author>
<published>2024-11-13T22:01:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9778fc76e3342cc5d6ac36feef63631eb065c57f'/>
<id>9778fc76e3342cc5d6ac36feef63631eb065c57f</id>
<content type='text'>
Based on the suggestion from
https://github.com/llvm/llvm-project/pull/115543, we should not do the
pattern matching from x &lt;&lt; (32-y) &gt;&gt; (32-y) to "bfe x, 0, y" at all.
This reverts commits a2bacf8ab58af4c1a0247026ea131443d6066602 and
https://github.com/llvm/llvm-project/commit/bdf8e308b7ea430f619ca3aa1199a76eb6b4e2d4.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Based on the suggestion from
https://github.com/llvm/llvm-project/pull/115543, we should not do the
pattern matching from x &lt;&lt; (32-y) &gt;&gt; (32-y) to "bfe x, 0, y" at all.
This reverts commits a2bacf8ab58af4c1a0247026ea131443d6066602 and
https://github.com/llvm/llvm-project/commit/bdf8e308b7ea430f619ca3aa1199a76eb6b4e2d4.</pre>
</div>
</content>
</entry>
<entry>
<title>AMDGPU: Use "countMaxActiveBits() &lt;= 5" to define uint5Bits (#115543)</title>
<updated>2024-11-08T21:02:53+00:00</updated>
<author>
<name>Changpeng Fang</name>
<email>changpeng.fang@amd.com</email>
</author>
<published>2024-11-08T21:02:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=db6f476e8e29c42691a3c3ea97d7230af2be5df8'/>
<id>db6f476e8e29c42691a3c3ea97d7230af2be5df8</id>
<content type='text'>
countMaxTrailingOnes() is not correct. This patch follows the suggestion
from https://github.com/llvm/llvm-project/pull/115372.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
countMaxTrailingOnes() is not correct. This patch follows the suggestion
from https://github.com/llvm/llvm-project/pull/115372.</pre>
</div>
</content>
</entry>
<entry>
<title>AMDGPU: Don't avoid clamp of bit shift in BFE pattern (#115372)</title>
<updated>2024-11-07T22:15:33+00:00</updated>
<author>
<name>Changpeng Fang</name>
<email>changpeng.fang@amd.com</email>
</author>
<published>2024-11-07T22:15:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bdf8e308b7ea430f619ca3aa1199a76eb6b4e2d4'/>
<id>bdf8e308b7ea430f619ca3aa1199a76eb6b4e2d4</id>
<content type='text'>
Enable pattern matching from "x&lt;&lt;32-y&gt;&gt;32-y" to "bfe x, 0, y" when we
know y is in [0,31].
This is the follow-up for the PR:
https://github.com/llvm/llvm-project/pull/114279 to fix the issue:
https://github.com/llvm/llvm-project/issues/114282</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Enable pattern matching from "x&lt;&lt;32-y&gt;&gt;32-y" to "bfe x, 0, y" when we
know y is in [0,31].
This is the follow-up for the PR:
https://github.com/llvm/llvm-project/pull/114279 to fix the issue:
https://github.com/llvm/llvm-project/issues/114282</pre>
</div>
</content>
</entry>
<entry>
<title>AMDGPU: Disable pattern matching "x&lt;&lt;32-y&gt;&gt;32-y" to "bfe x, 0, y" (#114279)</title>
<updated>2024-10-30T18:07:15+00:00</updated>
<author>
<name>Changpeng Fang</name>
<email>changpeng.fang@amd.com</email>
</author>
<published>2024-10-30T18:07:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ca1154d1d41c75db6594428a8cdf263cf7041896'/>
<id>ca1154d1d41c75db6594428a8cdf263cf7041896</id>
<content type='text'>
It is not correct to lower "x&lt;&lt;32-y&gt;&gt;32-y" to "bfe x, 0, y". When y
equals to 32, the left-hand side is still x (unchanged), however, the
right-hand side will be evaluated to 0. So it is not always correct to
do such transformation.

We may be able to keep the pattern for immediate y while y is within [0,
31]. However, the immediate operands of the sub (32 - y) are easily
folded, and "(x &lt;&lt; imm) &gt;&gt; imm" will be lowered to "and x,
(2^(32-imm))-1" anyway. So no bfe matching is needed.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is not correct to lower "x&lt;&lt;32-y&gt;&gt;32-y" to "bfe x, 0, y". When y
equals to 32, the left-hand side is still x (unchanged), however, the
right-hand side will be evaluated to 0. So it is not always correct to
do such transformation.

We may be able to keep the pattern for immediate y while y is within [0,
31]. However, the immediate operands of the sub (32 - y) are easily
folded, and "(x &lt;&lt; imm) &gt;&gt; imm" will be lowered to "and x,
(2^(32-imm))-1" anyway. So no bfe matching is needed.</pre>
</div>
</content>
</entry>
<entry>
<title>[AMDGPU] Remove repeated -mtriple options from RUN lines (#66486)</title>
<updated>2023-09-15T10:29:24+00:00</updated>
<author>
<name>Jay Foad</name>
<email>jay.foad@amd.com</email>
</author>
<published>2023-09-15T10:29:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ceb68eea8c5cfd7893d55afaef93932762bbebaa'/>
<id>ceb68eea8c5cfd7893d55afaef93932762bbebaa</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[test] Change llc -march= to -mtriple=</title>
<updated>2023-09-11T21:42:37+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2023-09-11T21:42:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=806761a7629df268c8aed49657aeccffa6bca449'/>
<id>806761a7629df268c8aed49657aeccffa6bca449</id>
<content type='text'>
The issue is uncovered by #47698: for IR files without a target triple,
-mtriple= specifies the full target triple while -march= merely sets the
architecture part of the default target triple, leaving a target triple which
may not make sense, e.g. riscv64-apple-darwin.

Therefore, -march= is error-prone and not recommended for tests without a target
triple. The issue has been benign as we recognize $unknown-apple-darwin as ELF instead
of rejecting it outrightly.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The issue is uncovered by #47698: for IR files without a target triple,
-mtriple= specifies the full target triple while -march= merely sets the
architecture part of the default target triple, leaving a target triple which
may not make sense, e.g. riscv64-apple-darwin.

Therefore, -march= is error-prone and not recommended for tests without a target
triple. The issue has been benign as we recognize $unknown-apple-darwin as ELF instead
of rejecting it outrightly.
</pre>
</div>
</content>
</entry>
<entry>
<title>[AMDGPU] Only select VOP3 forms of VOP2 instructions</title>
<updated>2021-11-24T11:15:30+00:00</updated>
<author>
<name>Jay Foad</name>
<email>jay.foad@amd.com</email>
</author>
<published>2021-11-19T16:40:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8a52bd82e36855b3ad842f2535d0c78a97db55dc'/>
<id>8a52bd82e36855b3ad842f2535d0c78a97db55dc</id>
<content type='text'>
Change VOP_PAT_GEN to default to not generating an instruction selection
pattern for the VOP2 (e32) form of an instruction, only for the VOP3
(e64) form. This allows SIFoldOperands maximum freedom to fold copies
into the operands of an instruction, before SIShrinkInstructions tries
to shrink it back to the smaller encoding.

This affects the following VOP2 instructions:
v_min_i32
v_max_i32
v_min_u32
v_max_u32
v_and_b32
v_or_b32
v_xor_b32
v_lshr_b32
v_ashr_i32
v_lshl_b32

A further cleanup could simplify or remove VOP_PAT_GEN, since its
optional second argument is never used.

Differential Revision: https://reviews.llvm.org/D114252
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change VOP_PAT_GEN to default to not generating an instruction selection
pattern for the VOP2 (e32) form of an instruction, only for the VOP3
(e64) form. This allows SIFoldOperands maximum freedom to fold copies
into the operands of an instruction, before SIShrinkInstructions tries
to shrink it back to the smaller encoding.

This affects the following VOP2 instructions:
v_min_i32
v_max_i32
v_min_u32
v_max_u32
v_and_b32
v_or_b32
v_xor_b32
v_lshr_b32
v_ashr_i32
v_lshl_b32

A further cleanup could simplify or remove VOP_PAT_GEN, since its
optional second argument is never used.

Differential Revision: https://reviews.llvm.org/D114252
</pre>
</div>
</content>
</entry>
<entry>
<title>[AMDGPU] Check for unneeded shift mask in shift PatFrags.</title>
<updated>2021-11-24T05:23:12+00:00</updated>
<author>
<name>Abinav Puthan Purayil</name>
<email>abinav.puthanpurayil@amd.com</email>
</author>
<published>2021-11-08T05:35:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=078da26b1ce3e509b9705bba95686e4ef8b8e480'/>
<id>078da26b1ce3e509b9705bba95686e4ef8b8e480</id>
<content type='text'>
The existing constrained shift PatFrags only dealt with masked shift
from OpenCL front-ends. This change copies the
X86DAGToDAGISel::isUnneededShiftMask() function to AMDGPU and uses it in
the shift PatFrag predicates.

Differential Revision: https://reviews.llvm.org/D113448
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The existing constrained shift PatFrags only dealt with masked shift
from OpenCL front-ends. This change copies the
X86DAGToDAGISel::isUnneededShiftMask() function to AMDGPU and uses it in
the shift PatFrag predicates.

Differential Revision: https://reviews.llvm.org/D113448
</pre>
</div>
</content>
</entry>
<entry>
<title>[AMDGPU] fixed divergence driven shift operations selection</title>
<updated>2020-01-31T17:49:56+00:00</updated>
<author>
<name>alex-t</name>
<email>alexander.timofeev@amd.com</email>
</author>
<published>2020-01-31T17:49:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5df1ac7846c8ec4004c91d0835e9883f7a0636a4'/>
<id>5df1ac7846c8ec4004c91d0835e9883f7a0636a4</id>
<content type='text'>
Differential Revision: https://reviews.llvm.org/D73483

Reviewers: rampitec
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Differential Revision: https://reviews.llvm.org/D73483

Reviewers: rampitec
</pre>
</div>
</content>
</entry>
</feed>
