; RUN: not opt -S -verify < %s 2>&1 | FileCheck %s ;; Global variables cannot be scalable vectors, since we don't ;; know the size at compile time. ; CHECK: Globals cannot contain scalable vectors ; CHECK-NEXT: * @ScalableVecGlobal @ScalableVecGlobal = global zeroinitializer ;; Global _pointers_ to scalable vectors are fine ; CHECK-NOT: Globals cannot contain scalable vectors @ScalableVecPtr = global * zeroinitializer ;; The following errors don't explicitly mention global variables, but ;; do still guarantee that the error will be caught. ; CHECK-DAG: Arrays cannot contain scalable vectors ; CHECK-DAG: [64 x ]; ModuleID = '' @ScalableVecGlobalArray = global [64 x ] zeroinitializer ; CHECK-DAG: Structs cannot contain scalable vectors ; CHECK-DAG: { , }; ModuleID = '' @ScalableVecGlobalStruct = global { , } zeroinitializer ; CHECK-DAG: Structs cannot contain scalable vectors ; CHECK-DAG { , }; ModuleID = '' @ScalableVecMixed = global { [4 x i32], [2 x { , }]} zeroinitializer