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