1 ; Test vector zero extensions, which need to be implemented as ANDs.
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s
5 ; Test a v16i1->v16i8 extension.
6 define <16 x i8> @f1(<16 x i8> %val) {
8 ; CHECK: vrepib [[REG:%v[0-9]+]], 1
9 ; CHECK: vn %v24, %v24, [[REG]]
11 %trunc = trunc <16 x i8> %val to <16 x i1>
12 %ret = zext <16 x i1> %trunc to <16 x i8>
16 ; Test a v8i1->v8i16 extension.
17 define <8 x i16> @f2(<8 x i16> %val) {
19 ; CHECK: vrepih [[REG:%v[0-9]+]], 1
20 ; CHECK: vn %v24, %v24, [[REG]]
22 %trunc = trunc <8 x i16> %val to <8 x i1>
23 %ret = zext <8 x i1> %trunc to <8 x i16>
27 ; Test a v8i8->v8i16 extension.
28 define <8 x i16> @f3(<8 x i16> %val) {
30 ; CHECK: vgbm [[REG:%v[0-9]+]], 21845
31 ; CHECK: vn %v24, %v24, [[REG]]
33 %trunc = trunc <8 x i16> %val to <8 x i8>
34 %ret = zext <8 x i8> %trunc to <8 x i16>
38 ; Test a v4i1->v4i32 extension.
39 define <4 x i32> @f4(<4 x i32> %val) {
41 ; CHECK: vrepif [[REG:%v[0-9]+]], 1
42 ; CHECK: vn %v24, %v24, [[REG]]
44 %trunc = trunc <4 x i32> %val to <4 x i1>
45 %ret = zext <4 x i1> %trunc to <4 x i32>
49 ; Test a v4i8->v4i32 extension.
50 define <4 x i32> @f5(<4 x i32> %val) {
52 ; CHECK: vgbm [[REG:%v[0-9]+]], 4369
53 ; CHECK: vn %v24, %v24, [[REG]]
55 %trunc = trunc <4 x i32> %val to <4 x i8>
56 %ret = zext <4 x i8> %trunc to <4 x i32>
60 ; Test a v4i16->v4i32 extension.
61 define <4 x i32> @f6(<4 x i32> %val) {
63 ; CHECK: vgbm [[REG:%v[0-9]+]], 13107
64 ; CHECK: vn %v24, %v24, [[REG]]
66 %trunc = trunc <4 x i32> %val to <4 x i16>
67 %ret = zext <4 x i16> %trunc to <4 x i32>
71 ; Test a v2i1->v2i64 extension.
72 define <2 x i64> @f7(<2 x i64> %val) {
74 ; CHECK: vrepig [[REG:%v[0-9]+]], 1
75 ; CHECK: vn %v24, %v24, [[REG]]
77 %trunc = trunc <2 x i64> %val to <2 x i1>
78 %ret = zext <2 x i1> %trunc to <2 x i64>
82 ; Test a v2i8->v2i64 extension.
83 define <2 x i64> @f8(<2 x i64> %val) {
85 ; CHECK: vgbm [[REG:%v[0-9]+]], 257
86 ; CHECK: vn %v24, %v24, [[REG]]
88 %trunc = trunc <2 x i64> %val to <2 x i8>
89 %ret = zext <2 x i8> %trunc to <2 x i64>
93 ; Test a v2i16->v2i64 extension.
94 define <2 x i64> @f9(<2 x i64> %val) {
96 ; CHECK: vgbm [[REG:%v[0-9]+]], 771
97 ; CHECK: vn %v24, %v24, [[REG]]
99 %trunc = trunc <2 x i64> %val to <2 x i16>
100 %ret = zext <2 x i16> %trunc to <2 x i64>
104 ; Test a v2i32->v2i64 extension.
105 define <2 x i64> @f10(<2 x i64> %val) {
107 ; CHECK: vgbm [[REG:%v[0-9]+]], 3855
108 ; CHECK: vn %v24, %v24, [[REG]]
110 %trunc = trunc <2 x i64> %val to <2 x i32>
111 %ret = zext <2 x i32> %trunc to <2 x i64>