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