[clang] [llvm] [DirectX] Avoid crash on non-unique resource error (PR #206396)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 17 22:04:38 PST 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 149151 tests passed
* 2307 tests skipped
* 1 test failed
## Failed Tests
(click on a test name to see its output)
### Clang
<details>
<summary>Clang.CodeGenHLSL/resources/non-unique-resource-access.hlsl</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
not c:\_work\llvm-project\llvm-project\build\bin\clang.exe --driver-mode=dxc -T cs_6_0 -E two_globals -Vd -Fo C:\_work\llvm-project\llvm-project\build\tools\clang\test\CodeGenHLSL\resources\Output\non-unique-resource-access.hlsl.tmp.dxil C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\non-unique-resource-access.hlsl 2>&1 | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\non-unique-resource-access.hlsl --check-prefixes=CHECK,NOLOC
# executed command: not 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' --driver-mode=dxc -T cs_6_0 -E two_globals -Vd -Fo 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\CodeGenHLSL\resources\Output\non-unique-resource-access.hlsl.tmp.dxil' 'C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\non-unique-resource-access.hlsl'
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\non-unique-resource-access.hlsl' --check-prefixes=CHECK,NOLOC
# note: command had no output on stdout or stderr
# RUN: at line 2
not c:\_work\llvm-project\llvm-project\build\bin\clang.exe --driver-mode=dxc -T cs_6_0 -E two_globals -Vd -Zi -Fo C:\_work\llvm-project\llvm-project\build\tools\clang\test\CodeGenHLSL\resources\Output\non-unique-resource-access.hlsl.tmp.dxil C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\non-unique-resource-access.hlsl 2>&1 | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\non-unique-resource-access.hlsl --check-prefixes=CHECK,GLOBALS-LOC
# executed command: not 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' --driver-mode=dxc -T cs_6_0 -E two_globals -Vd -Zi -Fo 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\CodeGenHLSL\resources\Output\non-unique-resource-access.hlsl.tmp.dxil' 'C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\non-unique-resource-access.hlsl'
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\non-unique-resource-access.hlsl' --check-prefixes=CHECK,GLOBALS-LOC
# note: command had no output on stdout or stderr
# RUN: at line 3
not c:\_work\llvm-project\llvm-project\build\bin\clang.exe --driver-mode=dxc -T cs_6_0 -E global_and_array -Vd -Fo C:\_work\llvm-project\llvm-project\build\tools\clang\test\CodeGenHLSL\resources\Output\non-unique-resource-access.hlsl.tmp.dxil C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\non-unique-resource-access.hlsl 2>&1 | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\non-unique-resource-access.hlsl --check-prefixes=CHECK,NOLOC
# executed command: not 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' --driver-mode=dxc -T cs_6_0 -E global_and_array -Vd -Fo 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\CodeGenHLSL\resources\Output\non-unique-resource-access.hlsl.tmp.dxil' 'C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\non-unique-resource-access.hlsl'
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\non-unique-resource-access.hlsl' --check-prefixes=CHECK,NOLOC
# note: command had no output on stdout or stderr
# RUN: at line 4
not c:\_work\llvm-project\llvm-project\build\bin\clang.exe --driver-mode=dxc -T cs_6_0 -E global_and_array -Vd -Zi -Fo C:\_work\llvm-project\llvm-project\build\tools\clang\test\CodeGenHLSL\resources\Output\non-unique-resource-access.hlsl.tmp.dxil C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\non-unique-resource-access.hlsl 2>&1 | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\non-unique-resource-access.hlsl --check-prefixes=CHECK,ARRAY-LOC
# executed command: not 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' --driver-mode=dxc -T cs_6_0 -E global_and_array -Vd -Zi -Fo 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\CodeGenHLSL\resources\Output\non-unique-resource-access.hlsl.tmp.dxil' 'C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\non-unique-resource-access.hlsl'
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\non-unique-resource-access.hlsl' --check-prefixes=CHECK,ARRAY-LOC
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\non-unique-resource-access.hlsl:15:15: error: CHECK-NOT: excluded string found in input
# | // CHECK-NOT: PLEASE submit a bug report
# | ^
# | <stdin>:21:1: note: found here
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and dumped files.
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\non-unique-resource-access.hlsl
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 8: 38 | Out = OutArr[0];
# | 9: | ^
# | 10: C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\non-unique-resource-access.hlsl:36:28: note: variable 'Out' is declared here
# | 11: 36 | RWStructuredBuffer<uint> Out = Out0;
# | 12: | ^
# | 13: C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\non-unique-resource-access.hlsl:39:14: error: Resource access is not guaranteed to map to a unique global resource
# | not:15'0 { search range start (exclusive)
# | 14: 39 | Out[tid.x] = In[tid.x];
# | 15: | ^
# | 16: note: At resource access: store i32 %7, ptr %8, align 4, !dbg !80, !tbaa !59
# | 17: note: Uses resource handle: %4 = tail call target("dx.RawBuffer", i32, 1, 0) @llvm.dx.resource.handlefromimplicitbinding.tdx.RawBuffer_i32_1_0t(i32 2, i32 0, i32 0, i32 0, ptr nonnull @OutArr.str), !dbg !561
# | 18: note: Uses resource handle: %1 = tail call target("dx.RawBuffer", i32, 1, 0) @llvm.dx.resource.handlefrombinding.tdx.RawBuffer_i32_1_0t(i32 0, i32 1, i32 1, i32 0, ptr nonnull @.str.2), !dbg !469
# | 19: These should never be used!!!
# | 20: UNREACHABLE executed at C:\_work\llvm-project\llvm-project\llvm\lib\Target\DirectX\DXILWriter\DXILBitcodeWriter.cpp:1015!
# | 21: PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and dumped files.
# | not:15'1 !~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match expected
# | 22: Stack dump:
# | 23: 0. Program arguments: c:\\_work\\llvm-project\\llvm-project\\build\\bin\\clang.exe --driver-mode=dxc -T cs_6_0 -E global_and_array -Vd -Zi -Fo C:\\_work\\llvm-project\\llvm-project\\build\\tools\\clang\\test\\CodeGenHLSL\\resources\\Output\\non-unique-resource-access.hlsl.tmp.dxil C:\\_work\\llvm-project\\llvm-project\\clang\\test\\CodeGenHLSL\\resources\\non-unique-resource-access.hlsl
# | 24: 1. <eof> parser at end of file
# | 25: 2. Code generation
# | 26: 3. Running pass 'DXIL Embedder' on module 'C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\non-unique-resource-access.hlsl'.
# | .
# | .
# | .
# | 72: PLEASE ATTACH THE FOLLOWING CRASH REPRODUCER FILES TO THE BUG REPORT:
# | 73: clang: note: diagnostic msg: C:\Users\ContainerAdministrator\AppData\Local\Temp\lit-tmp-0bgoqzdh\non-unique-resource-access-3b084e.hlsl
# | 74: clang: note: diagnostic msg: C:\Users\ContainerAdministrator\AppData\Local\Temp\lit-tmp-0bgoqzdh\non-unique-resource-access-3b084e.sh
# | 75: clang: note: diagnostic msg:
# | 76:
# | 77: ********************
# | not:15'2 } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.
https://github.com/llvm/llvm-project/pull/206396
More information about the cfe-commits
mailing list