-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #223 from frasercrmck/spirv-ll-opencl-dbg-prep
[spirv-ll] Add some preparation for DebugInfo translation
- Loading branch information
Showing
5 changed files
with
139 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
modules/compiler/spirv-ll/test/spvasm/invalid-spir-v/unsupported_storage_class.spvasm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
; Copyright (C) Codeplay Software Limited | ||
; | ||
; Licensed under the Apache License, Version 2.0 (the "License") with LLVM | ||
; Exceptions; you may not use this file except in compliance with the License. | ||
; You may obtain a copy of the License at | ||
; | ||
; https://github.com/codeplaysoftware/oneapi-construction-kit/blob/main/LICENSE.txt | ||
; | ||
; Unless required by applicable law or agreed to in writing, software | ||
; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
; License for the specific language governing permissions and limitations | ||
; under the License. | ||
; | ||
; SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
; This is invalid SPIR-V as we should be declaring the | ||
; PhysicalStorageBufferAddresses capability before using the | ||
; PhysicalStorageBuffer storage class, but we specifically want to test the | ||
; error handling of the translation of OpTypePointer with the unsupported | ||
; storage class. If we added 'OpCapability PhysicalStorageBufferAddresses' we'd | ||
; see an error about the unsupported capability instead. | ||
|
||
; RUN: %if online-spirv-as %{ spirv-as --target-env spv1.5 -o %spv_file_s %s %} | ||
; RUN: not spirv-ll-tool -a OpenCL -b 64 %spv_file_s 2>&1 | FileCheck %s | ||
|
||
; CHECK: Unknown StorageClass 5349 | ||
|
||
OpCapability Addresses | ||
OpCapability Linkage | ||
OpCapability Kernel | ||
OpCapability Int64 | ||
OpCapability Int8 | ||
%1 = OpExtInstImport "OpenCL.std" | ||
OpMemoryModel Physical64 OpenCL | ||
OpSource OpenCL_CPP 100000 | ||
%uint = OpTypeInt 32 0 | ||
%_ptr_Function_uint = OpTypePointer PhysicalStorageBuffer %uint |