|
| 1 | +# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py |
| 2 | +# RUN: llc -mtriple=aarch64 -run-pass=regbankselect -verify-machineinstrs %s -o - | FileCheck %s |
| 3 | + |
| 4 | +... |
| 5 | +--- |
| 6 | +name: no_cross_bank_copies_needed |
| 7 | +legalized: true |
| 8 | +regBankSelected: false |
| 9 | +tracksRegLiveness: true |
| 10 | +body: | |
| 11 | + bb.0: |
| 12 | + liveins: $d0 |
| 13 | + ; CHECK-LABEL: name: no_cross_bank_copies_needed |
| 14 | + ; CHECK: liveins: $d0 |
| 15 | + ; CHECK: %fpr:fpr(s64) = COPY $d0 |
| 16 | + ; CHECK: %lround:gpr(s64) = G_LROUND %fpr(s64) |
| 17 | + ; CHECK: $d0 = COPY %lround(s64) |
| 18 | + ; CHECK: RET_ReallyLR implicit $s0 |
| 19 | + %fpr:_(s64) = COPY $d0 |
| 20 | + %lround:_(s64) = G_LROUND %fpr |
| 21 | + $d0 = COPY %lround:_(s64) |
| 22 | + RET_ReallyLR implicit $s0 |
| 23 | +... |
| 24 | +--- |
| 25 | +name: source_needs_copy |
| 26 | +legalized: true |
| 27 | +regBankSelected: false |
| 28 | +tracksRegLiveness: true |
| 29 | +body: | |
| 30 | + bb.0: |
| 31 | + liveins: $x0 |
| 32 | + ; CHECK-LABEL: name: source_needs_copy |
| 33 | + ; CHECK: liveins: $x0 |
| 34 | + ; CHECK: %gpr:gpr(s64) = COPY $x0 |
| 35 | + ; CHECK: [[COPY:%[0-9]+]]:fpr(s64) = COPY %gpr(s64) |
| 36 | + ; CHECK: %lround:gpr(s64) = G_LROUND [[COPY]](s64) |
| 37 | + ; CHECK: $d0 = COPY %lround(s64) |
| 38 | + ; CHECK: RET_ReallyLR implicit $s0 |
| 39 | + %gpr:_(s64) = COPY $x0 |
| 40 | + %lround:_(s64) = G_LROUND %gpr |
| 41 | + $d0 = COPY %lround:_(s64) |
| 42 | + RET_ReallyLR implicit $s0 |
| 43 | +... |
| 44 | +--- |
| 45 | +name: load_gets_fpr |
| 46 | +legalized: true |
| 47 | +regBankSelected: false |
| 48 | +tracksRegLiveness: true |
| 49 | +body: | |
| 50 | + bb.0: |
| 51 | + liveins: $x0 |
| 52 | + ; CHECK-LABEL: name: load_gets_fpr |
| 53 | + ; CHECK: liveins: $x0 |
| 54 | + ; CHECK: %ptr:gpr(p0) = COPY $x0 |
| 55 | + ; CHECK: %load:fpr(s32) = G_LOAD %ptr(p0) :: (load (s32)) |
| 56 | + ; CHECK: %lround:gpr(s64) = G_LROUND %load(s32) |
| 57 | + ; CHECK: $d0 = COPY %lround(s64) |
| 58 | + ; CHECK: RET_ReallyLR implicit $s0 |
| 59 | + %ptr:_(p0) = COPY $x0 |
| 60 | + %load:_(s32) = G_LOAD %ptr(p0) :: (load (s32)) |
| 61 | + %lround:_(s64) = G_LROUND %load |
| 62 | + $d0 = COPY %lround:_(s64) |
| 63 | + RET_ReallyLR implicit $s0 |
| 64 | +
|
| 65 | +... |
0 commit comments