[llvm] [SPIRV] Porting 4 tests from Translator (PR #151678)
Michal Paszkowski via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 3 12:07:37 PDT 2025
================
@@ -0,0 +1,23 @@
+; This test case checks that LLVM -> SPIR-V translation produces valid
+; SPIR-V module, where a global variable, defined with non-default
+; address space, have correct non-function storage class.
+;
+; No additional checks are needed in addition to simple translation
+; to SPIR-V. In case of an error newly produced SPIR-V module validation
+; would fail due to spirv-val that detects problematic SPIR-V code from
+; translator and reports it as the following error:
+;
+; "Variables can not have a function[7] storage class outside of a function".
+;
+; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s
----------------
michalpaszkowski wrote:
I'd suggest running -verify-machineinstrs as we do with other intrinsic tests.
```suggestion
; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s
```
https://github.com/llvm/llvm-project/pull/151678
More information about the llvm-commits
mailing list