1; Test general vector permute of a v4i32.
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 <4 x i32> @f1(<4 x i32> %val1, <4 x i32> %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, %v26, %v24, [[MASK]]
13; CHECK-CODE: br %r14
14;
15; CHECK-VECTOR: .byte 4
16; CHECK-VECTOR-NEXT: .byte 5
17; CHECK-VECTOR-NEXT: .byte 6
18; CHECK-VECTOR-NEXT: .byte 7
19; CHECK-VECTOR-NEXT: .byte 20
20; CHECK-VECTOR-NEXT: .byte 21
21; CHECK-VECTOR-NEXT: .byte 22
22; CHECK-VECTOR-NEXT: .byte 23
23; Any 4 bytes would be OK here
24; CHECK-VECTOR-NEXT: .space 1
25; CHECK-VECTOR-NEXT: .space 1
26; CHECK-VECTOR-NEXT: .space 1
27; CHECK-VECTOR-NEXT: .space 1
28; CHECK-VECTOR-NEXT: .byte 12
29; CHECK-VECTOR-NEXT: .byte 13
30; CHECK-VECTOR-NEXT: .byte 14
31; CHECK-VECTOR-NEXT: .byte 15
32  %ret = shufflevector <4 x i32> %val1, <4 x i32> %val2,
33                       <4 x i32> <i32 5, i32 1, i32 undef, i32 7>
34  ret <4 x i32> %ret
35}
36