1 ; Test vector byte masks, v8i16 version.
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s
5 ; Test an all-zeros vector.
6 define <8 x i16> @f1() {
10 ret <8 x i16> zeroinitializer
13 ; Test an all-ones vector.
14 define <8 x i16> @f2() {
16 ; CHECK: vgbm %v24, 65535
18 ret <8 x i16> <i16 -1, i16 -1, i16 -1, i16 -1,
19 i16 -1, i16 -1, i16 -1, i16 -1>
22 ; Test a mixed vector (mask 0x8c76).
23 define <8 x i16> @f3() {
25 ; CHECK: vgbm %v24, 35958
27 ret <8 x i16> <i16 65280, i16 0, i16 65535, i16 0,
28 i16 255, i16 65535, i16 255, i16 65280>
31 ; Test that undefs are treated as zero.
32 define <8 x i16> @f4() {
34 ; CHECK: vgbm %v24, 35958
36 ret <8 x i16> <i16 65280, i16 undef, i16 65535, i16 undef,
37 i16 255, i16 65535, i16 255, i16 65280>
40 ; Test that we don't use VGBM if one of the bytes is not 0 or 0xff.
41 define <8 x i16> @f5() {
45 ret <8 x i16> <i16 65280, i16 0, i16 65535, i16 0,
46 i16 255, i16 65535, i16 256, i16 65280>
49 ; Test an all-zeros v2i16 that gets promoted to v8i16.
50 define <2 x i16> @f6() {
54 ret <2 x i16> zeroinitializer
57 ; Test a mixed v2i16 that gets promoted to v8i16 (mask 0xc000).
58 define <2 x i16> @f7() {
60 ; CHECK: vgbm %v24, 49152
62 ret <2 x i16> <i16 65535, i16 0>
65 ; Test an all-zeros v4i16 that gets promoted to v8i16.
66 define <4 x i16> @f8() {
70 ret <4 x i16> zeroinitializer
73 ; Test a mixed v4i16 that gets promoted to v8i16 (mask 0x7200).
74 define <4 x i16> @f9() {
76 ; CHECK: vgbm %v24, 29184
78 ret <4 x i16> <i16 255, i16 65535, i16 0, i16 65280>