1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=s390x-ibm-linux | FileCheck %s
4 %struct.anon.0.1.2.3.8.77 = type { [3 x i8], i8, [3 x i8] }
6 @e = external dso_local local_unnamed_addr global i32, align 4
7 @f = external dso_local local_unnamed_addr global %struct.anon.0.1.2.3.8.77, align 4
8 @g = external dso_local local_unnamed_addr global i8, align 2
10 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
11 declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0
13 define dso_local void @m() local_unnamed_addr #1 {
15 ; CHECK: # %bb.0: # %entry
16 ; CHECK-NEXT: aghi %r15, -168
17 ; CHECK-NEXT: lhrl %r1, f+4
18 ; CHECK-NEXT: sll %r1, 8
19 ; CHECK-NEXT: larl %r2, f
20 ; CHECK-NEXT: ic %r1, 6(%r2)
21 ; CHECK-NEXT: larl %r2, e
22 ; CHECK-NEXT: lb %r0, 3(%r2)
23 ; CHECK-NEXT: vlvgf %v1, %r1, 0
24 ; CHECK-NEXT: vlvgf %v1, %r1, 1
25 ; CHECK-NEXT: larl %r2, .LCPI0_0
26 ; CHECK-NEXT: vl %v2, 0(%r2), 3
27 ; CHECK-NEXT: vlvgf %v1, %r1, 3
28 ; CHECK-NEXT: vlvgf %v3, %r1, 3
29 ; CHECK-NEXT: vlvgf %v0, %r1, 1
30 ; CHECK-NEXT: vperm %v4, %v1, %v0, %v2
31 ; CHECK-NEXT: vlvgf %v0, %r1, 3
32 ; CHECK-NEXT: nilh %r1, 255
33 ; CHECK-NEXT: chi %r1, 128
35 ; CHECK-NEXT: risbg %r1, %r1, 63, 191, 36
36 ; CHECK-NEXT: vperm %v0, %v3, %v0, %v2
37 ; CHECK-NEXT: larl %r2, .LCPI0_1
38 ; CHECK-NEXT: vl %v5, 0(%r2), 3
39 ; CHECK-NEXT: vgbm %v6, 30583
40 ; CHECK-NEXT: vn %v0, %v0, %v6
41 ; CHECK-NEXT: vn %v4, %v4, %v6
42 ; CHECK-NEXT: vperm %v1, %v1, %v1, %v5
43 ; CHECK-NEXT: vn %v5, %v1, %v6
44 ; CHECK-NEXT: vperm %v1, %v0, %v3, %v2
45 ; CHECK-NEXT: vn %v2, %v1, %v6
46 ; CHECK-NEXT: vrepif %v1, 127
47 ; CHECK-NEXT: vchlf %v3, %v5, %v1
48 ; CHECK-NEXT: vlgvf %r3, %v3, 1
49 ; CHECK-NEXT: vlgvf %r2, %v3, 0
50 ; CHECK-NEXT: risbg %r2, %r2, 48, 176, 15
51 ; CHECK-NEXT: rosbg %r2, %r3, 49, 49, 14
52 ; CHECK-NEXT: vlgvf %r3, %v3, 2
53 ; CHECK-NEXT: rosbg %r2, %r3, 50, 50, 13
54 ; CHECK-NEXT: vlgvf %r3, %v3, 3
55 ; CHECK-NEXT: rosbg %r2, %r3, 51, 51, 12
56 ; CHECK-NEXT: vchlf %v3, %v4, %v1
57 ; CHECK-NEXT: vlgvf %r3, %v3, 0
58 ; CHECK-NEXT: rosbg %r2, %r3, 52, 52, 11
59 ; CHECK-NEXT: vlgvf %r3, %v3, 1
60 ; CHECK-NEXT: rosbg %r2, %r3, 53, 53, 10
61 ; CHECK-NEXT: vlgvf %r3, %v3, 2
62 ; CHECK-NEXT: rosbg %r2, %r3, 54, 54, 9
63 ; CHECK-NEXT: vlgvf %r3, %v3, 3
64 ; CHECK-NEXT: rosbg %r2, %r3, 55, 55, 8
65 ; CHECK-NEXT: vchlf %v2, %v2, %v1
66 ; CHECK-NEXT: vlgvf %r3, %v2, 0
67 ; CHECK-NEXT: rosbg %r2, %r3, 56, 56, 7
68 ; CHECK-NEXT: vlgvf %r3, %v2, 1
69 ; CHECK-NEXT: rosbg %r2, %r3, 57, 57, 6
70 ; CHECK-NEXT: vlgvf %r3, %v2, 2
71 ; CHECK-NEXT: rosbg %r2, %r3, 58, 58, 5
72 ; CHECK-NEXT: vlgvf %r3, %v2, 3
73 ; CHECK-NEXT: rosbg %r2, %r3, 59, 59, 4
74 ; CHECK-NEXT: vchlf %v0, %v0, %v1
75 ; CHECK-NEXT: vlgvf %r3, %v0, 0
76 ; CHECK-NEXT: rosbg %r2, %r3, 60, 60, 3
77 ; CHECK-NEXT: vlgvf %r3, %v0, 1
78 ; CHECK-NEXT: rosbg %r2, %r3, 61, 61, 2
79 ; CHECK-NEXT: vlgvf %r3, %v0, 2
80 ; CHECK-NEXT: rosbg %r2, %r3, 62, 62, 1
81 ; CHECK-NEXT: vlgvf %r3, %v0, 3
82 ; CHECK-NEXT: rosbg %r2, %r3, 63, 63, 0
83 ; CHECK-NEXT: vlgvb %r4, %v0, 1
84 ; CHECK-NEXT: vlgvb %r3, %v0, 0
85 ; CHECK-NEXT: risbg %r3, %r3, 48, 176, 15
86 ; CHECK-NEXT: rosbg %r3, %r4, 49, 49, 14
87 ; CHECK-NEXT: vlgvb %r4, %v0, 2
88 ; CHECK-NEXT: rosbg %r3, %r4, 50, 50, 13
89 ; CHECK-NEXT: vlgvb %r4, %v0, 3
90 ; CHECK-NEXT: rosbg %r3, %r4, 51, 51, 12
91 ; CHECK-NEXT: vlgvb %r4, %v0, 4
92 ; CHECK-NEXT: rosbg %r3, %r4, 52, 52, 11
93 ; CHECK-NEXT: vlgvb %r4, %v0, 5
94 ; CHECK-NEXT: rosbg %r3, %r4, 53, 53, 10
95 ; CHECK-NEXT: vlgvb %r4, %v0, 6
96 ; CHECK-NEXT: rosbg %r3, %r4, 54, 54, 9
97 ; CHECK-NEXT: vlgvb %r4, %v0, 7
98 ; CHECK-NEXT: rosbg %r3, %r4, 55, 55, 8
99 ; CHECK-NEXT: vlgvb %r4, %v0, 8
100 ; CHECK-NEXT: rosbg %r3, %r4, 56, 56, 7
101 ; CHECK-NEXT: vlgvb %r4, %v0, 9
102 ; CHECK-NEXT: rosbg %r3, %r4, 57, 57, 6
103 ; CHECK-NEXT: vlgvb %r4, %v0, 10
104 ; CHECK-NEXT: rosbg %r3, %r4, 58, 58, 5
105 ; CHECK-NEXT: vlgvb %r4, %v0, 11
106 ; CHECK-NEXT: rosbg %r3, %r4, 59, 59, 4
107 ; CHECK-NEXT: vlgvb %r4, %v0, 12
108 ; CHECK-NEXT: rosbg %r3, %r4, 60, 60, 3
109 ; CHECK-NEXT: vlgvb %r4, %v0, 13
110 ; CHECK-NEXT: rosbg %r3, %r4, 61, 61, 2
111 ; CHECK-NEXT: vlgvb %r4, %v0, 14
112 ; CHECK-NEXT: rosbg %r3, %r4, 62, 62, 1
113 ; CHECK-NEXT: vlgvb %r4, %v0, 15
114 ; CHECK-NEXT: rosbg %r3, %r4, 63, 63, 0
115 ; CHECK-NEXT: xilf %r3, 4294967295
116 ; CHECK-NEXT: or %r3, %r2
117 ; CHECK-NEXT: tmll %r3, 65535
118 ; CHECK-NEXT: ipm %r2
119 ; CHECK-NEXT: afi %r2, -268435456
120 ; CHECK-NEXT: srl %r2, 31
121 ; CHECK-NEXT: nr %r2, %r1
122 ; CHECK-NEXT: nr %r2, %r0
123 ; CHECK-NEXT: larl %r1, g
124 ; CHECK-NEXT: stc %r2, 0(%r1)
125 ; CHECK-NEXT: aghi %r15, 168
126 ; CHECK-NEXT: br %r14
128 %n = alloca i32, align 4
129 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #2
130 %e.promoted9.i = load i32, ptr @e, align 4
131 %bf.load.i = load i24, ptr getelementptr inbounds (%struct.anon.0.1.2.3.8.77, ptr @f, i64 0, i32 2), align 4
132 %tobool.not.1.i = icmp ult i24 %bf.load.i, 128
133 %bf.load.2.i = load i24, ptr getelementptr inbounds (%struct.anon.0.1.2.3.8.77, ptr @f, i64 0, i32 2), align 4
134 %bf.load.2.i.fr = freeze i24 %bf.load.2.i
135 %tobool.not.2.i = icmp ult i24 %bf.load.2.i.fr, 128
136 %bf.load.427.i = load i24, ptr getelementptr inbounds (%struct.anon.0.1.2.3.8.77, ptr @f, i64 0, i32 2), align 4
137 %bf.load.3.5.i = load i24, ptr getelementptr inbounds (%struct.anon.0.1.2.3.8.77, ptr @f, i64 0, i32 2), align 4
138 %bf.load.2.6.i = load i24, ptr getelementptr inbounds (%struct.anon.0.1.2.3.8.77, ptr @f, i64 0, i32 2), align 4
139 %0 = insertelement <16 x i24> poison, i24 %bf.load.2.6.i, i64 0
140 %1 = insertelement <16 x i24> %0, i24 %bf.load.2.6.i, i64 1
141 %2 = insertelement <16 x i24> %1, i24 %bf.load.3.5.i, i64 3
142 %3 = insertelement <16 x i24> %2, i24 %bf.load.3.5.i, i64 5
143 %4 = insertelement <16 x i24> %3, i24 poison, i64 7
144 %5 = insertelement <16 x i24> %4, i24 poison, i64 9
145 %6 = insertelement <16 x i24> %5, i24 %bf.load.427.i, i64 11
146 %7 = insertelement <16 x i24> %6, i24 %bf.load.427.i, i64 13
147 %8 = insertelement <16 x i24> %7, i24 %bf.load.2.i.fr, i64 15
148 %9 = shufflevector <16 x i24> %8, <16 x i24> poison, <16 x i32> <i32 0, i32 1, i32 0, i32 3, i32 3, i32 5, i32 5, i32 7, i32 7, i32 9, i32 9, i32 11, i32 11, i32 13, i32 13, i32 15>
149 %.fr = freeze <16 x i24> %9
150 %10 = icmp ugt <16 x i24> %.fr, <i24 127, i24 127, i24 127, i24 127, i24 127, i24 127, i24 127, i24 127, i24 127, i24 127, i24 127, i24 127, i24 127, i24 127, i24 127, i24 127>
151 %11 = bitcast <16 x i1> %10 to i16
152 %12 = icmp eq i16 %11, 0
153 %13 = freeze <16 x i1> poison
154 %14 = bitcast <16 x i1> %13 to i16
155 %15 = icmp eq i16 %14, -1
156 %op.rdx = and i1 %12, %15
157 %op.rdx1 = and i1 %op.rdx, %tobool.not.2.i
158 %op.rdx2 = select i1 %op.rdx1, i1 %tobool.not.1.i, i1 false
159 %16 = trunc i32 %e.promoted9.i to i8
161 %18 = select i1 false, i8 0, i8 %17
162 %conv14.i = select i1 %op.rdx2, i8 %18, i8 0
163 store i8 %conv14.i, ptr @g, align 2
167 attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
168 attributes #1 = { nounwind "target-features"="+transactional-execution,+vector" }
169 attributes #2 = { nounwind }