|
| 1 | +# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 6 |
| 2 | +# RUN: llc -mtriple=aarch64 -run-pass=register-coalescer -o - %s | FileCheck %s |
| 3 | +--- |
| 4 | +name: reproducer |
| 5 | +tracksRegLiveness: true |
| 6 | +body: | |
| 7 | + ; CHECK-LABEL: name: reproducer |
| 8 | + ; CHECK: bb.0: |
| 9 | + ; CHECK-NEXT: successors: %bb.1(0x80000000) |
| 10 | + ; CHECK-NEXT: liveins: $w0, $x1 |
| 11 | + ; CHECK-NEXT: {{ $}} |
| 12 | + ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64common = COPY $x1 |
| 13 | + ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32 = COPY $w0 |
| 14 | + ; CHECK-NEXT: undef [[MOVIv2d_ns:%[0-9]+]].qsub1:zpr2 = MOVIv2d_ns 0, implicit-def [[MOVIv2d_ns]] |
| 15 | + ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr64sp = COPY $xzr |
| 16 | + ; CHECK-NEXT: {{ $}} |
| 17 | + ; CHECK-NEXT: bb.1: |
| 18 | + ; CHECK-NEXT: successors: %bb.3(0x40000000), %bb.2(0x40000000) |
| 19 | + ; CHECK-NEXT: {{ $}} |
| 20 | + ; CHECK-NEXT: TBNZW [[COPY1]], 0, %bb.3 |
| 21 | + ; CHECK-NEXT: B %bb.2 |
| 22 | + ; CHECK-NEXT: {{ $}} |
| 23 | + ; CHECK-NEXT: bb.2: |
| 24 | + ; CHECK-NEXT: successors: %bb.3(0x80000000) |
| 25 | + ; CHECK-NEXT: {{ $}} |
| 26 | + ; CHECK-NEXT: [[MOVIv2d_ns:%[0-9]+]].dsub:zpr2 = LDRDui [[COPY2]], 0, implicit-def [[MOVIv2d_ns]].zsub |
| 27 | + ; CHECK-NEXT: ST2Twov2d [[MOVIv2d_ns]].zsub_qsub1, [[COPY]] |
| 28 | + ; CHECK-NEXT: {{ $}} |
| 29 | + ; CHECK-NEXT: bb.3: |
| 30 | + ; CHECK-NEXT: successors: %bb.1(0x80000000) |
| 31 | + ; CHECK-NEXT: {{ $}} |
| 32 | + ; CHECK-NEXT: STR_ZXI [[MOVIv2d_ns]].zsub1, [[COPY]], 1 |
| 33 | + ; CHECK-NEXT: STR_ZXI [[MOVIv2d_ns]].zsub1, [[COPY]], 0 |
| 34 | + ; CHECK-NEXT: B %bb.1 |
| 35 | + bb.0: |
| 36 | + liveins: $w0, $x1 |
| 37 | + %0:gpr64common = COPY $x1 |
| 38 | + %1:gpr32 = COPY $w0 |
| 39 | + %2:gpr32 = COPY %1:gpr32 |
| 40 | + undef %8.qsub1:qq = MOVIv2d_ns 0 |
| 41 | + %4:zpr = SUBREG_TO_REG 0, %8.qsub1:qq, %subreg.zsub |
| 42 | + %5:gpr64sp = COPY $xzr |
| 43 | +
|
| 44 | + bb.1: |
| 45 | + TBNZW %2:gpr32, 0, %bb.3 |
| 46 | + B %bb.2 |
| 47 | +
|
| 48 | + bb.2: |
| 49 | + %8.dsub:qq = LDRDui %5:gpr64sp, 0, implicit-def %8.qsub0:qq |
| 50 | + ST2Twov2d %8:qq, %0:gpr64common |
| 51 | +
|
| 52 | + bb.3: |
| 53 | + STR_ZXI %4:zpr, %0:gpr64common, 1 |
| 54 | + STR_ZXI %4:zpr, %0:gpr64common, 0 |
| 55 | + B %bb.1 |
| 56 | +... |
| 57 | +--- |
| 58 | +name: reproducer2 |
| 59 | +tracksRegLiveness: true |
| 60 | +body: | |
| 61 | + ; CHECK-LABEL: name: reproducer2 |
| 62 | + ; CHECK: bb.0: |
| 63 | + ; CHECK-NEXT: successors: %bb.1(0x80000000) |
| 64 | + ; CHECK-NEXT: liveins: $w0, $x1 |
| 65 | + ; CHECK-NEXT: {{ $}} |
| 66 | + ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64common = COPY $x1 |
| 67 | + ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32 = COPY $w0 |
| 68 | + ; CHECK-NEXT: undef [[MOVIv2d_ns:%[0-9]+]].zsub:zpr2 = MOVIv2d_ns 0 |
| 69 | + ; CHECK-NEXT: [[MOVIv2d_ns:%[0-9]+]].qsub1:zpr2 = MOVIv2d_ns 0 |
| 70 | + ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr64sp = COPY $xzr |
| 71 | + ; CHECK-NEXT: {{ $}} |
| 72 | + ; CHECK-NEXT: bb.1: |
| 73 | + ; CHECK-NEXT: successors: %bb.3(0x40000000), %bb.2(0x40000000) |
| 74 | + ; CHECK-NEXT: {{ $}} |
| 75 | + ; CHECK-NEXT: TBNZW [[COPY1]], 0, %bb.3 |
| 76 | + ; CHECK-NEXT: B %bb.2 |
| 77 | + ; CHECK-NEXT: {{ $}} |
| 78 | + ; CHECK-NEXT: bb.2: |
| 79 | + ; CHECK-NEXT: successors: %bb.3(0x80000000) |
| 80 | + ; CHECK-NEXT: {{ $}} |
| 81 | + ; CHECK-NEXT: [[MOVIv2d_ns:%[0-9]+]].dsub:zpr2 = LDRDui [[COPY2]], 0, implicit-def [[MOVIv2d_ns]].zsub |
| 82 | + ; CHECK-NEXT: ST2Twov2d [[MOVIv2d_ns]].zsub_qsub1, [[COPY]] |
| 83 | + ; CHECK-NEXT: {{ $}} |
| 84 | + ; CHECK-NEXT: bb.3: |
| 85 | + ; CHECK-NEXT: successors: %bb.1(0x80000000) |
| 86 | + ; CHECK-NEXT: {{ $}} |
| 87 | + ; CHECK-NEXT: STR_ZXI [[MOVIv2d_ns]].zsub1, [[COPY]], 1 |
| 88 | + ; CHECK-NEXT: STR_ZXI [[MOVIv2d_ns]].zsub1, [[COPY]], 0 |
| 89 | + ; CHECK-NEXT: B %bb.1 |
| 90 | + bb.0: |
| 91 | + liveins: $w0, $x1 |
| 92 | + %0:gpr64common = COPY $x1 |
| 93 | + %1:gpr32 = COPY $w0 |
| 94 | + %2:gpr32 = COPY %1:gpr32 |
| 95 | + undef %8.qsub0:qq = MOVIv2d_ns 0 |
| 96 | + %8.qsub1:qq = MOVIv2d_ns 0 |
| 97 | + %4:zpr = SUBREG_TO_REG 0, %8.qsub1:qq, %subreg.zsub |
| 98 | + %5:gpr64sp = COPY $xzr |
| 99 | +
|
| 100 | + bb.1: |
| 101 | + TBNZW %2:gpr32, 0, %bb.3 |
| 102 | + B %bb.2 |
| 103 | +
|
| 104 | + bb.2: |
| 105 | + %8.dsub:qq = LDRDui %5:gpr64sp, 0, implicit-def %8.qsub0:qq |
| 106 | + ST2Twov2d %8:qq, %0:gpr64common |
| 107 | +
|
| 108 | + bb.3: |
| 109 | + STR_ZXI %4:zpr, %0:gpr64common, 1 |
| 110 | + STR_ZXI %4:zpr, %0:gpr64common, 0 |
| 111 | + B %bb.1 |
| 112 | +... |
| 113 | +--- |
| 114 | +name: reproducer3 |
| 115 | +tracksRegLiveness: true |
| 116 | +body: | |
| 117 | + ; CHECK-LABEL: name: reproducer3 |
| 118 | + ; CHECK: bb.0: |
| 119 | + ; CHECK-NEXT: successors: %bb.1(0x80000000) |
| 120 | + ; CHECK-NEXT: liveins: $w0, $x1 |
| 121 | + ; CHECK-NEXT: {{ $}} |
| 122 | + ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64common = COPY $x1 |
| 123 | + ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32 = COPY $w0 |
| 124 | + ; CHECK-NEXT: undef [[MOVIv2d_ns:%[0-9]+]].qsub1:zpr2 = MOVIv2d_ns 0 |
| 125 | + ; CHECK-NEXT: [[MOVIv2d_ns:%[0-9]+]].zsub:zpr2 = MOVIv2d_ns 0 |
| 126 | + ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr64sp = COPY $xzr |
| 127 | + ; CHECK-NEXT: {{ $}} |
| 128 | + ; CHECK-NEXT: bb.1: |
| 129 | + ; CHECK-NEXT: successors: %bb.3(0x40000000), %bb.2(0x40000000) |
| 130 | + ; CHECK-NEXT: {{ $}} |
| 131 | + ; CHECK-NEXT: TBNZW [[COPY1]], 0, %bb.3 |
| 132 | + ; CHECK-NEXT: B %bb.2 |
| 133 | + ; CHECK-NEXT: {{ $}} |
| 134 | + ; CHECK-NEXT: bb.2: |
| 135 | + ; CHECK-NEXT: successors: %bb.3(0x80000000) |
| 136 | + ; CHECK-NEXT: {{ $}} |
| 137 | + ; CHECK-NEXT: [[MOVIv2d_ns:%[0-9]+]].dsub1:zpr2 = LDRDui [[COPY2]], 0, implicit-def [[MOVIv2d_ns]].qsub1 |
| 138 | + ; CHECK-NEXT: ST2Twov2d [[MOVIv2d_ns]].zsub_qsub1, [[COPY]] |
| 139 | + ; CHECK-NEXT: {{ $}} |
| 140 | + ; CHECK-NEXT: bb.3: |
| 141 | + ; CHECK-NEXT: successors: %bb.1(0x80000000) |
| 142 | + ; CHECK-NEXT: {{ $}} |
| 143 | + ; CHECK-NEXT: STR_ZXI [[MOVIv2d_ns]].zsub0, [[COPY]], 1 |
| 144 | + ; CHECK-NEXT: STR_ZXI [[MOVIv2d_ns]].zsub0, [[COPY]], 0 |
| 145 | + ; CHECK-NEXT: B %bb.1 |
| 146 | + bb.0: |
| 147 | + liveins: $w0, $x1 |
| 148 | + %0:gpr64common = COPY $x1 |
| 149 | + %1:gpr32 = COPY $w0 |
| 150 | + %2:gpr32 = COPY %1:gpr32 |
| 151 | + undef %8.qsub1:qq = MOVIv2d_ns 0 |
| 152 | + %8.qsub0:qq = MOVIv2d_ns 0 |
| 153 | + %4:zpr = SUBREG_TO_REG 0, %8.qsub0:qq, %subreg.zsub |
| 154 | + %5:gpr64sp = COPY $xzr |
| 155 | +
|
| 156 | + bb.1: |
| 157 | + TBNZW %2:gpr32, 0, %bb.3 |
| 158 | + B %bb.2 |
| 159 | +
|
| 160 | + bb.2: |
| 161 | + %8.dsub1:qq = LDRDui %5:gpr64sp, 0, implicit-def %8.qsub1:qq |
| 162 | + ST2Twov2d %8:qq, %0:gpr64common |
| 163 | +
|
| 164 | + bb.3: |
| 165 | + STR_ZXI %4:zpr, %0:gpr64common, 1 |
| 166 | + STR_ZXI %4:zpr, %0:gpr64common, 0 |
| 167 | + B %bb.1 |
| 168 | +... |
0 commit comments