25 lines · plain
1; RUN: llvm-as < %s | llvm-dis | FileCheck %s2; Check support for basic target extension type usage3 4@global = global target("spirv.DeviceEvent") zeroinitializer5 6define target("spirv.Sampler") @foo(target("spirv.Sampler") %a) {7 ret target("spirv.Sampler") %a8}9 10define target("spirv.Event") @func2() {11 %mem = alloca target("spirv.Event")12 %val = load target("spirv.Event"), ptr %mem13 ret target("spirv.Event") poison14}15 16; CHECK: @global = global target("spirv.DeviceEvent") zeroinitializer17; CHECK: define target("spirv.Sampler") @foo(target("spirv.Sampler") %a) {18; CHECK: ret target("spirv.Sampler") %a19; CHECK: }20; CHECK: define target("spirv.Event") @func2() {21; CHECK: %mem = alloca target("spirv.Event")22; CHECK: %val = load target("spirv.Event"), ptr %mem23; CHECK: ret target("spirv.Event") poison24; CHECK: }25