mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-24 12:55:45 +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
31 lines
1.4 KiB
LLVM
31 lines
1.4 KiB
LLVM
; RUN: not opt -S -verify < %s 2>&1 | FileCheck %s
|
|
|
|
;; Arrays and Structs cannot contain scalable vectors, since we don't
|
|
;; know the size at compile time and the container types need to have
|
|
;; a known size.
|
|
|
|
; CHECK-DAG: Arrays cannot contain scalable vectors
|
|
; CHECK-DAG: [2 x { i32, <vscale x 1 x i32> }]; ModuleID = '<stdin>'
|
|
; CHECK-DAG: Arrays cannot contain scalable vectors
|
|
; CHECK-DAG: [4 x <vscale x 256 x i1>]; ModuleID = '<stdin>'
|
|
; CHECK-DAG: Arrays cannot contain scalable vectors
|
|
; CHECK-DAG: [2 x <vscale x 4 x i32>]; ModuleID = '<stdin>'
|
|
; CHECK-DAG: Structs cannot contain scalable vectors
|
|
; CHECK-DAG: { i64, [4 x <vscale x 256 x i1>] }; ModuleID = '<stdin>'
|
|
; CHECK-DAG: Structs cannot contain scalable vectors
|
|
; CHECK-DAG: { i32, <vscale x 1 x i32> }; ModuleID = '<stdin>'
|
|
; CHECK-DAG: Structs cannot contain scalable vectors
|
|
; CHECK-DAG: { <vscale x 16 x i8>, <vscale x 2 x double> }; ModuleID = '<stdin>'
|
|
; CHECK-DAG: Structs cannot contain scalable vectors
|
|
; CHECK-DAG: %sty = type { i64, <vscale x 32 x i16> }; ModuleID = '<stdin>'
|
|
|
|
%sty = type { i64, <vscale x 32 x i16> }
|
|
|
|
define void @scalable_aggregates() {
|
|
%array = alloca [2 x <vscale x 4 x i32>]
|
|
%struct = alloca { <vscale x 16 x i8>, <vscale x 2 x double> }
|
|
%named_struct = alloca %sty
|
|
%s_in_a = alloca [2 x { i32, <vscale x 1 x i32> } ]
|
|
%a_in_s = alloca { i64, [4 x <vscale x 256 x i1> ] }
|
|
ret void
|
|
} |