53 lines · plain
1; RUN: split-file %s %t2; RUN: not llvm-as < %t/zeroinit-error.ll -o /dev/null 2>&1 | FileCheck --check-prefix=CHECK-ZEROINIT %s3; RUN: not llvm-as < %t/global-var.ll -o /dev/null 2>&1 | FileCheck --check-prefix=CHECK-GLOBAL-VAR %s4; RUN: not llvm-as < %t/global-array.ll -o /dev/null 2>&1 | FileCheck --check-prefix=CHECK-GLOBAL-ARRAY %s5; RUN: not llvm-as < %t/global-struct.ll -o /dev/null 2>&1 | FileCheck --check-prefix=CHECK-GLOBAL-STRUCT %s6; RUN: not llvm-as < %t/alloca.ll -o /dev/null 2>&1 | FileCheck --check-prefix=CHECK-ALLOCA %s7; RUN: not llvm-as < %t/alloca-struct.ll -o /dev/null 2>&1 | FileCheck --check-prefix=CHECK-ALLOCA-STRUCT %s8; RUN: not llvm-as < %t/byval.ll -o /dev/null 2>&1 | FileCheck --check-prefix=CHECK-BYVAL %s9; RUN: not llvm-as < %t/byval-array.ll -o /dev/null 2>&1 | FileCheck --check-prefix=CHECK-BYVAL-ARRAY %s10; Check target extension type properties are verified in the assembler.11 12;--- zeroinit-error.ll13define void @foo() {14 %val = freeze target("spirv.DeviceEvent") zeroinitializer15 %val2 = freeze target("unknown_target_type") zeroinitializer16; CHECK-ZEROINIT: error: invalid type for null constant17 ret void18}19 20;--- global-var.ll21@global_var = external global target("unknown_target_type")22; CHECK-GLOBAL-VAR: Global @global_var has illegal target extension type23 24;--- global-array.ll25@global_array = external global [4 x target("unknown_target_type")]26; CHECK-GLOBAL-ARRAY: Global @global_array has illegal target extension type27 28;--- global-struct.ll29@global_struct = external global {target("unknown_target_type")}30; CHECK-GLOBAL-STRUCT: Global @global_struct has illegal target extension type31 32;--- alloca.ll33define void @foo() {34 %val = alloca target("amdgcn.named.barrier", 0)35; CHECK-ALLOCA: Alloca has illegal target extension type36 ret void37}38 39;--- alloca-struct.ll40define void @foo() {41 %val = alloca {target("amdgcn.named.barrier", 0), target("amdgcn.named.barrier", 0)}42; CHECK-ALLOCA-STRUCT: Alloca has illegal target extension type43 ret void44}45 46;--- byval.ll47declare void @foo(ptr byval(target("amdgcn.named.barrier", 0)))48; CHECK-BYVAL: 'byval' argument has illegal target extension type49 50;--- byval-array.ll51declare void @foo(ptr byval([4 x target("amdgcn.named.barrier", 0)]))52; CHECK-BYVAL-ARRAY: 'byval' argument has illegal target extension type53