1 ; Test vector zero-extending loads.
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s
5 ; Test a v16i1->v16i8 extension.
6 define <16 x i8> @f1(ptr %ptr) {
7 ; No expected output, but must compile.
8 %val = load <16 x i1>, ptr %ptr
9 %ret = zext <16 x i1> %val to <16 x i8>
13 ; Test a v8i1->v8i16 extension.
14 define <8 x i16> @f2(ptr %ptr) {
15 ; No expected output, but must compile.
16 %val = load <8 x i1>, ptr %ptr
17 %ret = zext <8 x i1> %val to <8 x i16>
21 ; Test a v8i8->v8i16 extension.
22 define <8 x i16> @f3(ptr %ptr) {
24 ; CHECK: vlrepg [[REG1:%v[0-9]+]], 0(%r2)
25 ; CHECK: vuplhb %v24, [[REG1]]
27 %val = load <8 x i8>, ptr %ptr
28 %ret = zext <8 x i8> %val to <8 x i16>
32 ; Test a v4i1->v4i32 extension.
33 define <4 x i32> @f4(ptr %ptr) {
34 ; No expected output, but must compile.
35 %val = load <4 x i1>, ptr %ptr
36 %ret = zext <4 x i1> %val to <4 x i32>
40 ; Test a v4i8->v4i32 extension.
41 define <4 x i32> @f5(ptr %ptr) {
43 ; CHECK: larl %r1, .LCPI4_0
44 ; CHECK: vlrepf [[REG1:%v[0-9]+]], 0(%r2)
45 ; CHECK: vl %v1, 0(%r1), 3
46 ; CHECK: vperm %v24, %v1, [[REG1]], %v1
48 %val = load <4 x i8>, ptr %ptr
49 %ret = zext <4 x i8> %val to <4 x i32>
53 ; Test a v4i16->v4i32 extension.
54 define <4 x i32> @f6(ptr %ptr) {
56 ; CHECK: vlrepg [[REG1:%v[0-9]+]], 0(%r2)
57 ; CHECK: vuplhh %v24, [[REG1]]
59 %val = load <4 x i16>, ptr %ptr
60 %ret = zext <4 x i16> %val to <4 x i32>
64 ; Test a v2i1->v2i64 extension.
65 define <2 x i64> @f7(ptr %ptr) {
66 ; No expected output, but must compile.
67 %val = load <2 x i1>, ptr %ptr
68 %ret = zext <2 x i1> %val to <2 x i64>
72 ; Test a v2i8->v2i64 extension.
73 define <2 x i64> @f8(ptr %ptr) {
75 ; CHECK: larl %r1, .LCPI7_0
76 ; CHECK: vlreph [[REG1:%v[0-9]+]], 0(%r2)
77 ; CHECK: vl %v1, 0(%r1), 3
78 ; CHECK: vperm %v24, %v1, [[REG1]], %v1
80 %val = load <2 x i8>, ptr %ptr
81 %ret = zext <2 x i8> %val to <2 x i64>
85 ; Test a v2i16->v2i64 extension.
86 define <2 x i64> @f9(ptr %ptr) {
88 ; CHECK: larl %r1, .LCPI8_0
89 ; CHECK: vlrepf [[REG1:%v[0-9]+]], 0(%r2)
90 ; CHECK: vl %v1, 0(%r1), 3
91 ; CHECK: vperm %v24, %v1, [[REG1]], %v1
93 %val = load <2 x i16>, ptr %ptr
94 %ret = zext <2 x i16> %val to <2 x i64>
98 ; Test a v2i32->v2i64 extension.
99 define <2 x i64> @f10(ptr %ptr) {
101 ; CHECK: vlrepg [[REG1:%v[0-9]+]], 0(%r2)
102 ; CHECK: vuplhf %v24, [[REG1]]
104 %val = load <2 x i32>, ptr %ptr
105 %ret = zext <2 x i32> %val to <2 x i64>