# Changeset View

Changeset View

# Standalone View

Standalone View

# llvm/trunk/test/Verifier/scalable-aggregates.ll

1 | ; RUN: not opt -S -verify < %s 2>&1 | FileCheck %s | ||||
---|---|---|---|---|---|

2 | | ||||

3 | ;; Arrays and Structs cannot contain scalable vectors, since we don't | ||||

4 | ;; know the size at compile time and the container types need to have | ||||

5 | ;; a known size. | ||||

6 | | ||||

7 | ; CHECK-DAG: Arrays cannot contain scalable vectors | ||||

8 | ; CHECK-DAG: [2 x { i32, <vscale x 1 x i32> }]; ModuleID = '<stdin>' | ||||

9 | ; CHECK-DAG: Arrays cannot contain scalable vectors | ||||

10 | ; CHECK-DAG: [4 x <vscale x 256 x i1>]; ModuleID = '<stdin>' | ||||

11 | ; CHECK-DAG: Arrays cannot contain scalable vectors | ||||

12 | ; CHECK-DAG: [2 x <vscale x 4 x i32>]; ModuleID = '<stdin>' | ||||

13 | ; CHECK-DAG: Structs cannot contain scalable vectors | ||||

14 | ; CHECK-DAG: { i64, [4 x <vscale x 256 x i1>] }; ModuleID = '<stdin>' | ||||

15 | ; CHECK-DAG: Structs cannot contain scalable vectors | ||||

16 | ; CHECK-DAG: { i32, <vscale x 1 x i32> }; ModuleID = '<stdin>' | ||||

17 | ; CHECK-DAG: Structs cannot contain scalable vectors | ||||

18 | ; CHECK-DAG: { <vscale x 16 x i8>, <vscale x 2 x double> }; ModuleID = '<stdin>' | ||||

19 | ; CHECK-DAG: Structs cannot contain scalable vectors | ||||

20 | ; CHECK-DAG: %sty = type { i64, <vscale x 32 x i16> }; ModuleID = '<stdin>' | ||||

21 | | ||||

22 | %sty = type { i64, <vscale x 32 x i16> } | ||||

23 | | ||||

24 | define void @scalable_aggregates() { | ||||

25 | %array = alloca [2 x <vscale x 4 x i32>] | ||||

26 | %struct = alloca { <vscale x 16 x i8>, <vscale x 2 x double> } | ||||

27 | %named_struct = alloca %sty | ||||

28 | %s_in_a = alloca [2 x { i32, <vscale x 1 x i32> } ] | ||||

29 | %a_in_s = alloca { i64, [4 x <vscale x 256 x i1> ] } | ||||

30 | ret void | ||||

31 | } | ||||

32 | No newline at end of file |