1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
2 ; RUN: opt -passes=instcombine -S < %s | FileCheck %s
4 define <vscale x 4 x i32> @load(ptr %x) {
5 ; CHECK-LABEL: define <vscale x 4 x i32> @load
6 ; CHECK-SAME: (ptr [[X:%.*]]) {
7 ; CHECK-NEXT: [[A_ELT1:%.*]] = getelementptr inbounds [2 x <vscale x 4 x i32>], ptr [[X]], i64 0, i64 1
8 ; CHECK-NEXT: [[A_UNPACK2:%.*]] = load <vscale x 4 x i32>, ptr [[A_ELT1]], align 16
9 ; CHECK-NEXT: ret <vscale x 4 x i32> [[A_UNPACK2]]
11 %a = load [2 x <vscale x 4 x i32>], ptr %x
12 %b = extractvalue [2 x <vscale x 4 x i32>] %a, 1
13 ret <vscale x 4 x i32> %b
16 define void @store(ptr %x, <vscale x 4 x i32> %y, <vscale x 4 x i32> %z) {
17 ; CHECK-LABEL: define void @store
18 ; CHECK-SAME: (ptr [[X:%.*]], <vscale x 4 x i32> [[Y:%.*]], <vscale x 4 x i32> [[Z:%.*]]) {
19 ; CHECK-NEXT: store <vscale x 4 x i32> [[Y]], ptr [[X]], align 16
20 ; CHECK-NEXT: [[X_REPACK1:%.*]] = getelementptr inbounds [2 x <vscale x 4 x i32>], ptr [[X]], i64 0, i64 1
21 ; CHECK-NEXT: store <vscale x 4 x i32> [[Z]], ptr [[X_REPACK1]], align 16
22 ; CHECK-NEXT: ret void
24 %a = insertvalue [2 x <vscale x 4 x i32>] poison, <vscale x 4 x i32> %y, 0
25 %b = insertvalue [2 x <vscale x 4 x i32>] %a, <vscale x 4 x i32> %z, 1
26 store [2 x <vscale x 4 x i32>] %b, ptr %x