| 1 |
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py |
| 2 |
# RUN: llc -mtriple=riscv32 -run-pass=legalizer %s -o - \ |
| 3 |
# RUN: | FileCheck %s |
| 4 |
|
| 5 |
--- |
| 6 |
name: saddo_i8 |
| 7 |
body: | |
| 8 |
bb.1: |
| 9 |
liveins: $x10, $x11 |
| 10 |
|
| 11 |
; CHECK-LABEL: name: saddo_i8 |
| 12 |
; CHECK: liveins: $x10, $x11 |
| 13 |
; CHECK-NEXT: {{ $}} |
| 14 |
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10 |
| 15 |
; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11 |
| 16 |
; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 24 |
| 17 |
; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32) |
| 18 |
; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32) |
| 19 |
; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C]](s32) |
| 20 |
; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C]](s32) |
| 21 |
; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[ASHR]], [[ASHR1]] |
| 22 |
; CHECK-NEXT: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[ADD]], [[C]](s32) |
| 23 |
; CHECK-NEXT: [[ASHR2:%[0-9]+]]:_(s32) = G_ASHR [[SHL2]], [[C]](s32) |
| 24 |
; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ne), [[ADD]](s32), [[ASHR2]] |
| 25 |
; CHECK-NEXT: $x10 = COPY [[ADD]](s32) |
| 26 |
; CHECK-NEXT: $x11 = COPY [[ICMP]](s32) |
| 27 |
; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11 |
| 28 |
%2:_(s32) = COPY $x10 |
| 29 |
%0:_(s8) = G_TRUNC %2(s32) |
| 30 |
%3:_(s32) = COPY $x11 |
| 31 |
%1:_(s8) = G_TRUNC %3(s32) |
| 32 |
%4:_(s8), %5:_(s1) = G_SADDO %0, %1 |
| 33 |
%6:_(s32) = G_ANYEXT %4(s8) |
| 34 |
%7:_(s32) = G_ANYEXT %5(s1) |
| 35 |
$x10 = COPY %6(s32) |
| 36 |
$x11 = COPY %7(s32) |
| 37 |
PseudoRET implicit $x10, implicit $x11 |
| 38 |
|
| 39 |
... |
| 40 |
--- |
| 41 |
name: saddo_i16 |
| 42 |
body: | |
| 43 |
bb.1: |
| 44 |
liveins: $x10, $x11 |
| 45 |
|
| 46 |
; CHECK-LABEL: name: saddo_i16 |
| 47 |
; CHECK: liveins: $x10, $x11 |
| 48 |
; CHECK-NEXT: {{ $}} |
| 49 |
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10 |
| 50 |
; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11 |
| 51 |
; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| 52 |
; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32) |
| 53 |
; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32) |
| 54 |
; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C]](s32) |
| 55 |
; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C]](s32) |
| 56 |
; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[ASHR]], [[ASHR1]] |
| 57 |
; CHECK-NEXT: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[ADD]], [[C]](s32) |
| 58 |
; CHECK-NEXT: [[ASHR2:%[0-9]+]]:_(s32) = G_ASHR [[SHL2]], [[C]](s32) |
| 59 |
; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ne), [[ADD]](s32), [[ASHR2]] |
| 60 |
; CHECK-NEXT: $x10 = COPY [[ADD]](s32) |
| 61 |
; CHECK-NEXT: $x11 = COPY [[ICMP]](s32) |
| 62 |
; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11 |
| 63 |
%2:_(s32) = COPY $x10 |
| 64 |
%0:_(s16) = G_TRUNC %2(s32) |
| 65 |
%3:_(s32) = COPY $x11 |
| 66 |
%1:_(s16) = G_TRUNC %3(s32) |
| 67 |
%4:_(s16), %5:_(s1) = G_SADDO %0, %1 |
| 68 |
%6:_(s32) = G_ANYEXT %4(s16) |
| 69 |
%7:_(s32) = G_ANYEXT %5(s1) |
| 70 |
$x10 = COPY %6(s32) |
| 71 |
$x11 = COPY %7(s32) |
| 72 |
PseudoRET implicit $x10, implicit $x11 |
| 73 |
|
| 74 |
... |
| 75 |
--- |
| 76 |
name: saddo_i32 |
| 77 |
body: | |
| 78 |
bb.1: |
| 79 |
liveins: $x10, $x11 |
| 80 |
|
| 81 |
; CHECK-LABEL: name: saddo_i32 |
| 82 |
; CHECK: liveins: $x10, $x11 |
| 83 |
; CHECK-NEXT: {{ $}} |
| 84 |
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10 |
| 85 |
; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11 |
| 86 |
; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[COPY]], [[COPY1]] |
| 87 |
; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 |
| 88 |
; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[ADD]](s32), [[COPY]] |
| 89 |
; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[COPY1]](s32), [[C]] |
| 90 |
; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s32) = G_XOR [[ICMP1]], [[ICMP]] |
| 91 |
; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY [[ADD]](s32) |
| 92 |
; CHECK-NEXT: $x10 = COPY [[COPY2]](s32) |
| 93 |
; CHECK-NEXT: $x11 = COPY [[XOR]](s32) |
| 94 |
; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11 |
| 95 |
%0:_(s32) = COPY $x10 |
| 96 |
%1:_(s32) = COPY $x11 |
| 97 |
%2:_(s32), %3:_(s1) = G_SADDO %0, %1 |
| 98 |
%4:_(s32) = G_ANYEXT %3(s1) |
| 99 |
$x10 = COPY %2(s32) |
| 100 |
$x11 = COPY %4(s32) |
| 101 |
PseudoRET implicit $x10, implicit $x11 |
| 102 |
|
| 103 |
... |
| 104 |
--- |
| 105 |
name: saddo_i64 |
| 106 |
body: | |
| 107 |
bb.1: |
| 108 |
liveins: $x10, $x11, $x12, $x13 |
| 109 |
|
| 110 |
; CHECK-LABEL: name: saddo_i64 |
| 111 |
; CHECK: liveins: $x10, $x11, $x12, $x13 |
| 112 |
; CHECK-NEXT: {{ $}} |
| 113 |
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10 |
| 114 |
; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11 |
| 115 |
; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $x12 |
| 116 |
; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $x13 |
| 117 |
; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[COPY]], [[COPY2]] |
| 118 |
; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[ADD]](s32), [[COPY2]] |
| 119 |
; CHECK-NEXT: [[COPY4:%[0-9]+]]:_(s32) = COPY [[ADD]](s32) |
| 120 |
; CHECK-NEXT: [[ADD1:%[0-9]+]]:_(s32) = G_ADD [[COPY1]], [[COPY3]] |
| 121 |
; CHECK-NEXT: [[ADD2:%[0-9]+]]:_(s32) = G_ADD [[ADD1]], [[ICMP]] |
| 122 |
; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 |
| 123 |
; CHECK-NEXT: [[COPY5:%[0-9]+]]:_(s32) = COPY [[ADD2]](s32) |
| 124 |
; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[COPY4]](s32), [[COPY]] |
| 125 |
; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[COPY5]](s32), [[COPY1]] |
| 126 |
; CHECK-NEXT: [[ICMP3:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[COPY5]](s32), [[COPY1]] |
| 127 |
; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP3]](s32), [[ICMP1]], [[ICMP2]] |
| 128 |
; CHECK-NEXT: [[ICMP4:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[COPY2]](s32), [[C]] |
| 129 |
; CHECK-NEXT: [[ICMP5:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[COPY3]](s32), [[C]] |
| 130 |
; CHECK-NEXT: [[ICMP6:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[COPY3]](s32), [[C]] |
| 131 |
; CHECK-NEXT: [[SELECT1:%[0-9]+]]:_(s32) = G_SELECT [[ICMP6]](s32), [[ICMP4]], [[ICMP5]] |
| 132 |
; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s32) = G_XOR [[SELECT1]], [[SELECT]] |
| 133 |
; CHECK-NEXT: $x10 = COPY [[COPY4]](s32) |
| 134 |
; CHECK-NEXT: $x11 = COPY [[COPY5]](s32) |
| 135 |
; CHECK-NEXT: $x12 = COPY [[XOR]](s32) |
| 136 |
; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11, implicit $x12 |
| 137 |
%2:_(s32) = COPY $x10 |
| 138 |
%3:_(s32) = COPY $x11 |
| 139 |
%0:_(s64) = G_MERGE_VALUES %2(s32), %3(s32) |
| 140 |
%4:_(s32) = COPY $x12 |
| 141 |
%5:_(s32) = COPY $x13 |
| 142 |
%1:_(s64) = G_MERGE_VALUES %4(s32), %5(s32) |
| 143 |
%6:_(s64), %7:_(s1) = G_SADDO %0, %1 |
| 144 |
%8:_(s32), %9:_(s32) = G_UNMERGE_VALUES %6(s64) |
| 145 |
%10:_(s32) = G_ANYEXT %7(s1) |
| 146 |
$x10 = COPY %8(s32) |
| 147 |
$x11 = COPY %9(s32) |
| 148 |
$x12 = COPY %10(s32) |
| 149 |
PseudoRET implicit $x10, implicit $x11, implicit $x12 |
| 150 |
|
| 151 |
... |
| 152 |
--- |
| 153 |
name: ssubo_i8 |
| 154 |
body: | |
| 155 |
bb.1: |
| 156 |
liveins: $x10, $x11 |
| 157 |
|
| 158 |
; CHECK-LABEL: name: ssubo_i8 |
| 159 |
; CHECK: liveins: $x10, $x11 |
| 160 |
; CHECK-NEXT: {{ $}} |
| 161 |
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10 |
| 162 |
; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11 |
| 163 |
; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 24 |
| 164 |
; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32) |
| 165 |
; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32) |
| 166 |
; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C]](s32) |
| 167 |
; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C]](s32) |
| 168 |
; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s32) = G_SUB [[ASHR]], [[ASHR1]] |
| 169 |
; CHECK-NEXT: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[SUB]], [[C]](s32) |
| 170 |
; CHECK-NEXT: [[ASHR2:%[0-9]+]]:_(s32) = G_ASHR [[SHL2]], [[C]](s32) |
| 171 |
; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ne), [[SUB]](s32), [[ASHR2]] |
| 172 |
; CHECK-NEXT: $x10 = COPY [[SUB]](s32) |
| 173 |
; CHECK-NEXT: $x11 = COPY [[ICMP]](s32) |
| 174 |
; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11 |
| 175 |
%2:_(s32) = COPY $x10 |
| 176 |
%0:_(s8) = G_TRUNC %2(s32) |
| 177 |
%3:_(s32) = COPY $x11 |
| 178 |
%1:_(s8) = G_TRUNC %3(s32) |
| 179 |
%4:_(s8), %5:_(s1) = G_SSUBO %0, %1 |
| 180 |
%6:_(s32) = G_ANYEXT %4(s8) |
| 181 |
%7:_(s32) = G_ANYEXT %5(s1) |
| 182 |
$x10 = COPY %6(s32) |
| 183 |
$x11 = COPY %7(s32) |
| 184 |
PseudoRET implicit $x10, implicit $x11 |
| 185 |
|
| 186 |
... |
| 187 |
--- |
| 188 |
name: ssubo_i16 |
| 189 |
body: | |
| 190 |
bb.1: |
| 191 |
liveins: $x10, $x11 |
| 192 |
|
| 193 |
; CHECK-LABEL: name: ssubo_i16 |
| 194 |
; CHECK: liveins: $x10, $x11 |
| 195 |
; CHECK-NEXT: {{ $}} |
| 196 |
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10 |
| 197 |
; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11 |
| 198 |
; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 |
| 199 |
; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32) |
| 200 |
; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32) |
| 201 |
; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C]](s32) |
| 202 |
; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C]](s32) |
| 203 |
; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s32) = G_SUB [[ASHR]], [[ASHR1]] |
| 204 |
; CHECK-NEXT: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[SUB]], [[C]](s32) |
| 205 |
; CHECK-NEXT: [[ASHR2:%[0-9]+]]:_(s32) = G_ASHR [[SHL2]], [[C]](s32) |
| 206 |
; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ne), [[SUB]](s32), [[ASHR2]] |
| 207 |
; CHECK-NEXT: $x10 = COPY [[SUB]](s32) |
| 208 |
; CHECK-NEXT: $x11 = COPY [[ICMP]](s32) |
| 209 |
; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11 |
| 210 |
%2:_(s32) = COPY $x10 |
| 211 |
%0:_(s16) = G_TRUNC %2(s32) |
| 212 |
%3:_(s32) = COPY $x11 |
| 213 |
%1:_(s16) = G_TRUNC %3(s32) |
| 214 |
%4:_(s16), %5:_(s1) = G_SSUBO %0, %1 |
| 215 |
%6:_(s32) = G_ANYEXT %4(s16) |
| 216 |
%7:_(s32) = G_ANYEXT %5(s1) |
| 217 |
$x10 = COPY %6(s32) |
| 218 |
$x11 = COPY %7(s32) |
| 219 |
PseudoRET implicit $x10, implicit $x11 |
| 220 |
|
| 221 |
... |
| 222 |
--- |
| 223 |
name: ssubo_i32 |
| 224 |
body: | |
| 225 |
bb.1: |
| 226 |
liveins: $x10, $x11 |
| 227 |
|
| 228 |
; CHECK-LABEL: name: ssubo_i32 |
| 229 |
; CHECK: liveins: $x10, $x11 |
| 230 |
; CHECK-NEXT: {{ $}} |
| 231 |
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10 |
| 232 |
; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11 |
| 233 |
; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s32) = G_SUB [[COPY]], [[COPY1]] |
| 234 |
; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 |
| 235 |
; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[SUB]](s32), [[COPY]] |
| 236 |
; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(sgt), [[COPY1]](s32), [[C]] |
| 237 |
; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s32) = G_XOR [[ICMP1]], [[ICMP]] |
| 238 |
; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY [[SUB]](s32) |
| 239 |
; CHECK-NEXT: $x10 = COPY [[COPY2]](s32) |
| 240 |
; CHECK-NEXT: $x11 = COPY [[XOR]](s32) |
| 241 |
; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11 |
| 242 |
%0:_(s32) = COPY $x10 |
| 243 |
%1:_(s32) = COPY $x11 |
| 244 |
%2:_(s32), %3:_(s1) = G_SSUBO %0, %1 |
| 245 |
%4:_(s32) = G_ANYEXT %3(s1) |
| 246 |
$x10 = COPY %2(s32) |
| 247 |
$x11 = COPY %4(s32) |
| 248 |
PseudoRET implicit $x10, implicit $x11 |
| 249 |
|
| 250 |
... |
| 251 |
--- |
| 252 |
name: ssubo_i64 |
| 253 |
body: | |
| 254 |
bb.1: |
| 255 |
liveins: $x10, $x11, $x12, $x13 |
| 256 |
|
| 257 |
; CHECK-LABEL: name: ssubo_i64 |
| 258 |
; CHECK: liveins: $x10, $x11, $x12, $x13 |
| 259 |
; CHECK-NEXT: {{ $}} |
| 260 |
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10 |
| 261 |
; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11 |
| 262 |
; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $x12 |
| 263 |
; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $x13 |
| 264 |
; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s32) = G_SUB [[COPY]], [[COPY2]] |
| 265 |
; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[COPY]](s32), [[COPY2]] |
| 266 |
; CHECK-NEXT: [[SUB1:%[0-9]+]]:_(s32) = G_SUB [[COPY1]], [[COPY3]] |
| 267 |
; CHECK-NEXT: [[SUB2:%[0-9]+]]:_(s32) = G_SUB [[SUB1]], [[ICMP]] |
| 268 |
; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 |
| 269 |
; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[SUB]](s32), [[COPY]] |
| 270 |
; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[SUB2]](s32), [[COPY1]] |
| 271 |
; CHECK-NEXT: [[ICMP3:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[SUB2]](s32), [[COPY1]] |
| 272 |
; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP3]](s32), [[ICMP1]], [[ICMP2]] |
| 273 |
; CHECK-NEXT: [[ICMP4:%[0-9]+]]:_(s32) = G_ICMP intpred(ugt), [[COPY2]](s32), [[C]] |
| 274 |
; CHECK-NEXT: [[ICMP5:%[0-9]+]]:_(s32) = G_ICMP intpred(sgt), [[COPY3]](s32), [[C]] |
| 275 |
; CHECK-NEXT: [[ICMP6:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[COPY3]](s32), [[C]] |
| 276 |
; CHECK-NEXT: [[SELECT1:%[0-9]+]]:_(s32) = G_SELECT [[ICMP6]](s32), [[ICMP4]], [[ICMP5]] |
| 277 |
; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s32) = G_XOR [[SELECT1]], [[SELECT]] |
| 278 |
; CHECK-NEXT: $x10 = COPY [[SUB]](s32) |
| 279 |
; CHECK-NEXT: $x11 = COPY [[SUB2]](s32) |
| 280 |
; CHECK-NEXT: $x12 = COPY [[XOR]](s32) |
| 281 |
; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11, implicit $x12 |
| 282 |
%2:_(s32) = COPY $x10 |
| 283 |
%3:_(s32) = COPY $x11 |
| 284 |
%0:_(s64) = G_MERGE_VALUES %2(s32), %3(s32) |
| 285 |
%4:_(s32) = COPY $x12 |
| 286 |
%5:_(s32) = COPY $x13 |
| 287 |
%1:_(s64) = G_MERGE_VALUES %4(s32), %5(s32) |
| 288 |
%6:_(s64), %7:_(s1) = G_SSUBO %0, %1 |
| 289 |
%8:_(s32), %9:_(s32) = G_UNMERGE_VALUES %6(s64) |
| 290 |
%10:_(s32) = G_ANYEXT %7(s1) |
| 291 |
$x10 = COPY %8(s32) |
| 292 |
$x11 = COPY %9(s32) |
| 293 |
$x12 = COPY %10(s32) |
| 294 |
PseudoRET implicit $x10, implicit $x11, implicit $x12 |
| 295 |
|
| 296 |
... |
| 297 |
--- |
| 298 |
name: uaddo_i8 |
| 299 |
body: | |
| 300 |
bb.1: |
| 301 |
liveins: $x10, $x11 |
| 302 |
|
| 303 |
; CHECK-LABEL: name: uaddo_i8 |
| 304 |
; CHECK: liveins: $x10, $x11 |
| 305 |
; CHECK-NEXT: {{ $}} |
| 306 |
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10 |
| 307 |
; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11 |
| 308 |
; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[COPY]], [[COPY1]] |
| 309 |
; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255 |
| 310 |
; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[ADD]], [[C]] |
| 311 |
; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]] |
| 312 |
; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[AND]](s32), [[AND1]] |
| 313 |
; CHECK-NEXT: $x10 = COPY [[ADD]](s32) |
| 314 |
; CHECK-NEXT: $x11 = COPY [[ICMP]](s32) |
| 315 |
; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11 |
| 316 |
%2:_(s32) = COPY $x10 |
| 317 |
%0:_(s8) = G_TRUNC %2(s32) |
| 318 |
%3:_(s32) = COPY $x11 |
| 319 |
%1:_(s8) = G_TRUNC %3(s32) |
| 320 |
%4:_(s8), %5:_(s1) = G_UADDO %0, %1 |
| 321 |
%6:_(s32) = G_ANYEXT %4(s8) |
| 322 |
%7:_(s32) = G_ANYEXT %5(s1) |
| 323 |
$x10 = COPY %6(s32) |
| 324 |
$x11 = COPY %7(s32) |
| 325 |
PseudoRET implicit $x10, implicit $x11 |
| 326 |
|
| 327 |
... |
| 328 |
--- |
| 329 |
name: uaddo_i16 |
| 330 |
body: | |
| 331 |
bb.1: |
| 332 |
liveins: $x10, $x11 |
| 333 |
|
| 334 |
; CHECK-LABEL: name: uaddo_i16 |
| 335 |
; CHECK: liveins: $x10, $x11 |
| 336 |
; CHECK-NEXT: {{ $}} |
| 337 |
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10 |
| 338 |
; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11 |
| 339 |
; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[COPY]], [[COPY1]] |
| 340 |
; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535 |
| 341 |
; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[ADD]], [[C]] |
| 342 |
; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]] |
| 343 |
; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[AND]](s32), [[AND1]] |
| 344 |
; CHECK-NEXT: $x10 = COPY [[ADD]](s32) |
| 345 |
; CHECK-NEXT: $x11 = COPY [[ICMP]](s32) |
| 346 |
; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11 |
| 347 |
%2:_(s32) = COPY $x10 |
| 348 |
%0:_(s16) = G_TRUNC %2(s32) |
| 349 |
%3:_(s32) = COPY $x11 |
| 350 |
%1:_(s16) = G_TRUNC %3(s32) |
| 351 |
%4:_(s16), %5:_(s1) = G_UADDO %0, %1 |
| 352 |
%6:_(s32) = G_ANYEXT %4(s16) |
| 353 |
%7:_(s32) = G_ANYEXT %5(s1) |
| 354 |
$x10 = COPY %6(s32) |
| 355 |
$x11 = COPY %7(s32) |
| 356 |
PseudoRET implicit $x10, implicit $x11 |
| 357 |
|
| 358 |
... |
| 359 |
--- |
| 360 |
name: uaddo_i32 |
| 361 |
body: | |
| 362 |
bb.1: |
| 363 |
liveins: $x10, $x11 |
| 364 |
|
| 365 |
; CHECK-LABEL: name: uaddo_i32 |
| 366 |
; CHECK: liveins: $x10, $x11 |
| 367 |
; CHECK-NEXT: {{ $}} |
| 368 |
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10 |
| 369 |
; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11 |
| 370 |
; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[COPY]], [[COPY1]] |
| 371 |
; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[ADD]](s32), [[COPY1]] |
| 372 |
; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY [[ADD]](s32) |
| 373 |
; CHECK-NEXT: $x10 = COPY [[COPY2]](s32) |
| 374 |
; CHECK-NEXT: $x11 = COPY [[ICMP]](s32) |
| 375 |
; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11 |
| 376 |
%0:_(s32) = COPY $x10 |
| 377 |
%1:_(s32) = COPY $x11 |
| 378 |
%2:_(s32), %3:_(s1) = G_UADDO %0, %1 |
| 379 |
%4:_(s32) = G_ANYEXT %3(s1) |
| 380 |
$x10 = COPY %2(s32) |
| 381 |
$x11 = COPY %4(s32) |
| 382 |
PseudoRET implicit $x10, implicit $x11 |
| 383 |
|
| 384 |
... |
| 385 |
--- |
| 386 |
name: uaddo_i64 |
| 387 |
body: | |
| 388 |
bb.1: |
| 389 |
liveins: $x10, $x11, $x12, $x13 |
| 390 |
|
| 391 |
; CHECK-LABEL: name: uaddo_i64 |
| 392 |
; CHECK: liveins: $x10, $x11, $x12, $x13 |
| 393 |
; CHECK-NEXT: {{ $}} |
| 394 |
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10 |
| 395 |
; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11 |
| 396 |
; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $x12 |
| 397 |
; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $x13 |
| 398 |
; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[COPY]], [[COPY2]] |
| 399 |
; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[ADD]](s32), [[COPY2]] |
| 400 |
; CHECK-NEXT: [[COPY4:%[0-9]+]]:_(s32) = COPY [[ADD]](s32) |
| 401 |
; CHECK-NEXT: [[ADD1:%[0-9]+]]:_(s32) = G_ADD [[COPY1]], [[COPY3]] |
| 402 |
; CHECK-NEXT: [[ADD2:%[0-9]+]]:_(s32) = G_ADD [[ADD1]], [[ICMP]] |
| 403 |
; CHECK-NEXT: [[COPY5:%[0-9]+]]:_(s32) = COPY [[ADD2]](s32) |
| 404 |
; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[COPY4]](s32), [[COPY2]] |
| 405 |
; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[COPY5]](s32), [[COPY3]] |
| 406 |
; CHECK-NEXT: [[ICMP3:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[COPY5]](s32), [[COPY3]] |
| 407 |
; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP3]](s32), [[ICMP1]], [[ICMP2]] |
| 408 |
; CHECK-NEXT: $x10 = COPY [[COPY4]](s32) |
| 409 |
; CHECK-NEXT: $x11 = COPY [[COPY5]](s32) |
| 410 |
; CHECK-NEXT: $x12 = COPY [[SELECT]](s32) |
| 411 |
; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11, implicit $x12 |
| 412 |
%2:_(s32) = COPY $x10 |
| 413 |
%3:_(s32) = COPY $x11 |
| 414 |
%0:_(s64) = G_MERGE_VALUES %2(s32), %3(s32) |
| 415 |
%4:_(s32) = COPY $x12 |
| 416 |
%5:_(s32) = COPY $x13 |
| 417 |
%1:_(s64) = G_MERGE_VALUES %4(s32), %5(s32) |
| 418 |
%6:_(s64), %7:_(s1) = G_UADDO %0, %1 |
| 419 |
%8:_(s32), %9:_(s32) = G_UNMERGE_VALUES %6(s64) |
| 420 |
%10:_(s32) = G_ANYEXT %7(s1) |
| 421 |
$x10 = COPY %8(s32) |
| 422 |
$x11 = COPY %9(s32) |
| 423 |
$x12 = COPY %10(s32) |
| 424 |
PseudoRET implicit $x10, implicit $x11, implicit $x12 |
| 425 |
|
| 426 |
... |
| 427 |
--- |
| 428 |
name: usubo_i8 |
| 429 |
body: | |
| 430 |
bb.1: |
| 431 |
liveins: $x10, $x11 |
| 432 |
|
| 433 |
; CHECK-LABEL: name: usubo_i8 |
| 434 |
; CHECK: liveins: $x10, $x11 |
| 435 |
; CHECK-NEXT: {{ $}} |
| 436 |
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10 |
| 437 |
; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11 |
| 438 |
; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s32) = G_SUB [[COPY]], [[COPY1]] |
| 439 |
; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255 |
| 440 |
; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]] |
| 441 |
; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]] |
| 442 |
; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[AND]](s32), [[AND1]] |
| 443 |
; CHECK-NEXT: $x10 = COPY [[SUB]](s32) |
| 444 |
; CHECK-NEXT: $x11 = COPY [[ICMP]](s32) |
| 445 |
; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11 |
| 446 |
%2:_(s32) = COPY $x10 |
| 447 |
%0:_(s8) = G_TRUNC %2(s32) |
| 448 |
%3:_(s32) = COPY $x11 |
| 449 |
%1:_(s8) = G_TRUNC %3(s32) |
| 450 |
%4:_(s8), %5:_(s1) = G_USUBO %0, %1 |
| 451 |
%6:_(s32) = G_ANYEXT %4(s8) |
| 452 |
%7:_(s32) = G_ANYEXT %5(s1) |
| 453 |
$x10 = COPY %6(s32) |
| 454 |
$x11 = COPY %7(s32) |
| 455 |
PseudoRET implicit $x10, implicit $x11 |
| 456 |
|
| 457 |
... |
| 458 |
--- |
| 459 |
name: usubo_i16 |
| 460 |
body: | |
| 461 |
bb.1: |
| 462 |
liveins: $x10, $x11 |
| 463 |
|
| 464 |
; CHECK-LABEL: name: usubo_i16 |
| 465 |
; CHECK: liveins: $x10, $x11 |
| 466 |
; CHECK-NEXT: {{ $}} |
| 467 |
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10 |
| 468 |
; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11 |
| 469 |
; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s32) = G_SUB [[COPY]], [[COPY1]] |
| 470 |
; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535 |
| 471 |
; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]] |
| 472 |
; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]] |
| 473 |
; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[AND]](s32), [[AND1]] |
| 474 |
; CHECK-NEXT: $x10 = COPY [[SUB]](s32) |
| 475 |
; CHECK-NEXT: $x11 = COPY [[ICMP]](s32) |
| 476 |
; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11 |
| 477 |
%2:_(s32) = COPY $x10 |
| 478 |
%0:_(s16) = G_TRUNC %2(s32) |
| 479 |
%3:_(s32) = COPY $x11 |
| 480 |
%1:_(s16) = G_TRUNC %3(s32) |
| 481 |
%4:_(s16), %5:_(s1) = G_USUBO %0, %1 |
| 482 |
%6:_(s32) = G_ANYEXT %4(s16) |
| 483 |
%7:_(s32) = G_ANYEXT %5(s1) |
| 484 |
$x10 = COPY %6(s32) |
| 485 |
$x11 = COPY %7(s32) |
| 486 |
PseudoRET implicit $x10, implicit $x11 |
| 487 |
|
| 488 |
... |
| 489 |
--- |
| 490 |
name: usubo_i32 |
| 491 |
body: | |
| 492 |
bb.1: |
| 493 |
liveins: $x10, $x11 |
| 494 |
|
| 495 |
; CHECK-LABEL: name: usubo_i32 |
| 496 |
; CHECK: liveins: $x10, $x11 |
| 497 |
; CHECK-NEXT: {{ $}} |
| 498 |
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10 |
| 499 |
; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11 |
| 500 |
; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s32) = G_SUB [[COPY]], [[COPY1]] |
| 501 |
; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[COPY]](s32), [[COPY1]] |
| 502 |
; CHECK-NEXT: $x10 = COPY [[SUB]](s32) |
| 503 |
; CHECK-NEXT: $x11 = COPY [[ICMP]](s32) |
| 504 |
; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11 |
| 505 |
%0:_(s32) = COPY $x10 |
| 506 |
%1:_(s32) = COPY $x11 |
| 507 |
%2:_(s32), %3:_(s1) = G_USUBO %0, %1 |
| 508 |
%4:_(s32) = G_ANYEXT %3(s1) |
| 509 |
$x10 = COPY %2(s32) |
| 510 |
$x11 = COPY %4(s32) |
| 511 |
PseudoRET implicit $x10, implicit $x11 |
| 512 |
|
| 513 |
... |
| 514 |
--- |
| 515 |
name: usubo_i64 |
| 516 |
body: | |
| 517 |
bb.1: |
| 518 |
liveins: $x10, $x11, $x12, $x13 |
| 519 |
|
| 520 |
; CHECK-LABEL: name: usubo_i64 |
| 521 |
; CHECK: liveins: $x10, $x11, $x12, $x13 |
| 522 |
; CHECK-NEXT: {{ $}} |
| 523 |
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10 |
| 524 |
; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11 |
| 525 |
; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $x12 |
| 526 |
; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $x13 |
| 527 |
; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s32) = G_SUB [[COPY]], [[COPY2]] |
| 528 |
; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[COPY]](s32), [[COPY2]] |
| 529 |
; CHECK-NEXT: [[SUB1:%[0-9]+]]:_(s32) = G_SUB [[COPY1]], [[COPY3]] |
| 530 |
; CHECK-NEXT: [[SUB2:%[0-9]+]]:_(s32) = G_SUB [[SUB1]], [[ICMP]] |
| 531 |
; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[COPY]](s32), [[COPY2]] |
| 532 |
; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[COPY1]](s32), [[COPY3]] |
| 533 |
; CHECK-NEXT: [[ICMP3:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[COPY3]] |
| 534 |
; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP3]](s32), [[ICMP1]], [[ICMP2]] |
| 535 |
; CHECK-NEXT: $x10 = COPY [[SUB]](s32) |
| 536 |
; CHECK-NEXT: $x11 = COPY [[SUB2]](s32) |
| 537 |
; CHECK-NEXT: $x12 = COPY [[SELECT]](s32) |
| 538 |
; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11, implicit $x12 |
| 539 |
%2:_(s32) = COPY $x10 |
| 540 |
%3:_(s32) = COPY $x11 |
| 541 |
%0:_(s64) = G_MERGE_VALUES %2(s32), %3(s32) |
| 542 |
%4:_(s32) = COPY $x12 |
| 543 |
%5:_(s32) = COPY $x13 |
| 544 |
%1:_(s64) = G_MERGE_VALUES %4(s32), %5(s32) |
| 545 |
%6:_(s64), %7:_(s1) = G_USUBO %0, %1 |
| 546 |
%8:_(s32), %9:_(s32) = G_UNMERGE_VALUES %6(s64) |
| 547 |
%10:_(s32) = G_ANYEXT %7(s1) |
| 548 |
$x10 = COPY %8(s32) |
| 549 |
$x11 = COPY %9(s32) |
| 550 |
$x12 = COPY %10(s32) |
| 551 |
PseudoRET implicit $x10, implicit $x11, implicit $x12 |
| 552 |
|
| 553 |
... |