<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/test/CodeGen/DirectX, branch main</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>[HLSL] Implement the `fwidth` intrinsic for DXIL and SPIR-V target (#161378)</title>
<updated>2025-11-20T12:38:32+00:00</updated>
<author>
<name>Alexander Johnston</name>
<email>alexander.javen.johnston@gmail.com</email>
</author>
<published>2025-11-20T12:38:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=76f1949cfa0d8fed73c153af83a7054073686506'/>
<id>76f1949cfa0d8fed73c153af83a7054073686506</id>
<content type='text'>
Adds the fwidth intrinsic for HLSL.
The DXIL path only requires modification to the hlsl headers.
The SPIRV path implements the OpFwidth builtin in Clang and instruction
selection for the OpFwidth instruction in LLVM.
Also adds shader stage tests to the ddx_coarse and ddy_coarse
instructions used by fwidth.

Closes #99120

---------

Co-authored-by: Alexander Johnston &lt;alexander.johnston@amd.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds the fwidth intrinsic for HLSL.
The DXIL path only requires modification to the hlsl headers.
The SPIRV path implements the OpFwidth builtin in Clang and instruction
selection for the OpFwidth instruction in LLVM.
Also adds shader stage tests to the ddx_coarse and ddy_coarse
instructions used by fwidth.

Closes #99120

---------

Co-authored-by: Alexander Johnston &lt;alexander.johnston@amd.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[HLSL][DirectX] Use a padding type for HLSL buffers. (#167404)</title>
<updated>2025-11-18T21:38:43+00:00</updated>
<author>
<name>Justin Bogner</name>
<email>mail@justinbogner.com</email>
</author>
<published>2025-11-18T21:38:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c4898f3f229027e6cbdf8f9db77b8c14d70f6599'/>
<id>c4898f3f229027e6cbdf8f9db77b8c14d70f6599</id>
<content type='text'>
This change drops the use of the "Layout" type and instead uses explicit
padding throughout the compiler to represent types in HLSL buffers.

There are a few parts to this, though it's difficult to split them up as
they're very interdependent:

1. Refactor HLSLBufferLayoutBuilder to allow us to calculate the padding
of arbitrary types.
2. Teach Clang CodeGen to use HLSL specific paths for cbuffers when
generating aggregate copies, array accesses, and structure accesses.
3. Simplify DXILCBufferAccesses such that it directly replaces accesses
with dx.resource.getpointer rather than recalculating the layout.
4. Basic infrastructure for SPIR-V handling, but the implementation
itself will need work in follow ups.

Fixes several issues, including #138996, #144573, and #156084.
Resolves #147352.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change drops the use of the "Layout" type and instead uses explicit
padding throughout the compiler to represent types in HLSL buffers.

There are a few parts to this, though it's difficult to split them up as
they're very interdependent:

1. Refactor HLSLBufferLayoutBuilder to allow us to calculate the padding
of arbitrary types.
2. Teach Clang CodeGen to use HLSL specific paths for cbuffers when
generating aggregate copies, array accesses, and structure accesses.
3. Simplify DXILCBufferAccesses such that it directly replaces accesses
with dx.resource.getpointer rather than recalculating the layout.
4. Basic infrastructure for SPIR-V handling, but the implementation
itself will need work in follow ups.

Fixes several issues, including #138996, #144573, and #156084.
Resolves #147352.</pre>
</div>
</content>
</entry>
<entry>
<title>[HLSL] Implement ddx/ddy_coarse intrinsics (#164831)</title>
<updated>2025-11-18T15:41:07+00:00</updated>
<author>
<name>Alexander Johnston</name>
<email>alexander.javen.johnston@gmail.com</email>
</author>
<published>2025-11-18T15:41:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ed60cd2563ca6ee474f76487857dd5fd56b83925'/>
<id>ed60cd2563ca6ee474f76487857dd5fd56b83925</id>
<content type='text'>
Closes https://github.com/llvm/llvm-project/issues/99097
Closes https://github.com/llvm/llvm-project/issues/99100

As ddx and ddy are near identical implementations I've combined them in
this PR. This aims to unblock
https://github.com/llvm/llvm-project/pull/161378

---------

Co-authored-by: Alexander Johnston &lt;alexander.johnston@amd.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes https://github.com/llvm/llvm-project/issues/99097
Closes https://github.com/llvm/llvm-project/issues/99100

As ddx and ddy are near identical implementations I've combined them in
this PR. This aims to unblock
https://github.com/llvm/llvm-project/pull/161378

---------

Co-authored-by: Alexander Johnston &lt;alexander.johnston@amd.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[DirectX] Teach DXILResourceAccess about cbuffers (#164554)</title>
<updated>2025-11-10T20:32:43+00:00</updated>
<author>
<name>Justin Bogner</name>
<email>mail@justinbogner.com</email>
</author>
<published>2025-11-10T20:32:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4ae7348513c700cf0a34a65094e925cba1084424'/>
<id>4ae7348513c700cf0a34a65094e925cba1084424</id>
<content type='text'>
This isn't reachable today but will come into play once we reorder
passes for #147352 and #147351.

Note that the `CBufferRowIntrin` helper struct is copied from the
`DXILCBufferAccess` pass, but it will be removed from there when we
simplify that pass in #147351
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This isn't reachable today but will come into play once we reorder
passes for #147352 and #147351.

Note that the `CBufferRowIntrin` helper struct is copied from the
`DXILCBufferAccess` pass, but it will be removed from there when we
simplify that pass in #147351
</pre>
</div>
</content>
</entry>
<entry>
<title>[DirectX] Remove llvm.assume intrinsic (#166697)</title>
<updated>2025-11-06T19:05:30+00:00</updated>
<author>
<name>Farzon Lotfi</name>
<email>farzonlotfi@microsoft.com</email>
</author>
<published>2025-11-06T19:05:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ecddaaeb3e3fe34c0202a9a48280f3dd48f3859b'/>
<id>ecddaaeb3e3fe34c0202a9a48280f3dd48f3859b</id>
<content type='text'>
fixes #165051

This change reverts the experiment we did for #165311

While some backends seem to support llvm.assume without validation The
validator itself does not so it makes more sense to just remove it.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fixes #165051

This change reverts the experiment we did for #165311

While some backends seem to support llvm.assume without validation The
validator itself does not so it makes more sense to just remove it.</pre>
</div>
</content>
</entry>
<entry>
<title>[DirectX] Let data scalarizer pass account for sub-types when updating GEP type (#166200)</title>
<updated>2025-11-06T17:14:50+00:00</updated>
<author>
<name>Finn Plummer</name>
<email>mail@inbelic.dev</email>
</author>
<published>2025-11-06T17:14:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=75c09b792433fffc442e0ea53b45ee8e330f8acc'/>
<id>75c09b792433fffc442e0ea53b45ee8e330f8acc</id>
<content type='text'>
This pr lets the `dxil-data-scalarization` account for a GEP with a
source type that is a sub-type of the pointer operand type.

The pass is updated so that the replaced GEP introduces zero indices
such that the result type remains the same (with the vector -&gt; array
transform).

Please see resolved issue for an annotated example.

Resolves: https://github.com/llvm/llvm-project/issues/165473</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This pr lets the `dxil-data-scalarization` account for a GEP with a
source type that is a sub-type of the pointer operand type.

The pass is updated so that the replaced GEP introduces zero indices
such that the result type remains the same (with the vector -&gt; array
transform).

Please see resolved issue for an annotated example.

Resolves: https://github.com/llvm/llvm-project/issues/165473</pre>
</div>
</content>
</entry>
<entry>
<title>[DirectX] Emit `hlsl.wavesize` function attribute as entry property metadata (#165624)</title>
<updated>2025-11-05T17:18:49+00:00</updated>
<author>
<name>Finn Plummer</name>
<email>mail@inbelic.dev</email>
</author>
<published>2025-11-05T17:18:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6312d2751144bd53af7ef56798cbe60aa8b2fb56'/>
<id>6312d2751144bd53af7ef56798cbe60aa8b2fb56</id>
<content type='text'>
This pr adds support for emitting the `hlsl.wavesize` function attribute
as an entry property metadata for a compute shader.

It follows the implementation of `hlsl.numthreads`.

- Collects the wave range information from the function attribute in
`DXILMetadataAnalysis`
- Introduce the `WaveRange` property tag
- Emit a `WaveSize` or `WaveRange` metadata (depending on shader model)
in `DXILTranslateMetadata`
- Add tests for valid/invalid scenarios
- Updates the base `PSVInfo` to reflect the min/max wave lane counts

Resolves #70118</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This pr adds support for emitting the `hlsl.wavesize` function attribute
as an entry property metadata for a compute shader.

It follows the implementation of `hlsl.numthreads`.

- Collects the wave range information from the function attribute in
`DXILMetadataAnalysis`
- Introduce the `WaveRange` property tag
- Emit a `WaveSize` or `WaveRange` metadata (depending on shader model)
in `DXILTranslateMetadata`
- Add tests for valid/invalid scenarios
- Updates the base `PSVInfo` to reflect the min/max wave lane counts

Resolves #70118</pre>
</div>
</content>
</entry>
<entry>
<title>[HLSL] Implement the f16tof32() intrinsic (#165860)</title>
<updated>2025-11-04T17:04:39+00:00</updated>
<author>
<name>Tim Corringham</name>
<email>timothy.corringham@amd.com</email>
</author>
<published>2025-11-04T17:04:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=89ec96b8b4f4a3115689b045cd64afae1c28044e'/>
<id>89ec96b8b4f4a3115689b045cd64afae1c28044e</id>
<content type='text'>
Implement the f16tof32() intrinsic, including DXILand SPIRV codegen, and
associated tests.

Fixes #99112

---------

Co-authored-by: Tim Corringham &lt;tcorring@amd.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implement the f16tof32() intrinsic, including DXILand SPIRV codegen, and
associated tests.

Fixes #99112

---------

Co-authored-by: Tim Corringham &lt;tcorring@amd.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[DirectX] Use an allow-list of DXIL compatible module metadata (#165290)</title>
<updated>2025-10-29T20:42:08+00:00</updated>
<author>
<name>Finn Plummer</name>
<email>mail@inbelic.dev</email>
</author>
<published>2025-10-29T20:42:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ad29838a44f7184e3887b34a1ed1c732022259cc'/>
<id>ad29838a44f7184e3887b34a1ed1c732022259cc</id>
<content type='text'>
This pr introduces an allow-list for module metadata, this encompasses
the llvm metadata nodes: `llvm.ident` and `llvm.module.flags`, as well
as, the generated `dx.` options.

Resolves: #164473.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This pr introduces an allow-list for module metadata, this encompasses
the llvm metadata nodes: `llvm.ident` and `llvm.module.flags`, as well
as, the generated `dx.` options.

Resolves: #164473.</pre>
</div>
</content>
</entry>
<entry>
<title>[DirectX] Add DXIL validation of `llvm.loop` metadata (#164292)</title>
<updated>2025-10-29T18:54:18+00:00</updated>
<author>
<name>Finn Plummer</name>
<email>mail@inbelic.dev</email>
</author>
<published>2025-10-29T18:54:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=032900eb3011a6d0e8ca0de7692b1c25409e7398'/>
<id>032900eb3011a6d0e8ca0de7692b1c25409e7398</id>
<content type='text'>
This pr adds the equivalent validation of `llvm.loop` metadata that is
[done in
DXC](https://github.com/microsoft/DirectXShaderCompiler/blob/8f21027f2ad5dcfa63a275cbd278691f2c8fad33/lib/DxilValidation/DxilValidation.cpp#L3010).

This is done as follows:
- Add `llvm.loop` to the metadata allow-list in `DXILTranslateMetadata`
- Iterate through all `llvm.loop` metadata nodes and strip all
incompatible ones
- Raise an error for ill-formed nodes that are compatible with DXIL

Resolves: https://github.com/llvm/llvm-project/issues/137387</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This pr adds the equivalent validation of `llvm.loop` metadata that is
[done in
DXC](https://github.com/microsoft/DirectXShaderCompiler/blob/8f21027f2ad5dcfa63a275cbd278691f2c8fad33/lib/DxilValidation/DxilValidation.cpp#L3010).

This is done as follows:
- Add `llvm.loop` to the metadata allow-list in `DXILTranslateMetadata`
- Iterate through all `llvm.loop` metadata nodes and strip all
incompatible ones
- Raise an error for ill-formed nodes that are compatible with DXIL

Resolves: https://github.com/llvm/llvm-project/issues/137387</pre>
</div>
</content>
</entry>
</feed>
