1 ; RUN: llvm-as < %s | llvm-dis | FileCheck %s
2 ; Check support for basic target extension type usage
4 @global = global target("spirv.DeviceEvent") zeroinitializer
6 define target("spirv.Sampler") @foo(target("spirv.Sampler") %a) {
7 ret target("spirv.Sampler") %a
10 define target("spirv.Event") @func2() {
11 %mem = alloca target("spirv.Event")
12 %val = load target("spirv.Event"), ptr %mem
13 ret target("spirv.Event") poison
16 ; CHECK: @global = global target("spirv.DeviceEvent") zeroinitializer
17 ; CHECK: define target("spirv.Sampler") @foo(target("spirv.Sampler") %a) {
18 ; CHECK: ret target("spirv.Sampler") %a
20 ; CHECK: define target("spirv.Event") @func2() {
21 ; CHECK: %mem = alloca target("spirv.Event")
22 ; CHECK: %val = load target("spirv.Event"), ptr %mem
23 ; CHECK: ret target("spirv.Event") poison