[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:04:25 PDT 2025


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-sie-ubuntu-fast` running on `sie-linux-worker` while building `clang` at step 6 "test-build-unified-tree-check-all".

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

<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):
--
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang -cc1 -internal-isystem /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/lib/clang/22/include -nostdsysteminc -triple dxil-pc-shadermodel6.3-library -finclude-default-header -emit-llvm -disable-llvm-passes -o - /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/CodeGenHLSL/resources/StructuredBuffers-methods-lib.hlsl | llvm-cxxfilt | /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/FileCheck /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/CodeGenHLSL/resources/StructuredBuffers-methods-lib.hlsl --check-prefixes=CHECK,DXIL # RUN: at line 1
+ llvm-cxxfilt
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang -cc1 -internal-isystem /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/lib/clang/22/include -nostdsysteminc -triple dxil-pc-shadermodel6.3-library -finclude-default-header -emit-llvm -disable-llvm-passes -o - /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/CodeGenHLSL/resources/StructuredBuffers-methods-lib.hlsl
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/FileCheck /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/CodeGenHLSL/resources/StructuredBuffers-methods-lib.hlsl --check-prefixes=CHECK,DXIL
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/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: /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/CodeGenHLSL/resources/StructuredBuffers-methods-lib.hlsl

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

Input was:
<<<<<<
           1: ; ModuleID = '/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/CodeGenHLSL/resources/StructuredBuffers-methods-lib.hlsl' 
           2: source_filename = "/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/CodeGenHLSL/resources/StructuredBuffers-methods-lib.hlsl" 
           3: target datalayout = "e-m:e-p:32:32-i1:32-i8:8-i16:16-i32:32-i64:64-f16:16-f32:32-f64:64-n8:16:32:64" 
           4: target triple = "dxilv1.3-pc-shadermodel6.3-library" 
           5:  
           6: %"class.hlsl::StructuredBuffer" = type { target("dx.RawBuffer", float, 0, 0) } 
check:12      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           7: %"class.hlsl::RWStructuredBuffer" = type { target("dx.RawBuffer", float, 1, 0), target("dx.RawBuffer", float, 1, 0) } 
check:13      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           8: %"class.hlsl::RWStructuredBuffer.0" = type { target("dx.RawBuffer", <4 x i32>, 1, 0), target("dx.RawBuffer", <4 x i32>, 1, 0) } 
check:14      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           9: %"class.hlsl::AppendStructuredBuffer" = type { target("dx.RawBuffer", float, 1, 0), target("dx.RawBuffer", float, 1, 0) } 
check:15      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          10: %"class.hlsl::ConsumeStructuredBuffer" = type { target("dx.RawBuffer", double, 1, 0), target("dx.RawBuffer", double, 1, 0) } 
check:16      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          11:  
          12:  at SB1 = internal global %"class.hlsl::StructuredBuffer" poison, align 4 
          13:  at .str = private unnamed_addr constant [4 x i8] c"SB1\00", align 1 
          14:  at RWSB1 = internal global %"class.hlsl::RWStructuredBuffer" poison, align 4 
          15:  at .str.2 = private unnamed_addr constant [6 x i8] c"RWSB1\00", align 1 
          16:  at RWSB2 = internal global %"class.hlsl::RWStructuredBuffer.0" poison, align 4 
...

```

</details>

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


More information about the cfe-commits mailing list