[llvm] [SPIR-V] Fix wrong element inferred for long vectors when using ByteAdressBuffer (PR #222220)

via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 18 11:54:26 PDT 2026


================
@@ -0,0 +1,31 @@
+; RUN: llc -O0 -mtriple=spirv-unknown-vulkan-compute %s -o - | FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-vulkan-compute %s -o - -filetype=obj | spirv-val --target-env vulkan1.3 %}
+
+; CHECK-DAG: %[[GLSLEXT:[0-9]+]] = OpExtInstImport "GLSL.std.450"
+; CHECK-DAG: %[[FLOAT:[0-9]+]] = OpTypeFloat 32
+; CHECK-DAG: %[[V4FLOAT:[0-9]+]] = OpTypeVector %[[FLOAT]] 4
+; CHECK: OpBitcast %[[FLOAT]]
----------------
joaosaffran wrote:

nit: Should we check that those changes are happening inside the main function? 
```
; CHECK-LABEL: -- Begin function main
; CHECK: OpBitcast %[[FLOAT]]
```

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


More information about the llvm-commits mailing list