1 ; Test vector replicates that use VECTOR GENERATE MASK, v4f32 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 float> @f1() {
9 ; CHECK: vgmf %v24, 16, 16
11 ret <4 x float> <float 0x3790000000000000, float 0x3790000000000000,
12 float 0x3790000000000000, float 0x3790000000000000>
15 ; Test a word-granularity replicate that has the lower 17 bits set.
16 define <4 x float> @f2() {
18 ; CHECK: vgmf %v24, 15, 31
20 ret <4 x float> <float 0x37affff000000000, float 0x37affff000000000,
21 float 0x37affff000000000, float 0x37affff000000000>
24 ; Test a word-granularity replicate that has the upper 15 bits set.
25 define <4 x float> @f3() {
27 ; CHECK: vgmf %v24, 0, 14
29 ret <4 x float> <float 0xffffc00000000000, float 0xffffc00000000000,
30 float 0xffffc00000000000, float 0xffffc00000000000>
33 ; Test a word-granularity replicate that has middle bits set.
34 define <4 x float> @f4() {
36 ; CHECK: vgmf %v24, 2, 8
38 ret <4 x float> <float 0x3ff0000000000000, float 0x3ff0000000000000,
39 float 0x3ff0000000000000, float 0x3ff0000000000000>
42 ; Test a word-granularity replicate with a wrap-around mask.
43 define <4 x float> @f5() {
45 ; CHECK: vgmf %v24, 9, 1
47 ret <4 x float> <float 0xc00fffffe0000000, float 0xc00fffffe0000000,
48 float 0xc00fffffe0000000, float 0xc00fffffe0000000>
51 ; Test a doubleword-granularity replicate with the lowest value that cannot
53 define <4 x float> @f6() {
55 ; CHECK: vgmg %v24, 48, 48
57 ret <4 x float> <float 0.0, float 0x3790000000000000,
58 float 0.0, float 0x3790000000000000>
61 ; Test a doubleword-granularity replicate that has the lower 22 bits set.
62 define <4 x float> @f7() {
64 ; CHECK: vgmg %v24, 42, 63
66 ret <4 x float> <float 0.0, float 0x37ffffff80000000,
67 float 0.0, float 0x37ffffff80000000>
70 ; Test a doubleword-granularity replicate that has the upper 45 bits set.
71 define <4 x float> @f8() {
73 ; CHECK: vgmg %v24, 0, 44
75 ret <4 x float> <float 0xffffffffe0000000, float 0xffff000000000000,
76 float 0xffffffffe0000000, float 0xffff000000000000>
79 ; Test a doubleword-granularity replicate that has middle bits set.
80 define <4 x float> @f9() {
82 ; CHECK: vgmg %v24, 34, 41
84 ret <4 x float> <float 0.0, float 0x3ff8000000000000,
85 float 0.0, float 0x3ff8000000000000>
88 ; Test a doubleword-granularity replicate with a wrap-around mask.
89 define <4 x float> @f10() {
91 ; CHECK: vgmg %v24, 32, 0
93 ret <4 x float> <float 0x8000000000000000, float 0xffffffffe0000000,
94 float 0x8000000000000000, float 0xffffffffe0000000>