1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
2 ; RUN: opt -passes=verify -S < %s 2>&1 | FileCheck %s
4 %struct.test = type { <vscale x 1 x i32>, <vscale x 1 x i32> }
6 define <vscale x 1 x i32> @load(%struct.test* %x) {
7 ; CHECK-LABEL: define <vscale x 1 x i32> @load
8 ; CHECK-SAME: (ptr [[X:%.*]]) {
9 ; CHECK-NEXT: [[A:%.*]] = load [[STRUCT_TEST:%.*]], ptr [[X]], align 4
10 ; CHECK-NEXT: [[B:%.*]] = extractvalue [[STRUCT_TEST]] [[A]], 1
11 ; CHECK-NEXT: ret <vscale x 1 x i32> [[B]]
13 %a = load %struct.test, %struct.test* %x
14 %b = extractvalue %struct.test %a, 1
15 ret <vscale x 1 x i32> %b
18 define void @store(%struct.test* %x, <vscale x 1 x i32> %y, <vscale x 1 x i32> %z) {
19 ; CHECK-LABEL: define void @store
20 ; CHECK-SAME: (ptr [[X:%.*]], <vscale x 1 x i32> [[Y:%.*]], <vscale x 1 x i32> [[Z:%.*]]) {
21 ; CHECK-NEXT: [[A:%.*]] = insertvalue [[STRUCT_TEST:%.*]] undef, <vscale x 1 x i32> [[Y]], 0
22 ; CHECK-NEXT: [[B:%.*]] = insertvalue [[STRUCT_TEST]] [[A]], <vscale x 1 x i32> [[Z]], 1
23 ; CHECK-NEXT: store [[STRUCT_TEST]] [[B]], ptr [[X]], align 4
24 ; CHECK-NEXT: ret void
26 %a = insertvalue %struct.test undef, <vscale x 1 x i32> %y, 0
27 %b = insertvalue %struct.test %a, <vscale x 1 x i32> %z, 1
28 store %struct.test %b, %struct.test* %x