1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN:llc %s -verify-machineinstrs -mtriple=aarch64-unknown-unknown -run-pass=legalizer -global-isel-abort=1 -o - | FileCheck %s
7 tracksRegLiveness: true
15 ; CHECK-LABEL: name: smin_s32
16 ; CHECK: liveins: $w0, $w1
17 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
18 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
19 ; CHECK: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[COPY]](s32), [[COPY1]]
20 ; CHECK: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP]](s32)
21 ; CHECK: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[TRUNC]](s1), [[COPY]], [[COPY1]]
22 ; CHECK: $w0 = COPY [[SELECT]](s32)
23 ; CHECK: RET_ReallyLR implicit $w0
26 %2:_(s32) = G_SMIN %0, %1
28 RET_ReallyLR implicit $w0
34 tracksRegLiveness: true
42 ; CHECK-LABEL: name: smin_s64
43 ; CHECK: liveins: $x0, $x1
44 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
45 ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1
46 ; CHECK: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[COPY]](s64), [[COPY1]]
47 ; CHECK: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP]](s32)
48 ; CHECK: [[SELECT:%[0-9]+]]:_(s64) = G_SELECT [[TRUNC]](s1), [[COPY]], [[COPY1]]
49 ; CHECK: $x0 = COPY [[SELECT]](s64)
50 ; CHECK: RET_ReallyLR implicit $x0
53 %2:_(s64) = G_SMIN %0, %1
55 RET_ReallyLR implicit $x0
61 tracksRegLiveness: true
69 ; CHECK-LABEL: name: smax_s32
70 ; CHECK: liveins: $w0, $w1
71 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
72 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
73 ; CHECK: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sgt), [[COPY]](s32), [[COPY1]]
74 ; CHECK: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP]](s32)
75 ; CHECK: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[TRUNC]](s1), [[COPY]], [[COPY1]]
76 ; CHECK: $w0 = COPY [[SELECT]](s32)
77 ; CHECK: RET_ReallyLR implicit $w0
80 %2:_(s32) = G_SMAX %0, %1
82 RET_ReallyLR implicit $w0
88 tracksRegLiveness: true
96 ; CHECK-LABEL: name: smax_s64
97 ; CHECK: liveins: $x0, $x1
98 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
99 ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1
100 ; CHECK: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sgt), [[COPY]](s64), [[COPY1]]
101 ; CHECK: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP]](s32)
102 ; CHECK: [[SELECT:%[0-9]+]]:_(s64) = G_SELECT [[TRUNC]](s1), [[COPY]], [[COPY1]]
103 ; CHECK: $x0 = COPY [[SELECT]](s64)
104 ; CHECK: RET_ReallyLR implicit $x0
107 %2:_(s64) = G_SMAX %0, %1
109 RET_ReallyLR implicit $x0
117 tracksRegLiveness: true
125 ; CHECK-LABEL: name: umin_s32
126 ; CHECK: liveins: $w0, $w1
127 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
128 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
129 ; CHECK: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[COPY]](s32), [[COPY1]]
130 ; CHECK: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP]](s32)
131 ; CHECK: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[TRUNC]](s1), [[COPY]], [[COPY1]]
132 ; CHECK: $w0 = COPY [[SELECT]](s32)
133 ; CHECK: RET_ReallyLR implicit $w0
136 %2:_(s32) = G_UMIN %0, %1
138 RET_ReallyLR implicit $w0
144 tracksRegLiveness: true
152 ; CHECK-LABEL: name: umin_s64
153 ; CHECK: liveins: $x0, $x1
154 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
155 ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1
156 ; CHECK: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[COPY]](s64), [[COPY1]]
157 ; CHECK: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP]](s32)
158 ; CHECK: [[SELECT:%[0-9]+]]:_(s64) = G_SELECT [[TRUNC]](s1), [[COPY]], [[COPY1]]
159 ; CHECK: $x0 = COPY [[SELECT]](s64)
160 ; CHECK: RET_ReallyLR implicit $x0
163 %2:_(s64) = G_UMIN %0, %1
165 RET_ReallyLR implicit $x0
171 tracksRegLiveness: true
179 ; CHECK-LABEL: name: umax_s32
180 ; CHECK: liveins: $w0, $w1
181 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
182 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
183 ; CHECK: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ugt), [[COPY]](s32), [[COPY1]]
184 ; CHECK: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP]](s32)
185 ; CHECK: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[TRUNC]](s1), [[COPY]], [[COPY1]]
186 ; CHECK: $w0 = COPY [[SELECT]](s32)
187 ; CHECK: RET_ReallyLR implicit $w0
190 %2:_(s32) = G_UMAX %0, %1
192 RET_ReallyLR implicit $w0
198 tracksRegLiveness: true
206 ; CHECK-LABEL: name: umax_s64
207 ; CHECK: liveins: $x0, $x1
208 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
209 ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1
210 ; CHECK: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ugt), [[COPY]](s64), [[COPY1]]
211 ; CHECK: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP]](s32)
212 ; CHECK: [[SELECT:%[0-9]+]]:_(s64) = G_SELECT [[TRUNC]](s1), [[COPY]], [[COPY1]]
213 ; CHECK: $x0 = COPY [[SELECT]](s64)
214 ; CHECK: RET_ReallyLR implicit $x0
217 %2:_(s64) = G_UMAX %0, %1
219 RET_ReallyLR implicit $x0