1 ; Test vector replicates that use VECTOR GENERATE MASK, v4i32 version.
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s
5 ; Test a word-granularity replicate with the lowest value that cannot use
7 define <4 x i32> @f1() {
9 ; CHECK: vgmf %v24, 16, 16
11 ret <4 x i32> <i32 32768, i32 32768, i32 32768, i32 32768>
14 ; Test a word-granularity replicate that has the lower 17 bits set.
15 define <4 x i32> @f2() {
17 ; CHECK: vgmf %v24, 15, 31
19 ret <4 x i32> <i32 131071, i32 131071, i32 131071, i32 131071>
22 ; Test a word-granularity replicate that has the upper 15 bits set.
23 define <4 x i32> @f3() {
25 ; CHECK: vgmf %v24, 0, 14
27 ret <4 x i32> <i32 -131072, i32 -131072, i32 -131072, i32 -131072>
30 ; Test a word-granularity replicate that has middle bits set.
31 define <4 x i32> @f4() {
33 ; CHECK: vgmf %v24, 12, 17
35 ret <4 x i32> <i32 1032192, i32 1032192, i32 1032192, i32 1032192>
38 ; Test a word-granularity replicate with a wrap-around mask.
39 define <4 x i32> @f5() {
41 ; CHECK: vgmf %v24, 17, 15
43 ret <4 x i32> <i32 -32769, i32 -32769, i32 -32769, i32 -32769>
46 ; Test a doubleword-granularity replicate with the lowest value that cannot
48 define <4 x i32> @f6() {
50 ; CHECK: vgmg %v24, 48, 48
52 ret <4 x i32> <i32 0, i32 32768, i32 0, i32 32768>
55 ; Test a doubleword-granularity replicate that has the lower 22 bits set.
56 define <4 x i32> @f7() {
58 ; CHECK: vgmg %v24, 42, 63
60 ret <4 x i32> <i32 0, i32 4194303, i32 0, i32 4194303>
63 ; Test a doubleword-granularity replicate that has the upper 45 bits set.
64 define <4 x i32> @f8() {
66 ; CHECK: vgmg %v24, 0, 44
68 ret <4 x i32> <i32 -1, i32 -524288, i32 -1, i32 -524288>
71 ; Test a doubleword-granularity replicate that has middle bits set.
72 define <4 x i32> @f9() {
74 ; CHECK: vgmg %v24, 31, 42
76 ret <4 x i32> <i32 1, i32 -2097152, i32 1, i32 -2097152>
79 ; Test a doubleword-granularity replicate with a wrap-around mask.
80 define <4 x i32> @f10() {
82 ; CHECK: vgmg %v24, 18, 0
84 ret <4 x i32> <i32 -2147467265, i32 -1, i32 -2147467265, i32 -1>