[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:09:12 PDT 2025


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime-2` running on `rocm-worker-hw-02` while building `clang` at step 7 "Add check check-clang".

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

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

```
Step 7 (Add check check-clang) failure: test (failure)
******************** TEST 'Clang :: CodeGenHLSL/resources/StructuredBuffers-methods-ps.hlsl' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/clang -cc1 -internal-isystem /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/lib/clang/22/include -nostdsysteminc -triple dxil-pc-shadermodel6.3-pixel -finclude-default-header -emit-llvm -disable-llvm-passes -o - /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/test/CodeGenHLSL/resources/StructuredBuffers-methods-ps.hlsl | llvm-cxxfilt | /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/FileCheck /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/test/CodeGenHLSL/resources/StructuredBuffers-methods-ps.hlsl --check-prefixes=CHECK,DXIL # RUN: at line 1
+ llvm-cxxfilt
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/clang -cc1 -internal-isystem /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/lib/clang/22/include -nostdsysteminc -triple dxil-pc-shadermodel6.3-pixel -finclude-default-header -emit-llvm -disable-llvm-passes -o - /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/test/CodeGenHLSL/resources/StructuredBuffers-methods-ps.hlsl
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/FileCheck /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/test/CodeGenHLSL/resources/StructuredBuffers-methods-ps.hlsl --check-prefixes=CHECK,DXIL
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/test/CodeGenHLSL/resources/StructuredBuffers-methods-ps.hlsl:26:15: error: DXIL-NEXT: expected string not found in input
// DXIL-NEXT: %[[VAL:.*]] = call i32 @llvm.dx.resource.updatecounter.tdx.RawBuffer_f32_1_1t(target("dx.RawBuffer", float, 1, 1) %[[HANDLE]], i8 1)
              ^
<stdin>:165:62: note: scanning from here
 %0 = load target("dx.RawBuffer", float, 1, 1), ptr %__handle, align 4
                                                             ^
<stdin>:165:62: note: with "HANDLE" equal to "0"
 %0 = load target("dx.RawBuffer", float, 1, 1), ptr %__handle, align 4
                                                             ^
<stdin>:167:2: note: possible intended match here
 %2 = call ptr @llvm.dx.resource.getpointer.p0.tdx.RawBuffer_f32_1_1t(target("dx.RawBuffer", float, 1, 1) %0, i32 %1)
 ^

Input file: <stdin>
Check file: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/test/CodeGenHLSL/resources/StructuredBuffers-methods-ps.hlsl

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

Input was:
<<<<<<
           .
           .
           .
         160:  %Index.addr = alloca i32, align 4 
         161:  store ptr %this, ptr %this.addr, align 4 
         162:  store i32 %Index, ptr %Index.addr, align 4 
         163:  %this1 = load ptr, ptr %this.addr, align 4 
         164:  %__handle = getelementptr inbounds nuw %"class.hlsl::RasterizerOrderedStructuredBuffer", ptr %this1, i32 0, i32 0 
         165:  %0 = load target("dx.RawBuffer", float, 1, 1), ptr %__handle, align 4 
next:26'0                                                                  X~~~~~~~~~ error: no match found
next:26'1                                                                             with "HANDLE" equal to "0"
         166:  %1 = load i32, ptr %Index.addr, align 4 
next:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         167:  %2 = call ptr @llvm.dx.resource.getpointer.p0.tdx.RawBuffer_f32_1_1t(target("dx.RawBuffer", float, 1, 1) %0, i32 %1) 
next:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
next:26'2      ?                                                                                                                     possible intended match
         168:  %3 = load float, ptr %2, align 4 
next:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         169:  ret float %3 
next:26'0     ~~~~~~~~~~~~~~
         170: } 
...

```

</details>

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


More information about the cfe-commits mailing list