2019-07-05 14:48:16 +02:00
|
|
|
; 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: <vscale x 4 x i32>* @ScalableVecGlobal
|
|
|
|
@ScalableVecGlobal = global <vscale x 4 x i32> zeroinitializer
|
|
|
|
|
2021-01-18 08:29:43 +01:00
|
|
|
; CHECK-NEXT: Globals cannot contain scalable vectors
|
|
|
|
; CHECK-NEXT: { i32, <vscale x 4 x i32> }* @ScalableVecStructGlobal
|
|
|
|
@ScalableVecStructGlobal = global { i32, <vscale x 4 x i32> } zeroinitializer
|
|
|
|
|
2019-07-05 14:48:16 +02:00
|
|
|
;; Global _pointers_ to scalable vectors are fine
|
|
|
|
; CHECK-NOT: Globals cannot contain scalable vectors
|
2021-01-18 08:29:43 +01:00
|
|
|
@ScalableVecPtr = global <vscale x 8 x i16>* zeroinitializer
|