<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/test/CodeGen/DirectX, branch users/mingmingl-llvm/samplefdo-profile-format</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] Removing dxbc DescriptorRange from mcbxdc (#154629)</title>
<updated>2025-09-10T18:49:01+00:00</updated>
<author>
<name>joaosaffran</name>
<email>joaosaffranllvm@gmail.com</email>
</author>
<published>2025-09-10T18:49:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9e778f6cd155f64896a9a0580e96aa4814ca999b'/>
<id>9e778f6cd155f64896a9a0580e96aa4814ca999b</id>
<content type='text'>
MC Descriptor Range Representation currently depend on Object
structures. This PR removes that dependency and in order to facilitate
removing to_underlying usage in follow-up PRs.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MC Descriptor Range Representation currently depend on Object
structures. This PR removes that dependency and in order to facilitate
removing to_underlying usage in follow-up PRs.</pre>
</div>
</content>
</entry>
<entry>
<title>[HLSL][DirectX] Add support for `rootsig` as a target environment (#156373)</title>
<updated>2025-09-09T15:14:58+00:00</updated>
<author>
<name>Finn Plummer</name>
<email>mail@inbelic.dev</email>
</author>
<published>2025-09-09T15:14:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ad491118df1304c7d6bcce5b2207895f57204c16'/>
<id>ad491118df1304c7d6bcce5b2207895f57204c16</id>
<content type='text'>
This pr implements support for a root signature as a target, as specified
[here](https://github.com/llvm/wg-hlsl/blob/main/proposals/0029-root-signature-driver-options.md#target-root-signature-version).

This is implemented in the following steps:
1. Add `rootsignature` as a shader model environment type and define
`rootsig` as a `target_profile`. Only valid as versions 1.0 and 1.1
2. Updates `HLSLFrontendAction` to invoke a special handling of
constructing the `ASTContext` if we are considering an `hlsl` file and
with a `rootsignature` target
3. Defines the special handling to minimally instantiate the `Parser`
and `Sema` to insert the `RootSignatureDecl`
4. Updates `CGHLSLRuntime` to emit the constructed root signature decl
as part of `dx.rootsignatures` with a `null` entry function
5. Updates `DXILRootSignature` to handle emitting a root signature
without an entry function
6. Updates `ToolChains/HLSL` to invoke `only-section=RTS0` to strip any
other generated information

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

##### Implementation Considerations
Ideally we could invoke this as part of `clang-dxc` without the need of
a source file. However, the initialization of the `Parser` and `Lexer`
becomes quite complicated to handle this.

Technically, we could avoid generating any of the extra information that
is removed in step 6. However, it seems better to re-use the logic in
`llvm-objcopy` without any need for additional custom logic in
`DXILRootSignature`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This pr implements support for a root signature as a target, as specified
[here](https://github.com/llvm/wg-hlsl/blob/main/proposals/0029-root-signature-driver-options.md#target-root-signature-version).

This is implemented in the following steps:
1. Add `rootsignature` as a shader model environment type and define
`rootsig` as a `target_profile`. Only valid as versions 1.0 and 1.1
2. Updates `HLSLFrontendAction` to invoke a special handling of
constructing the `ASTContext` if we are considering an `hlsl` file and
with a `rootsignature` target
3. Defines the special handling to minimally instantiate the `Parser`
and `Sema` to insert the `RootSignatureDecl`
4. Updates `CGHLSLRuntime` to emit the constructed root signature decl
as part of `dx.rootsignatures` with a `null` entry function
5. Updates `DXILRootSignature` to handle emitting a root signature
without an entry function
6. Updates `ToolChains/HLSL` to invoke `only-section=RTS0` to strip any
other generated information

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

##### Implementation Considerations
Ideally we could invoke this as part of `clang-dxc` without the need of
a source file. However, the initialization of the `Parser` and `Lexer`
becomes quite complicated to handle this.

Technically, we could avoid generating any of the extra information that
is removed in step 6. However, it seems better to re-use the logic in
`llvm-objcopy` without any need for additional custom logic in
`DXILRootSignature`.</pre>
</div>
</content>
</entry>
<entry>
<title>[DirectX] Add emulation for fp16 types of llvm.is.fpclass (#157505)</title>
<updated>2025-09-08T17:47:50+00:00</updated>
<author>
<name>Farzon Lotfi</name>
<email>farzonlotfi@microsoft.com</email>
</author>
<published>2025-09-08T17:47:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1dbade85cb3500f11cb8cefd0541efebbb0a8fda'/>
<id>1dbade85cb3500f11cb8cefd0541efebbb0a8fda</id>
<content type='text'>
fixes #157504

This changes adds the emulation we need for IsNaN, IsNormal, &amp; IsFinite
This change only applies these emulations to the llvm.is.fpclass cases
of fp16.

Since there is no DX intrinsics yet for these cases, applying the
emulation to the necessary intrinsics is left for future implementers of
- https://github.com/llvm/llvm-project/issues/99132
- https://github.com/llvm/llvm-project/issues/156069
- https://github.com/llvm/llvm-project/issues/99131</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fixes #157504

This changes adds the emulation we need for IsNaN, IsNormal, &amp; IsFinite
This change only applies these emulations to the llvm.is.fpclass cases
of fp16.

Since there is no DX intrinsics yet for these cases, applying the
emulation to the necessary intrinsics is left for future implementers of
- https://github.com/llvm/llvm-project/issues/99132
- https://github.com/llvm/llvm-project/issues/156069
- https://github.com/llvm/llvm-project/issues/99131</pre>
</div>
</content>
</entry>
<entry>
<title>[DirectX] Add isinf f16 emulation for SM6.8 and lower (#156932)</title>
<updated>2025-09-05T18:02:48+00:00</updated>
<author>
<name>Farzon Lotfi</name>
<email>farzonlotfi@microsoft.com</email>
</author>
<published>2025-09-05T18:02:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=16661b5d6c0555850f95d34e585a0643f7f92fcb'/>
<id>16661b5d6c0555850f95d34e585a0643f7f92fcb</id>
<content type='text'>
fixes #156068

- We needed to add a new sub arch to the target tripple so we can test
that emulation does not happen when targeting SM6.9
- The HLSL toolchain needed to be updated to handle the conversion of
strings to enums for the new sub arch.
- The emulation is done in DXILIntrinsicExpansion.cpp and needs to be
able to convert both llvm.is.fpclass and lvm.dx.isinf to the proper
emulation
- test updates in TargetParser/TripleTest.cpp, isinf.ll, is_fpclass.ll,
and DXCModeTest.cpp</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fixes #156068

- We needed to add a new sub arch to the target tripple so we can test
that emulation does not happen when targeting SM6.9
- The HLSL toolchain needed to be updated to handle the conversion of
strings to enums for the new sub arch.
- The emulation is done in DXILIntrinsicExpansion.cpp and needs to be
able to convert both llvm.is.fpclass and lvm.dx.isinf to the proper
emulation
- test updates in TargetParser/TripleTest.cpp, isinf.ll, is_fpclass.ll,
and DXCModeTest.cpp</pre>
</div>
</content>
</entry>
<entry>
<title>[HLSL][NFC] Change line endings to LF (#156930)</title>
<updated>2025-09-04T21:19:23+00:00</updated>
<author>
<name>Helena Kotas</name>
<email>hekotas@microsoft.com</email>
</author>
<published>2025-09-04T21:19:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=58d2475d8ae1aa45d88792bb952b69a4274e3198'/>
<id>58d2475d8ae1aa45d88792bb952b69a4274e3198</id>
<content type='text'>
Changes line endings in files related to HLSL to LF (`\n`).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Changes line endings in files related to HLSL to LF (`\n`).</pre>
</div>
</content>
</entry>
<entry>
<title>[DirectX] Make dx.RawBuffer an op that can't be replaced (#154620)</title>
<updated>2025-08-29T20:09:03+00:00</updated>
<author>
<name>Farzon Lotfi</name>
<email>farzonlotfi@microsoft.com</email>
</author>
<published>2025-08-29T20:09:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=01c0a8409a21344c822deba9467bd9d547f6e5d8'/>
<id>01c0a8409a21344c822deba9467bd9d547f6e5d8</id>
<content type='text'>
fixes #152348

SimplifyCFG collapses raw buffer store from a if\else load into a
select.

This change prevents the TargetExtType dx.Rawbuffer from being replace
thus preserving the if\else blocks.

A further change was needed to eliminate the phi node before we process
Intrinsic::dx_resource_getpointer in DXILResourceAccess.cpp</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fixes #152348

SimplifyCFG collapses raw buffer store from a if\else load into a
select.

This change prevents the TargetExtType dx.Rawbuffer from being replace
thus preserving the if\else blocks.

A further change was needed to eliminate the phi node before we process
Intrinsic::dx_resource_getpointer in DXILResourceAccess.cpp</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC] #155740 post cleanup (#155966)</title>
<updated>2025-08-29T04:45:38+00:00</updated>
<author>
<name>paperchalice</name>
<email>liujunchang97@outlook.com</email>
</author>
<published>2025-08-29T04:45:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=19464d951a93f48fad7332d59ec1e2f1d853c777'/>
<id>19464d951a93f48fad7332d59ec1e2f1d853c777</id>
<content type='text'>
Remove all "approx-func-fp-math" in tests.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove all "approx-func-fp-math" in tests.</pre>
</div>
</content>
</entry>
<entry>
<title>[DirectX] Validate registers are bound to root signature (#146785)</title>
<updated>2025-08-28T21:10:10+00:00</updated>
<author>
<name>joaosaffran</name>
<email>joaosaffranllvm@gmail.com</email>
</author>
<published>2025-08-28T21:10:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=36ebd1797203de0d38ccb5cacee39f1fec7a0c5a'/>
<id>36ebd1797203de0d38ccb5cacee39f1fec7a0c5a</id>
<content type='text'>
DXC checks if registers are correctly bound to root signature
descriptors. This implements the same check.
closes: #[126645](https://github.com/llvm/llvm-project/issues/126645)

---------

Co-authored-by: joaosaffran &lt;joao.saffran@microsoft.com&gt;
Co-authored-by: Joao Saffran &lt;jderezende@microsoft.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
DXC checks if registers are correctly bound to root signature
descriptors. This implements the same check.
closes: #[126645](https://github.com/llvm/llvm-project/issues/126645)

---------

Co-authored-by: joaosaffran &lt;joao.saffran@microsoft.com&gt;
Co-authored-by: Joao Saffran &lt;jderezende@microsoft.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[HLSL][DirectX] Remove uniformity bit from resource initialization intrinsics (#155332)</title>
<updated>2025-08-28T16:12:36+00:00</updated>
<author>
<name>Helena Kotas</name>
<email>hekotas@microsoft.com</email>
</author>
<published>2025-08-28T16:12:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ddf8cd3c6c949aa1ce0751d7a16966f612fb3ea4'/>
<id>ddf8cd3c6c949aa1ce0751d7a16966f612fb3ea4</id>
<content type='text'>
Removes uniformity bit from resource initialization intrinsics `llvm.{dx|spv}.resource.handlefrombinding` and `llvm.{dx|spv}.resource.handlefromimplicitbinding`. The flag currently always set to `false`. It should be derived from resource analysis and not provided by codegen.

Closes #135452</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Removes uniformity bit from resource initialization intrinsics `llvm.{dx|spv}.resource.handlefrombinding` and `llvm.{dx|spv}.resource.handlefromimplicitbinding`. The flag currently always set to `false`. It should be derived from resource analysis and not provided by codegen.

Closes #135452</pre>
</div>
</content>
</entry>
<entry>
<title>[DirectX][ObectYAML] Make `RootParameterOffset` and `StaticSamplersOffset` behaviour consistent (#155521)</title>
<updated>2025-08-27T18:53:37+00:00</updated>
<author>
<name>Finn Plummer</name>
<email>mail@inbelic.dev</email>
</author>
<published>2025-08-27T18:53:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6f0253b435b0a229ef15f97a568cdf27418d7af7'/>
<id>6f0253b435b0a229ef15f97a568cdf27418d7af7</id>
<content type='text'>
This pr fixes some inconsistencies in behaviour of how we handle
`StaticSamplersOffset` with respect to DXC and `RootParameterOffset`.
Namely:

1. Make codegen of `RTS0` always compute the `StaticSamplersOffset`
regardless if there are any `StaticSampler`s. This is to be consistent
and produce an identical `DXContainer` as DXC.
2. Make the `StaticSamplersOffset` and `RootParametersOffset` optional
parameters in the yaml description. This means it will be used when it
is specified (which was not necassarily the case before).
3. Enforce that the provided `StaticSamplersOffset` and
`RootParametersOffset` in a yaml description match the computed value.

For more context see:
https://github.com/llvm/llvm-project/issues/155299.

Description of existing test updates updates:
- `CodeGen/DirectX/ContainerData`: Updated to codegen computed values
(previously unspecified)
- `llvm-objcopy/DXContainer`: Updated to `yaml2obj` computed values
(previously unspecified)
- `ObjectYAML/DXContainer`: Updated to `yaml2obj` computed values
(previously incorrect)
- `ObjectYAML/DXContainerYAMLTest`: Updated to `yaml2obj` computed
values (previously incorrect)

See newly added tests for testing of optional parameter functionality
and `StaticSamplersOffset` computation.

Resolves: https://github.com/llvm/llvm-project/issues/155299</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This pr fixes some inconsistencies in behaviour of how we handle
`StaticSamplersOffset` with respect to DXC and `RootParameterOffset`.
Namely:

1. Make codegen of `RTS0` always compute the `StaticSamplersOffset`
regardless if there are any `StaticSampler`s. This is to be consistent
and produce an identical `DXContainer` as DXC.
2. Make the `StaticSamplersOffset` and `RootParametersOffset` optional
parameters in the yaml description. This means it will be used when it
is specified (which was not necassarily the case before).
3. Enforce that the provided `StaticSamplersOffset` and
`RootParametersOffset` in a yaml description match the computed value.

For more context see:
https://github.com/llvm/llvm-project/issues/155299.

Description of existing test updates updates:
- `CodeGen/DirectX/ContainerData`: Updated to codegen computed values
(previously unspecified)
- `llvm-objcopy/DXContainer`: Updated to `yaml2obj` computed values
(previously unspecified)
- `ObjectYAML/DXContainer`: Updated to `yaml2obj` computed values
(previously incorrect)
- `ObjectYAML/DXContainerYAMLTest`: Updated to `yaml2obj` computed
values (previously incorrect)

See newly added tests for testing of optional parameter functionality
and `StaticSamplersOffset` computation.

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