1 ; RUN: not opt -S -verify < %s 2>&1 | FileCheck %s
3 ;; Global variables cannot be scalable vectors, since we don't
4 ;; know the size at compile time.
6 ; CHECK: Globals cannot contain scalable vectors
7 ; CHECK-NEXT: <vscale x 4 x i32>* @ScalableVecGlobal
8 @ScalableVecGlobal = global <vscale x 4 x i32> zeroinitializer
10 ; CHECK: Globals cannot contain scalable vectors
11 ; CHECK-NEXT: [64 x <vscale x 2 x double>]* @ScalableVecGlobalArray
12 @ScalableVecGlobalArray = global [64 x <vscale x 2 x double>] zeroinitializer
14 ; CHECK: Globals cannot contain scalable vectors
15 ; CHECK-NEXT: { <vscale x 16 x i64>, <vscale x 16 x i1> }* @ScalableVecGlobalStruct
16 @ScalableVecGlobalStruct = global { <vscale x 16 x i64>, <vscale x 16 x i1> } zeroinitializer
18 ; CHECK: Globals cannot contain scalable vectors
19 ; CHECK-NEXT: { [4 x i32], [2 x { <vscale x 4 x i64>, <vscale x 32 x i8> }] }* @ScalableVecMixed
20 @ScalableVecMixed = global { [4 x i32], [2 x { <vscale x 4 x i64>, <vscale x 32 x i8> }]} zeroinitializer
22 ;; Global _pointers_ to scalable vectors are fine
23 ; CHECK-NOT: Globals cannot contain scalable vectors
24 @ScalableVecPtr = global <vscale x 8 x i16>* zeroinitializer