<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/test/CodeGen/DirectX, 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>[DirectX] Implement `memcpy` in DXIL CBuffer Access pass  (#144436)</title>
<updated>2025-06-30T23:32:43+00:00</updated>
<author>
<name>Deric C.</name>
<email>cheung.deric@gmail.com</email>
</author>
<published>2025-06-30T23:32:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=12409a18f609f965fbd40aba77a0b50dcdba147f'/>
<id>12409a18f609f965fbd40aba77a0b50dcdba147f</id>
<content type='text'>
Fixes #141840

This PR implements support for the `memcpy` intrinsic in the DXIL
CBuffer Access pass with the following restrictions:

- The CBuffer Access must be the `src` operand of `memcpy` and must be
direct (i.e., not a GEP)
- The type of the CBuffer Access must be of an Array Type

These restrictions greatly simplify the implementation of `memcpy` yet
still covers the known uses in DML shaders.

Furthermore, to prevent errors like #141840 from occurring silently
again, this PR adds error reporting for unsupported users of globals in
the DXIL CBuffer Access pass.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #141840

This PR implements support for the `memcpy` intrinsic in the DXIL
CBuffer Access pass with the following restrictions:

- The CBuffer Access must be the `src` operand of `memcpy` and must be
direct (i.e., not a GEP)
- The type of the CBuffer Access must be of an Array Type

These restrictions greatly simplify the implementation of `memcpy` yet
still covers the known uses in DML shaders.

Furthermore, to prevent errors like #141840 from occurring silently
again, this PR adds error reporting for unsupported users of globals in
the DXIL CBuffer Access pass.</pre>
</div>
</content>
</entry>
<entry>
<title>[DirectX] Add static sampler support to root signature (#143422)</title>
<updated>2025-06-27T21:30:48+00:00</updated>
<author>
<name>joaosaffran</name>
<email>126493771+joaosaffran@users.noreply.github.com</email>
</author>
<published>2025-06-27T21:30:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=171aa34e43bcaadefdb0479d65e0f7e1b36c8338'/>
<id>171aa34e43bcaadefdb0479d65e0f7e1b36c8338</id>
<content type='text'>
Implements static samplers parsing from root signature metadata
representation. This is required to support Root Signatures in HLSL.
Closes: #[126641](https://github.com/llvm/llvm-project/issues/126641)

---------

Co-authored-by: joaosaffran &lt;joao.saffran@microsoft.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implements static samplers parsing from root signature metadata
representation. This is required to support Root Signatures in HLSL.
Closes: #[126641](https://github.com/llvm/llvm-project/issues/126641)

---------

Co-authored-by: joaosaffran &lt;joao.saffran@microsoft.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[DirectX] add support for i64 buffer load/stores (#145047)</title>
<updated>2025-06-27T18:11:56+00:00</updated>
<author>
<name>Farzon Lotfi</name>
<email>farzonlotfi@microsoft.com</email>
</author>
<published>2025-06-27T18:11:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5dbd8772fed27182902b2cde55221a51a7064b0f'/>
<id>5dbd8772fed27182902b2cde55221a51a7064b0f</id>
<content type='text'>
fixes #140321

Specifically it fixes ` error: Cannot create BufferLoad operation:
Invalid overload type`
https://hlsl.godbolt.org/z/dTq4q7o58
but no new DML shaders are building. This change now exposes #144747.

The change does two things it adds i64 support for intrinsic expansion
for the `dx_resource_load_typedbuffer`, and
`dx_resource_store_typedbuffer` intrinsics.

It also lets loaded typedbuffers crash more gracefully because of ` auto
*EVI = cast&lt;ExtractValueInst&gt;(U);` is now a `dyn_cast` and
`llvm_unreachable`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fixes #140321

Specifically it fixes ` error: Cannot create BufferLoad operation:
Invalid overload type`
https://hlsl.godbolt.org/z/dTq4q7o58
but no new DML shaders are building. This change now exposes #144747.

The change does two things it adds i64 support for intrinsic expansion
for the `dx_resource_load_typedbuffer`, and
`dx_resource_store_typedbuffer` intrinsics.

It also lets loaded typedbuffers crash more gracefully because of ` auto
*EVI = cast&lt;ExtractValueInst&gt;(U);` is now a `dyn_cast` and
`llvm_unreachable`.</pre>
</div>
</content>
</entry>
<entry>
<title>[DirectX] Allow vector Allocas to be transformed into arrays (#145972)</title>
<updated>2025-06-27T17:12:47+00:00</updated>
<author>
<name>Farzon Lotfi</name>
<email>farzonlotfi@microsoft.com</email>
</author>
<published>2025-06-27T17:12:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=778b6a21ec27ed05c794b9fca3f27c1064280fb2'/>
<id>778b6a21ec27ed05c794b9fca3f27c1064280fb2</id>
<content type='text'>
fixes #145782

This change modifies `isArrayOfVectors` into `isVectorOrArrayOfVectors`.
The previous implementation did not support vector to array
transformations. Further it was too simplistic and didn't assume allocas
would create multidimensional arrays.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fixes #145782

This change modifies `isArrayOfVectors` into `isVectorOrArrayOfVectors`.
The previous implementation did not support vector to array
transformations. Further it was too simplistic and didn't assume allocas
would create multidimensional arrays.</pre>
</div>
</content>
</entry>
<entry>
<title>[DirectX] Limit GEP transformations to Arrays (#145758)</title>
<updated>2025-06-25T21:17:52+00:00</updated>
<author>
<name>Farzon Lotfi</name>
<email>farzonlotfi@microsoft.com</email>
</author>
<published>2025-06-25T21:17:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=38aec4f1f422daf522e50204b794e9c071e5c61f'/>
<id>38aec4f1f422daf522e50204b794e9c071e5c61f</id>
<content type='text'>
fixes #145408

Before we see the GEP we already have transformed Allocas that get
passed the `isArrayOfVectors`.
The bug is because we are trying to transform a gep for struct of arrays
when we should only be transforming arrays.

The problem with our `visitGetElementPtrInst` is that it was doing
transformations for all allocas when it should be limiting it to the
alloca of array cases. Technically we would have liked to make sure it
was an array of vectors cases but by the time we see the GEP the type
has been changed by replace all uses. There should not be a problem with
looking at all Arrays since DXILDataScalarization does not change any
indicies.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fixes #145408

Before we see the GEP we already have transformed Allocas that get
passed the `isArrayOfVectors`.
The bug is because we are trying to transform a gep for struct of arrays
when we should only be transforming arrays.

The problem with our `visitGetElementPtrInst` is that it was doing
transformations for all allocas when it should be limiting it to the
alloca of array cases. Technically we would have liked to make sure it
was an array of vectors cases but by the time we see the GEP the type
has been changed by replace all uses. There should not be a problem with
looking at all Arrays since DXILDataScalarization does not change any
indicies.</pre>
</div>
</content>
</entry>
<entry>
<title>[DirectX] Strip `dx.rootsignatures` metadata during `dxil-prepare` (#145746)</title>
<updated>2025-06-25T21:06:46+00:00</updated>
<author>
<name>Finn Plummer</name>
<email>finn.c.plum@gmail.com</email>
</author>
<published>2025-06-25T21:06:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a8ef75e758982d8e66790ffe26fcc6f1d9648e88'/>
<id>a8ef75e758982d8e66790ffe26fcc6f1d9648e88</id>
<content type='text'>
The `dx.rootsignatures` metadata is not recognized in DXIL, so failure
to remove this will cause validation errors.

This metadata is parsed (within `RootSignatureAnalysisWrapper`) into its
binary format. As such, once it has been used to construct the binary
form, it can be safely discarded without loss of information.

This pr ensures that the dxil prepare pass will depend and preserve on
the root signature analysis so that it runs before the metadata is
removed.

- Update `DXILPrepare.cpp` to preserve and depend on
`RootSignatureAnalysisWrapper`
- Update test to demonstrate order is correct
- Provide test-case to demonstrate the metadata is removed

Resolves https://github.com/llvm/llvm-project/issues/145437.

----------

Co-authored-by: Justin Bogner &lt;mail@justinbogner.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The `dx.rootsignatures` metadata is not recognized in DXIL, so failure
to remove this will cause validation errors.

This metadata is parsed (within `RootSignatureAnalysisWrapper`) into its
binary format. As such, once it has been used to construct the binary
form, it can be safely discarded without loss of information.

This pr ensures that the dxil prepare pass will depend and preserve on
the root signature analysis so that it runs before the metadata is
removed.

- Update `DXILPrepare.cpp` to preserve and depend on
`RootSignatureAnalysisWrapper`
- Update test to demonstrate order is correct
- Provide test-case to demonstrate the metadata is removed

Resolves https://github.com/llvm/llvm-project/issues/145437.

----------

Co-authored-by: Justin Bogner &lt;mail@justinbogner.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[DirectX] Make firstbithigh intrinsic use first arg as overload type (#145401)</title>
<updated>2025-06-24T18:00:21+00:00</updated>
<author>
<name>Ashley Coleman</name>
<email>ascoleman@microsoft.com</email>
</author>
<published>2025-06-24T18:00:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=21423c7fdceed315979f950ef2b1674e0f2743cb'/>
<id>21423c7fdceed315979f950ef2b1674e0f2743cb</id>
<content type='text'>
Sibling to https://github.com/llvm/llvm-project/pull/145350 part of
https://github.com/llvm/llvm-project/issues/144966

firstbituhigh and firstbitshigh should use the first arg for overloads
instead of the return type since the return is always i32</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sibling to https://github.com/llvm/llvm-project/pull/145350 part of
https://github.com/llvm/llvm-project/issues/144966

firstbituhigh and firstbitshigh should use the first arg for overloads
instead of the return type since the return is always i32</pre>
</div>
</content>
</entry>
<entry>
<title>Fix min_vec_size.ll test for changes in vector-combine (#145392)</title>
<updated>2025-06-23T21:53:57+00:00</updated>
<author>
<name>Tex Riddell</name>
<email>texr@microsoft.com</email>
</author>
<published>2025-06-23T21:53:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=509fb931b441b508aa1054725a27ebfb24337efd'/>
<id>509fb931b441b508aa1054725a27ebfb24337efd</id>
<content type='text'>
Running the `vector-combine` pass on this test now produces a single
shuffle on a loaded `&lt;1 x float&gt;` instead of an insert into a `&lt;2 x
float&gt;` followed by a shuffle.

This test change matches changes in other tests in PR #144690, which
introduced the optimization.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Running the `vector-combine` pass on this test now produces a single
shuffle on a loaded `&lt;1 x float&gt;` instead of an insert into a `&lt;2 x
float&gt;` followed by a shuffle.

This test change matches changes in other tests in PR #144690, which
introduced the optimization.</pre>
</div>
</content>
</entry>
<entry>
<title>[DirectX] make firstbitlow intrinsic use first argument instead of return for overload type (#145350)</title>
<updated>2025-06-23T18:04:06+00:00</updated>
<author>
<name>Farzon Lotfi</name>
<email>farzonlotfi@microsoft.com</email>
</author>
<published>2025-06-23T18:04:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0f173a0f9af54a3117657135cd23e079c3c626ad'/>
<id>0f173a0f9af54a3117657135cd23e079c3c626ad</id>
<content type='text'>
fixes #144966
Easy fix just add `dx_firstbitlow` to
`DirectXTTIImpl::isTargetIntrinsicWithOverloadTypeAtArg`</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fixes #144966
Easy fix just add `dx_firstbitlow` to
`DirectXTTIImpl::isTargetIntrinsicWithOverloadTypeAtArg`</pre>
</div>
</content>
</entry>
<entry>
<title>[HLSL] Emit a version in the dx.rootsignatures metadata (#145113)</title>
<updated>2025-06-20T23:21:47+00:00</updated>
<author>
<name>Justin Bogner</name>
<email>mail@justinbogner.com</email>
</author>
<published>2025-06-20T23:21:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6b9fe9e0bc7421d89f38ade857c91f0ae153ad9c'/>
<id>6b9fe9e0bc7421d89f38ade857c91f0ae153ad9c</id>
<content type='text'>
In #144957 the backend was updated to expect a version in the metadata,
but since the frontend wasn't updated this breaks compilation. This is a
somewhat temporary fix to that until #144813 lands.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In #144957 the backend was updated to expect a version in the metadata,
but since the frontend wasn't updated this breaks compilation. This is a
somewhat temporary fix to that until #144813 lands.</pre>
</div>
</content>
</entry>
</feed>
