32 lines · plain
1; RUN: not opt -S -passes=verify < %s 2>&1 | FileCheck %s2 3;; Global variables cannot be scalable vectors, since we don't4;; know the size at compile time.5 6; CHECK: Globals cannot contain scalable types7; CHECK-NEXT: ptr @ScalableVecGlobal8@ScalableVecGlobal = global <vscale x 4 x i32> zeroinitializer9 10; CHECK-NEXT: Globals cannot contain scalable types11; CHECK-NEXT: ptr @ScalableVecArrayGlobal12@ScalableVecArrayGlobal = global [ 8 x <vscale x 4 x i32> ] zeroinitializer13 14; CHECK-NEXT: Globals cannot contain scalable types15; CHECK-NEXT: ptr @ScalableVecStructGlobal16@ScalableVecStructGlobal = external global { i32, <vscale x 4 x i32> }17 18; CHECK-NEXT: Globals cannot contain scalable types19; CHECK-NEXT: ptr @StructTestGlobal20%struct.test = type { <vscale x 1 x double>, <vscale x 1 x double> }21@StructTestGlobal = global %struct.test zeroinitializer22 23; CHECK-NEXT: Globals cannot contain scalable types24; CHECK-NEXT: ptr @StructArrayTestGlobal25%struct.array.test = type { [2 x <vscale x 1 x double>] }26@StructArrayTestGlobal = external global %struct.array.test27 28; CHECK-NEXT: Globals cannot contain scalable types29; CHECK-NEXT: ptr @StructTargetTestGlobal30%struct.target.test = type { target("aarch64.svcount"), target("aarch64.svcount") }31@StructTargetTestGlobal = external global %struct.target.test32