1 ; Test vector replicates, v2i64 version.
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s
5 ; Test a byte-granularity replicate with the lowest useful value.
6 define <2 x i64> @f1() {
8 ; CHECK: vrepib %v24, 1
10 ret <2 x i64> <i64 72340172838076673, i64 72340172838076673>
13 ; Test a byte-granularity replicate with an arbitrary value.
14 define <2 x i64> @f2() {
16 ; CHECK: vrepib %v24, -55
18 ret <2 x i64> <i64 -3906369333256140343, i64 -3906369333256140343>
21 ; Test a byte-granularity replicate with the highest useful value.
22 define <2 x i64> @f3() {
24 ; CHECK: vrepib %v24, -2
26 ret <2 x i64> <i64 -72340172838076674, i64 -72340172838076674>
29 ; Test a halfword-granularity replicate with the lowest useful value.
30 define <2 x i64> @f4() {
32 ; CHECK: vrepih %v24, 1
34 ret <2 x i64> <i64 281479271743489, i64 281479271743489>
37 ; Test a halfword-granularity replicate with an arbitrary value.
38 define <2 x i64> @f5() {
40 ; CHECK: vrepih %v24, 25650
42 ret <2 x i64> <i64 7219943320220492850, i64 7219943320220492850>
45 ; Test a halfword-granularity replicate with the highest useful value.
46 define <2 x i64> @f6() {
48 ; CHECK: vrepih %v24, -2
50 ret <2 x i64> <i64 -281479271743490, i64 -281479271743490>
53 ; Test a word-granularity replicate with the lowest useful positive value.
54 define <2 x i64> @f7() {
56 ; CHECK: vrepif %v24, 1
58 ret <2 x i64> <i64 4294967297, i64 4294967297>
61 ; Test a word-granularity replicate with the highest in-range value.
62 define <2 x i64> @f8() {
64 ; CHECK: vrepif %v24, 32767
66 ret <2 x i64> <i64 140733193420799, i64 140733193420799>
69 ; Test a word-granularity replicate with the next highest value.
70 ; This cannot use VREPIF.
71 define <2 x i64> @f9() {
75 ret <2 x i64> <i64 140737488388096, i64 140737488388096>
78 ; Test a word-granularity replicate with the lowest in-range value.
79 define <2 x i64> @f10() {
81 ; CHECK: vrepif %v24, -32768
83 ret <2 x i64> <i64 -140733193420800, i64 -140733193420800>
86 ; Test a word-granularity replicate with the next lowest value.
87 ; This cannot use VREPIF.
88 define <2 x i64> @f11() {
92 ret <2 x i64> <i64 -140737488388097, i64 -140737488388097>
95 ; Test a word-granularity replicate with the highest useful negative value.
96 define <2 x i64> @f12() {
98 ; CHECK: vrepif %v24, -2
100 ret <2 x i64> <i64 -4294967298, i64 -4294967298>
103 ; Test a doubleword-granularity replicate with the lowest useful positive
105 define <2 x i64> @f13() {
107 ; CHECK: vrepig %v24, 1
109 ret <2 x i64> <i64 1, i64 1>
112 ; Test a doubleword-granularity replicate with the highest in-range value.
113 define <2 x i64> @f14() {
115 ; CHECK: vrepig %v24, 32767
117 ret <2 x i64> <i64 32767, i64 32767>
120 ; Test a doubleword-granularity replicate with the next highest value.
121 ; This cannot use VREPIG.
122 define <2 x i64> @f15() {
126 ret <2 x i64> <i64 32768, i64 32768>
129 ; Test a doubleword-granularity replicate with the lowest in-range value.
130 define <2 x i64> @f16() {
132 ; CHECK: vrepig %v24, -32768
134 ret <2 x i64> <i64 -32768, i64 -32768>
137 ; Test a doubleword-granularity replicate with the next lowest value.
138 ; This cannot use VREPIG.
139 define <2 x i64> @f17() {
143 ret <2 x i64> <i64 -32769, i64 -32769>
146 ; Test a doubleword-granularity replicate with the highest useful negative
148 define <2 x i64> @f18() {
150 ; CHECK: vrepig %v24, -2
152 ret <2 x i64> <i64 -2, i64 -2>
155 ; Repeat f14 with undefs optimistically treated as 32767.
156 define <2 x i64> @f19() {
158 ; CHECK: vrepig %v24, 32767
160 ret <2 x i64> <i64 undef, i64 32767>
163 ; Repeat f18 with undefs optimistically treated as -2.
164 define <2 x i64> @f20() {
166 ; CHECK: vrepig %v24, -2
168 ret <2 x i64> <i64 undef, i64 -2>