mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-03 10:54:42 +00:00
582e630731
* Adds a 'scalable' flag to VectorType * Adds an 'ElementCount' class to VectorType to pass (possibly scalable) vector lengths, with overloaded operators. * Modifies existing helper functions to use ElementCount * Adds support for serializing/deserializing to/from both textual and bitcode IR formats * Extends the verifier to reject global variables of scalable types * Updates documentation See the latest version of the RFC here: http://lists.llvm.org/pipermail/llvm-dev/2018-July/124396.html Reviewers: rengolin, lattner, echristo, chandlerc, hfinkel, rkruppe, samparker, SjoerdMeijer, greened, sebpop Reviewed By: hfinkel, sebpop Differential Revision: https://reviews.llvm.org/D32530 llvm-svn: 361953
25 lines
1.1 KiB
LLVM
25 lines
1.1 KiB
LLVM
; 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
|
|
|
|
; CHECK: Globals cannot contain scalable vectors
|
|
; CHECK-NEXT: [64 x <vscale x 2 x double>]* @ScalableVecGlobalArray
|
|
@ScalableVecGlobalArray = global [64 x <vscale x 2 x double>] zeroinitializer
|
|
|
|
; CHECK: Globals cannot contain scalable vectors
|
|
; CHECK-NEXT: { <vscale x 16 x i64>, <vscale x 16 x i1> }* @ScalableVecGlobalStruct
|
|
@ScalableVecGlobalStruct = global { <vscale x 16 x i64>, <vscale x 16 x i1> } zeroinitializer
|
|
|
|
; CHECK: Globals cannot contain scalable vectors
|
|
; CHECK-NEXT: { [4 x i32], [2 x { <vscale x 4 x i64>, <vscale x 32 x i8> }] }* @ScalableVecMixed
|
|
@ScalableVecMixed = global { [4 x i32], [2 x { <vscale x 4 x i64>, <vscale x 32 x i8> }]} zeroinitializer
|
|
|
|
;; Global _pointers_ to scalable vectors are fine
|
|
; CHECK-NOT: Globals cannot contain scalable vectors
|
|
@ScalableVecPtr = global <vscale x 8 x i16>* zeroinitializer
|