• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; Test v16i8 maximum.
2;
3; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s
4
5; Test with slt.
6define <16 x i8> @f1(<16 x i8> %val1, <16 x i8> %val2) {
7; CHECK-LABEL: f1:
8; CHECK: vmxb %v24, {{%v24, %v26|%v26, %v24}}
9; CHECK: br %r14
10  %cmp = icmp slt <16 x i8> %val1, %val2
11  %ret = select <16 x i1> %cmp, <16 x i8> %val2, <16 x i8> %val1
12  ret <16 x i8> %ret
13}
14
15; Test with sle.
16define <16 x i8> @f2(<16 x i8> %val1, <16 x i8> %val2) {
17; CHECK-LABEL: f2:
18; CHECK: vmxb %v24, {{%v24, %v26|%v26, %v24}}
19; CHECK: br %r14
20  %cmp = icmp sle <16 x i8> %val1, %val2
21  %ret = select <16 x i1> %cmp, <16 x i8> %val2, <16 x i8> %val1
22  ret <16 x i8> %ret
23}
24
25; Test with sgt.
26define <16 x i8> @f3(<16 x i8> %val1, <16 x i8> %val2) {
27; CHECK-LABEL: f3:
28; CHECK: vmxb %v24, {{%v24, %v26|%v26, %v24}}
29; CHECK: br %r14
30  %cmp = icmp sgt <16 x i8> %val1, %val2
31  %ret = select <16 x i1> %cmp, <16 x i8> %val1, <16 x i8> %val2
32  ret <16 x i8> %ret
33}
34
35; Test with sge.
36define <16 x i8> @f4(<16 x i8> %val1, <16 x i8> %val2) {
37; CHECK-LABEL: f4:
38; CHECK: vmxb %v24, {{%v24, %v26|%v26, %v24}}
39; CHECK: br %r14
40  %cmp = icmp sge <16 x i8> %val1, %val2
41  %ret = select <16 x i1> %cmp, <16 x i8> %val1, <16 x i8> %val2
42  ret <16 x i8> %ret
43}
44
45; Test with ult.
46define <16 x i8> @f5(<16 x i8> %val1, <16 x i8> %val2) {
47; CHECK-LABEL: f5:
48; CHECK: vmxlb %v24, {{%v24, %v26|%v26, %v24}}
49; CHECK: br %r14
50  %cmp = icmp ult <16 x i8> %val1, %val2
51  %ret = select <16 x i1> %cmp, <16 x i8> %val2, <16 x i8> %val1
52  ret <16 x i8> %ret
53}
54
55; Test with ule.
56define <16 x i8> @f6(<16 x i8> %val1, <16 x i8> %val2) {
57; CHECK-LABEL: f6:
58; CHECK: vmxlb %v24, {{%v24, %v26|%v26, %v24}}
59; CHECK: br %r14
60  %cmp = icmp ule <16 x i8> %val1, %val2
61  %ret = select <16 x i1> %cmp, <16 x i8> %val2, <16 x i8> %val1
62  ret <16 x i8> %ret
63}
64
65; Test with ugt.
66define <16 x i8> @f7(<16 x i8> %val1, <16 x i8> %val2) {
67; CHECK-LABEL: f7:
68; CHECK: vmxlb %v24, {{%v24, %v26|%v26, %v24}}
69; CHECK: br %r14
70  %cmp = icmp ugt <16 x i8> %val1, %val2
71  %ret = select <16 x i1> %cmp, <16 x i8> %val1, <16 x i8> %val2
72  ret <16 x i8> %ret
73}
74
75; Test with uge.
76define <16 x i8> @f8(<16 x i8> %val1, <16 x i8> %val2) {
77; CHECK-LABEL: f8:
78; CHECK: vmxlb %v24, {{%v24, %v26|%v26, %v24}}
79; CHECK: br %r14
80  %cmp = icmp uge <16 x i8> %val1, %val2
81  %ret = select <16 x i1> %cmp, <16 x i8> %val1, <16 x i8> %val2
82  ret <16 x i8> %ret
83}
84