File: linked-program.ll

package info (click to toggle)
spirv-llvm-translator-14 14.0.11-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 15,640 kB
  • sloc: cpp: 47,664; lisp: 3,704; sh: 153; python: 43; makefile: 33
file content (22 lines) | stat: -rw-r--r-- 656 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
; REQUIRES: spirv-link
;
; RUN: llvm-as %s -o %t.bc
; RUN: llvm-spirv %t.bc -o %t.spv
; RUN: spirv-val %t.spv
; RUN: spirv-link %t.spv -o %t.linked.spv
; RUN: llvm-spirv -r %t.linked.spv -o %t.rev.bc
; RUN: llvm-dis %t.rev.bc -o - | FileCheck %s
;
; This checks that SPIR-V programs with global variables are still consumable
; after spirv-link.

target triple = "spir-unknown-unknown"

@foo = common dso_local local_unnamed_addr addrspace(1) global i32 0, align 4
; CHECK: @foo = internal addrspace(1) global i32 0, align 4

define dso_local spir_kernel void @bar() local_unnamed_addr {
entry:
  store i32 42, i32 addrspace(1)* @foo, align 4
  ret void
}