[llvm] [SPIRV] Make access qualifier optional for spirv.Image type (PR #110852)

Steven Perron via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 3 09:16:41 PDT 2024


================
@@ -0,0 +1,20 @@
+; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv-vulkan-library %s -o - | FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-vulkan-library %s -o - -filetype=obj | spirv-val %}
+
+; CHECK-NOT: OpCapability ImageBasic
+; CHECK-NOT: OpCapability ImageReadWrite
+; CHECK: OpCapability ImageBuffer
+; CHECK-NOT: OpCapability ImageBasic
+; CHECK-NOT: OpCapability ImageReadWrite
+
+; CHECK: [[Float:%[0-9]+]] = OpTypeFloat 32
+; CHECK: [[Void:%[0-9]+]] = OpTypeVoid
+; CHECK: [[ImageType:%[0-9]+]] = OpTypeImage [[Float]] Buffer 2 0 0 2 R32i {{$}}
+; CHECK: [[ImageFuncType:%[0-9]+]] = OpTypeFunction [[Void]] [[ImageType]]
+
+; CHECK: {{%[0-9]+}} = OpFunction [[Void]] DontInline [[ImageFuncType]]    ; -- Begin function ImageWithNoAccessQualifier
----------------
s-perron wrote:

Done.

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


More information about the llvm-commits mailing list