[clang] [HLSL][NFC] Refactor structured buffer methods tests (PR #161908)

LLVM Continuous Integration via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 14 15:13:23 PDT 2025


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `llvm-clang-aarch64-darwin` running on `doug-worker-5` while building `clang` at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/29046

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang :: CodeGenHLSL/resources/StructuredBuffers-methods-lib.hlsl' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/Volumes/ExternalSSD/buildbot-root/aarch64-darwin/build/bin/clang -cc1 -internal-isystem /Volumes/ExternalSSD/buildbot-root/aarch64-darwin/build/lib/clang/22/include -nostdsysteminc -triple dxil-pc-shadermodel6.3-library -finclude-default-header -emit-llvm -disable-llvm-passes -o - /Users/buildbot/buildbot-root2/aarch64-darwin/llvm-project/clang/test/CodeGenHLSL/resources/StructuredBuffers-methods-lib.hlsl | llvm-cxxfilt | /Volumes/ExternalSSD/buildbot-root/aarch64-darwin/build/bin/FileCheck /Users/buildbot/buildbot-root2/aarch64-darwin/llvm-project/clang/test/CodeGenHLSL/resources/StructuredBuffers-methods-lib.hlsl --check-prefixes=CHECK,DXIL # RUN: at line 1
+ /Volumes/ExternalSSD/buildbot-root/aarch64-darwin/build/bin/clang -cc1 -internal-isystem /Volumes/ExternalSSD/buildbot-root/aarch64-darwin/build/lib/clang/22/include -nostdsysteminc -triple dxil-pc-shadermodel6.3-library -finclude-default-header -emit-llvm -disable-llvm-passes -o - /Users/buildbot/buildbot-root2/aarch64-darwin/llvm-project/clang/test/CodeGenHLSL/resources/StructuredBuffers-methods-lib.hlsl
+ llvm-cxxfilt
+ /Volumes/ExternalSSD/buildbot-root/aarch64-darwin/build/bin/FileCheck /Users/buildbot/buildbot-root2/aarch64-darwin/llvm-project/clang/test/CodeGenHLSL/resources/StructuredBuffers-methods-lib.hlsl --check-prefixes=CHECK,DXIL
/Users/buildbot/buildbot-root2/aarch64-darwin/llvm-project/clang/test/CodeGenHLSL/resources/StructuredBuffers-methods-lib.hlsl:29:15: error: DXIL-NEXT: expected string not found in input
// DXIL-NEXT: %[[COUNTER:.*]] = call i32 @llvm.dx.resource.updatecounter.tdx.RawBuffer_f32_1_0t(target("dx.RawBuffer", float, 1, 0) %[[HANDLE]], i8 1)
              ^
<stdin>:336:62: note: scanning from here
 %0 = load target("dx.RawBuffer", float, 1, 0), ptr %__handle, align 4
                                                             ^
<stdin>:336:62: note: with "HANDLE" equal to "0"
 %0 = load target("dx.RawBuffer", float, 1, 0), ptr %__handle, align 4
                                                             ^
<stdin>:338:2: note: possible intended match here
 %2 = call ptr @llvm.dx.resource.getpointer.p0.tdx.RawBuffer_f32_1_0t(target("dx.RawBuffer", float, 1, 0) %0, i32 %1)
 ^

Input file: <stdin>
Check file: /Users/buildbot/buildbot-root2/aarch64-darwin/llvm-project/clang/test/CodeGenHLSL/resources/StructuredBuffers-methods-lib.hlsl

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
         331:  %Index.addr = alloca i32, align 4 
         332:  store ptr %this, ptr %this.addr, align 4 
         333:  store i32 %Index, ptr %Index.addr, align 4 
         334:  %this1 = load ptr, ptr %this.addr, align 4 
         335:  %__handle = getelementptr inbounds nuw %"class.hlsl::RWStructuredBuffer", ptr %this1, i32 0, i32 0 
         336:  %0 = load target("dx.RawBuffer", float, 1, 0), ptr %__handle, align 4 
next:29'0                                                                  X~~~~~~~~~ error: no match found
next:29'1                                                                             with "HANDLE" equal to "0"
         337:  %1 = load i32, ptr %Index.addr, align 4 
next:29'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         338:  %2 = call ptr @llvm.dx.resource.getpointer.p0.tdx.RawBuffer_f32_1_0t(target("dx.RawBuffer", float, 1, 0) %0, i32 %1) 
next:29'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
next:29'2      ?                                                                                                                     possible intended match
         339:  %3 = load float, ptr %2, align 4 
next:29'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         340:  ret float %3 
next:29'0     ~~~~~~~~~~~~~~
         341: } 
...

```

</details>

https://github.com/llvm/llvm-project/pull/161908


More information about the cfe-commits mailing list