• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; Test general vector permute of a v8i16.
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 <8 x i16> @f1(<8 x i16> %val1, <8 x i16> %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 0
16; CHECK-VECTOR-NEXT: .byte 1
17; CHECK-VECTOR-NEXT: .byte 26
18; CHECK-VECTOR-NEXT: .byte 27
19; Any 2 bytes would be OK here
20; CHECK-VECTOR-NEXT: .space 1
21; CHECK-VECTOR-NEXT: .space 1
22; CHECK-VECTOR-NEXT: .byte 28
23; CHECK-VECTOR-NEXT: .byte 29
24; CHECK-VECTOR-NEXT: .byte 6
25; CHECK-VECTOR-NEXT: .byte 7
26; CHECK-VECTOR-NEXT: .byte 14
27; CHECK-VECTOR-NEXT: .byte 15
28; CHECK-VECTOR-NEXT: .byte 8
29; CHECK-VECTOR-NEXT: .byte 9
30; CHECK-VECTOR-NEXT: .byte 16
31; CHECK-VECTOR-NEXT: .byte 17
32  %ret = shufflevector <8 x i16> %val1, <8 x i16> %val2,
33                       <8 x i32> <i32 8, i32 5, i32 undef, i32 6,
34                                  i32 11, i32 15, i32 12, i32 0>
35  ret <8 x i16> %ret
36}
37