1; RUN: llvm-as < %s | llvm-dis | FileCheck %s 2; Check support for basic target extension type usage 3 4@global = global target("spirv.DeviceEvent") zeroinitializer 5 6define target("spirv.Sampler") @foo(target("spirv.Sampler") %a) { 7 ret target("spirv.Sampler") %a 8} 9 10define target("spirv.Event") @func2() { 11 %mem = alloca target("spirv.Event") 12 %val = load target("spirv.Event"), ptr %mem 13 ret target("spirv.Event") poison 14} 15 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 19; CHECK: } 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 24; CHECK: } 25