1; Test general vector permute of a v16i8.
2;
3; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | \
4; RUN:   FileCheck -check-prefix=CHECK-CODE %s
5; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | \
6; RUN:   FileCheck -check-prefix=CHECK-VECTOR %s
7
8define <16 x i8> @f1(<16 x i8> %val1, <16 x i8> %val2) {
9; CHECK-CODE-LABEL: f1:
10; CHECK-CODE: larl [[REG:%r[0-5]]],
11; CHECK-CODE: vl [[MASK:%v[0-9]+]], 0([[REG]])
12; CHECK-CODE: vperm %v24, %v24, %v26, [[MASK]]
13; CHECK-CODE: br %r14
14;
15; CHECK-VECTOR: .byte 1
16; CHECK-VECTOR-NEXT: .byte 19
17; CHECK-VECTOR-NEXT: .byte 6
18; CHECK-VECTOR-NEXT: .byte 5
19; CHECK-VECTOR-NEXT: .byte 20
20; CHECK-VECTOR-NEXT: .byte 22
21; CHECK-VECTOR-NEXT: .byte 1
22; CHECK-VECTOR-NEXT: .byte 1
23; CHECK-VECTOR-NEXT: .byte 25
24; CHECK-VECTOR-NEXT: .byte 29
25; CHECK-VECTOR-NEXT: .byte 11
26; Any byte would be OK here
27; CHECK-VECTOR-NEXT: .space 1
28; CHECK-VECTOR-NEXT: .byte 31
29; CHECK-VECTOR-NEXT: .byte 4
30; CHECK-VECTOR-NEXT: .byte 15
31; CHECK-VECTOR-NEXT: .byte 19
32  %ret = shufflevector <16 x i8> %val1, <16 x i8> %val2,
33                       <16 x i32> <i32 1, i32 19, i32 6, i32 5,
34                                   i32 20, i32 22, i32 1, i32 1,
35                                   i32 25, i32 29, i32 11, i32 undef,
36                                   i32 31, i32 4, i32 15, i32 19>
37  ret <16 x i8> %ret
38}
39