453 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 22# RUN: llc -mtriple=arm64-unknown-unknown -global-isel -run-pass=aarch64-prelegalizer-combiner %s -o - | FileCheck %s3 4---5name: fshr_i86alignment: 47tracksRegLiveness: true8body: |9 bb.0:10 liveins: $w0, $w1, $w211 12 ; CHECK-LABEL: name: fshr_i813 ; CHECK: liveins: $w0, $w1, $w214 ; CHECK-NEXT: {{ $}}15 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w016 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s8) = G_TRUNC [[COPY]](s32)17 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w118 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s8) = G_TRUNC [[COPY1]](s32)19 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $w220 ; CHECK-NEXT: [[TRUNC2:%[0-9]+]]:_(s8) = G_TRUNC [[COPY2]](s32)21 ; CHECK-NEXT: [[FSHR:%[0-9]+]]:_(s8) = G_FSHR [[TRUNC]], [[TRUNC1]], [[TRUNC2]](s8)22 ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[FSHR]](s8)23 ; CHECK-NEXT: $w0 = COPY [[ANYEXT]](s32)24 ; CHECK-NEXT: RET_ReallyLR implicit $w025 %3:_(s32) = COPY $w026 %0:_(s8) = G_TRUNC %3(s32)27 %4:_(s32) = COPY $w128 %1:_(s8) = G_TRUNC %4(s32)29 %5:_(s32) = COPY $w230 %2:_(s8) = G_TRUNC %5(s32)31 %6:_(s8) = G_FSHR %0, %1, %2(s8)32 %7:_(s32) = G_ANYEXT %6(s8)33 $w0 = COPY %7(s32)34 RET_ReallyLR implicit $w035 36...37 38---39name: fshr_i1640alignment: 441tracksRegLiveness: true42body: |43 bb.0:44 liveins: $w0, $w1, $w245 46 ; CHECK-LABEL: name: fshr_i1647 ; CHECK: liveins: $w0, $w1, $w248 ; CHECK-NEXT: {{ $}}49 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w050 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY]](s32)51 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w152 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)53 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $w254 ; CHECK-NEXT: [[TRUNC2:%[0-9]+]]:_(s16) = G_TRUNC [[COPY2]](s32)55 ; CHECK-NEXT: [[FSHR:%[0-9]+]]:_(s16) = G_FSHR [[TRUNC]], [[TRUNC1]], [[TRUNC2]](s16)56 ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[FSHR]](s16)57 ; CHECK-NEXT: $w0 = COPY [[ANYEXT]](s32)58 ; CHECK-NEXT: RET_ReallyLR implicit $w059 %3:_(s32) = COPY $w060 %0:_(s16) = G_TRUNC %3(s32)61 %4:_(s32) = COPY $w162 %1:_(s16) = G_TRUNC %4(s32)63 %5:_(s32) = COPY $w264 %2:_(s16) = G_TRUNC %5(s32)65 %6:_(s16) = G_FSHR %0, %1, %2(s16)66 %7:_(s32) = G_ANYEXT %6(s16)67 $w0 = COPY %7(s32)68 RET_ReallyLR implicit $w069 70...71 72---73name: fshr_i3274alignment: 475tracksRegLiveness: true76body: |77 bb.0:78 liveins: $w0, $w1, $w279 80 ; CHECK-LABEL: name: fshr_i3281 ; CHECK: liveins: $w0, $w1, $w282 ; CHECK-NEXT: {{ $}}83 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w084 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w185 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $w286 ; CHECK-NEXT: [[FSHR:%[0-9]+]]:_(s32) = G_FSHR [[COPY]], [[COPY1]], [[COPY2]](s32)87 ; CHECK-NEXT: $w0 = COPY [[FSHR]](s32)88 ; CHECK-NEXT: RET_ReallyLR implicit $w089 %0:_(s32) = COPY $w090 %1:_(s32) = COPY $w191 %2:_(s32) = COPY $w292 %3:_(s32) = G_FSHR %0, %1, %2(s32)93 $w0 = COPY %3(s32)94 RET_ReallyLR implicit $w095 96...97 98---99name: fshr_i64100alignment: 4101tracksRegLiveness: true102body: |103 bb.0:104 liveins: $x0, $x1, $x2105 106 ; CHECK-LABEL: name: fshr_i64107 ; CHECK: liveins: $x0, $x1, $x2108 ; CHECK-NEXT: {{ $}}109 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0110 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1111 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s64) = COPY $x2112 ; CHECK-NEXT: [[FSHR:%[0-9]+]]:_(s64) = G_FSHR [[COPY]], [[COPY1]], [[COPY2]](s64)113 ; CHECK-NEXT: $x0 = COPY [[FSHR]](s64)114 ; CHECK-NEXT: RET_ReallyLR implicit $x0115 %0:_(s64) = COPY $x0116 %1:_(s64) = COPY $x1117 %2:_(s64) = COPY $x2118 %3:_(s64) = G_FSHR %0, %1, %2(s64)119 $x0 = COPY %3(s64)120 RET_ReallyLR implicit $x0121 122...123 124---125name: fshr_i8_const_shift126alignment: 4127tracksRegLiveness: true128body: |129 bb.0:130 liveins: $w0, $w1131 132 ; CHECK-LABEL: name: fshr_i8_const_shift133 ; CHECK: liveins: $w0, $w1134 ; CHECK-NEXT: {{ $}}135 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0136 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s8) = G_TRUNC [[COPY]](s32)137 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1138 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s8) = G_TRUNC [[COPY1]](s32)139 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s8) = G_CONSTANT i8 5140 ; CHECK-NEXT: [[FSHR:%[0-9]+]]:_(s8) = G_FSHR [[TRUNC]], [[TRUNC1]], [[C]](s8)141 ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[FSHR]](s8)142 ; CHECK-NEXT: $w0 = COPY [[ANYEXT]](s32)143 ; CHECK-NEXT: RET_ReallyLR implicit $w0144 %2:_(s32) = COPY $w0145 %0:_(s8) = G_TRUNC %2(s32)146 %3:_(s32) = COPY $w1147 %1:_(s8) = G_TRUNC %3(s32)148 %4:_(s8) = G_CONSTANT i8 5149 %5:_(s8) = G_FSHR %0, %1, %4(s8)150 %6:_(s32) = G_ANYEXT %5(s8)151 $w0 = COPY %6(s32)152 RET_ReallyLR implicit $w0153 154...155 156---157name: fshr_i8_const_overshift158alignment: 4159tracksRegLiveness: true160body: |161 bb.0:162 liveins: $w0, $w1163 164 ; CHECK-LABEL: name: fshr_i8_const_overshift165 ; CHECK: liveins: $w0, $w1166 ; CHECK-NEXT: {{ $}}167 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0168 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s8) = G_TRUNC [[COPY]](s32)169 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1170 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s8) = G_TRUNC [[COPY1]](s32)171 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s8) = G_CONSTANT i8 2172 ; CHECK-NEXT: [[FSHR:%[0-9]+]]:_(s8) = G_FSHR [[TRUNC]], [[TRUNC1]], [[C]](s8)173 ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[FSHR]](s8)174 ; CHECK-NEXT: $w0 = COPY [[ANYEXT]](s32)175 ; CHECK-NEXT: RET_ReallyLR implicit $w0176 %2:_(s32) = COPY $w0177 %0:_(s8) = G_TRUNC %2(s32)178 %3:_(s32) = COPY $w1179 %1:_(s8) = G_TRUNC %3(s32)180 %4:_(s8) = G_CONSTANT i8 10181 %5:_(s8) = G_FSHR %0, %1, %4(s8)182 %6:_(s32) = G_ANYEXT %5(s8)183 $w0 = COPY %6(s32)184 RET_ReallyLR implicit $w0185 186...187 188---189name: fshr_i8_shift_by_bidwidth190alignment: 4191tracksRegLiveness: true192body: |193 bb.0:194 liveins: $w0, $w1195 196 ; CHECK-LABEL: name: fshr_i8_shift_by_bidwidth197 ; CHECK: liveins: $w0, $w1198 ; CHECK-NEXT: {{ $}}199 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w1200 ; CHECK-NEXT: $w0 = COPY [[COPY]](s32)201 ; CHECK-NEXT: RET_ReallyLR implicit $w0202 %2:_(s32) = COPY $w0203 %0:_(s8) = G_TRUNC %2(s32)204 %3:_(s32) = COPY $w1205 %1:_(s8) = G_TRUNC %3(s32)206 %4:_(s8) = G_CONSTANT i8 8207 %5:_(s8) = G_FSHR %0, %1, %4(s8)208 %6:_(s32) = G_ANYEXT %5(s8)209 $w0 = COPY %6(s32)210 RET_ReallyLR implicit $w0211 212...213 214---215name: fshr_i16_const_shift216alignment: 4217tracksRegLiveness: true218body: |219 bb.0:220 liveins: $w0, $w1221 222 ; CHECK-LABEL: name: fshr_i16_const_shift223 ; CHECK: liveins: $w0, $w1224 ; CHECK-NEXT: {{ $}}225 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0226 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY]](s32)227 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1228 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)229 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s16) = G_CONSTANT i16 5230 ; CHECK-NEXT: [[FSHR:%[0-9]+]]:_(s16) = G_FSHR [[TRUNC]], [[TRUNC1]], [[C]](s16)231 ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[FSHR]](s16)232 ; CHECK-NEXT: $w0 = COPY [[ANYEXT]](s32)233 ; CHECK-NEXT: RET_ReallyLR implicit $w0234 %2:_(s32) = COPY $w0235 %0:_(s16) = G_TRUNC %2(s32)236 %3:_(s32) = COPY $w1237 %1:_(s16) = G_TRUNC %3(s32)238 %4:_(s16) = G_CONSTANT i16 5239 %5:_(s16) = G_FSHR %0, %1, %4(s16)240 %6:_(s32) = G_ANYEXT %5(s16)241 $w0 = COPY %6(s32)242 RET_ReallyLR implicit $w0243 244...245 246---247name: fshr_i16_const_overshift248alignment: 4249tracksRegLiveness: true250body: |251 bb.0:252 liveins: $w0, $w1253 254 ; CHECK-LABEL: name: fshr_i16_const_overshift255 ; CHECK: liveins: $w0, $w1256 ; CHECK-NEXT: {{ $}}257 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0258 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY]](s32)259 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1260 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)261 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s16) = G_CONSTANT i16 4262 ; CHECK-NEXT: [[FSHR:%[0-9]+]]:_(s16) = G_FSHR [[TRUNC]], [[TRUNC1]], [[C]](s16)263 ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[FSHR]](s16)264 ; CHECK-NEXT: $w0 = COPY [[ANYEXT]](s32)265 ; CHECK-NEXT: RET_ReallyLR implicit $w0266 %2:_(s32) = COPY $w0267 %0:_(s16) = G_TRUNC %2(s32)268 %3:_(s32) = COPY $w1269 %1:_(s16) = G_TRUNC %3(s32)270 %4:_(s16) = G_CONSTANT i16 20271 %5:_(s16) = G_FSHR %0, %1, %4(s16)272 %6:_(s32) = G_ANYEXT %5(s16)273 $w0 = COPY %6(s32)274 RET_ReallyLR implicit $w0275 276...277 278---279name: fshr_i16_shift_by_bidwidth280alignment: 4281tracksRegLiveness: true282body: |283 bb.0:284 liveins: $w0, $w1285 286 ; CHECK-LABEL: name: fshr_i16_shift_by_bidwidth287 ; CHECK: liveins: $w0, $w1288 ; CHECK-NEXT: {{ $}}289 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w1290 ; CHECK-NEXT: $w0 = COPY [[COPY]](s32)291 ; CHECK-NEXT: RET_ReallyLR implicit $w0292 %2:_(s32) = COPY $w0293 %0:_(s16) = G_TRUNC %2(s32)294 %3:_(s32) = COPY $w1295 %1:_(s16) = G_TRUNC %3(s32)296 %4:_(s16) = G_CONSTANT i16 16297 %5:_(s16) = G_FSHR %0, %1, %4(s16)298 %6:_(s32) = G_ANYEXT %5(s16)299 $w0 = COPY %6(s32)300 RET_ReallyLR implicit $w0301 302...303 304---305name: fshr_i32_const_shift306alignment: 4307tracksRegLiveness: true308body: |309 bb.0:310 liveins: $w0, $w1311 312 ; CHECK-LABEL: name: fshr_i32_const_shift313 ; CHECK: liveins: $w0, $w1314 ; CHECK-NEXT: {{ $}}315 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0316 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1317 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 5318 ; CHECK-NEXT: [[FSHR:%[0-9]+]]:_(s32) = G_FSHR [[COPY]], [[COPY1]], [[C]](s32)319 ; CHECK-NEXT: $w0 = COPY [[FSHR]](s32)320 ; CHECK-NEXT: RET_ReallyLR implicit $w0321 %0:_(s32) = COPY $w0322 %1:_(s32) = COPY $w1323 %2:_(s32) = G_CONSTANT i32 5324 %3:_(s32) = G_FSHR %0, %1, %2(s32)325 $w0 = COPY %3(s32)326 RET_ReallyLR implicit $w0327 328...329 330---331name: fshr_i32_const_overshift332alignment: 4333tracksRegLiveness: true334body: |335 bb.0:336 liveins: $w0, $w1337 338 ; CHECK-LABEL: name: fshr_i32_const_overshift339 ; CHECK: liveins: $w0, $w1340 ; CHECK-NEXT: {{ $}}341 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0342 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1343 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 10344 ; CHECK-NEXT: [[FSHR:%[0-9]+]]:_(s32) = G_FSHR [[COPY]], [[COPY1]], [[C]](s32)345 ; CHECK-NEXT: $w0 = COPY [[FSHR]](s32)346 ; CHECK-NEXT: RET_ReallyLR implicit $w0347 %0:_(s32) = COPY $w0348 %1:_(s32) = COPY $w1349 %2:_(s32) = G_CONSTANT i32 42350 %3:_(s32) = G_FSHR %0, %1, %2(s32)351 $w0 = COPY %3(s32)352 RET_ReallyLR implicit $w0353 354...355 356---357name: fshr_i32_shift_by_bidwidth358alignment: 4359tracksRegLiveness: true360body: |361 bb.0:362 liveins: $w0, $w1363 364 ; CHECK-LABEL: name: fshr_i32_shift_by_bidwidth365 ; CHECK: liveins: $w0, $w1366 ; CHECK-NEXT: {{ $}}367 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w1368 ; CHECK-NEXT: $w0 = COPY [[COPY]](s32)369 ; CHECK-NEXT: RET_ReallyLR implicit $w0370 %0:_(s32) = COPY $w0371 %1:_(s32) = COPY $w1372 %2:_(s32) = G_CONSTANT i32 32373 %3:_(s32) = G_FSHR %0, %1, %2(s32)374 $w0 = COPY %3(s32)375 RET_ReallyLR implicit $w0376 377...378 379---380name: fshr_i64_const_shift381alignment: 4382tracksRegLiveness: true383body: |384 bb.0:385 liveins: $x0, $x1386 387 ; CHECK-LABEL: name: fshr_i64_const_shift388 ; CHECK: liveins: $x0, $x1389 ; CHECK-NEXT: {{ $}}390 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0391 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1392 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 5393 ; CHECK-NEXT: [[FSHR:%[0-9]+]]:_(s64) = G_FSHR [[COPY]], [[COPY1]], [[C]](s64)394 ; CHECK-NEXT: $x0 = COPY [[FSHR]](s64)395 ; CHECK-NEXT: RET_ReallyLR implicit $x0396 %0:_(s64) = COPY $x0397 %1:_(s64) = COPY $x1398 %2:_(s64) = G_CONSTANT i64 5399 %3:_(s64) = G_FSHR %0, %1, %2(s64)400 $x0 = COPY %3(s64)401 RET_ReallyLR implicit $x0402 403...404 405---406name: fshr_i64_const_overshift407alignment: 4408tracksRegLiveness: true409body: |410 bb.0:411 liveins: $x0, $x1412 413 ; CHECK-LABEL: name: fshr_i64_const_overshift414 ; CHECK: liveins: $x0, $x1415 ; CHECK-NEXT: {{ $}}416 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0417 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1418 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 8419 ; CHECK-NEXT: [[FSHR:%[0-9]+]]:_(s64) = G_FSHR [[COPY]], [[COPY1]], [[C]](s64)420 ; CHECK-NEXT: $x0 = COPY [[FSHR]](s64)421 ; CHECK-NEXT: RET_ReallyLR implicit $x0422 %0:_(s64) = COPY $x0423 %1:_(s64) = COPY $x1424 %2:_(s64) = G_CONSTANT i64 72425 %3:_(s64) = G_FSHR %0, %1, %2(s64)426 $x0 = COPY %3(s64)427 RET_ReallyLR implicit $x0428 429...430 431---432name: fshr_i64_shift_by_bidwidth433alignment: 4434tracksRegLiveness: true435body: |436 bb.0:437 liveins: $x0, $x1438 439 ; CHECK-LABEL: name: fshr_i64_shift_by_bidwidth440 ; CHECK: liveins: $x0, $x1441 ; CHECK-NEXT: {{ $}}442 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x1443 ; CHECK-NEXT: $x0 = COPY [[COPY]](s64)444 ; CHECK-NEXT: RET_ReallyLR implicit $x0445 %0:_(s64) = COPY $x0446 %1:_(s64) = COPY $x1447 %2:_(s64) = G_CONSTANT i64 64448 %3:_(s64) = G_FSHR %0, %1, %2(s64)449 $x0 = COPY %3(s64)450 RET_ReallyLR implicit $x0451 452...453