|
| 1 | +# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 6 |
| 2 | +# RUN: llc -mtriple=aarch64 -global-isel=0 -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-SD |
| 3 | +# RUN: llc -mtriple=aarch64 -global-isel=1 -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-GI |
| 4 | + |
| 5 | +--- |
| 6 | +name: fpext_f16_f64 |
| 7 | +body: | |
| 8 | + bb.0: |
| 9 | + liveins: $h0 |
| 10 | +
|
| 11 | + ; CHECK-LABEL: name: fpext_f16_f64 |
| 12 | + ; CHECK: liveins: $h0 |
| 13 | + ; CHECK-NEXT: {{ $}} |
| 14 | + ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY $h0 |
| 15 | + ; CHECK-NEXT: [[FPEXT:%[0-9]+]]:_(s64) = G_FPEXT [[COPY]](s16) |
| 16 | + ; CHECK-NEXT: $d0 = COPY [[FPEXT]](s64) |
| 17 | + ; CHECK-NEXT: RET_ReallyLR implicit $d0 |
| 18 | + %0:_(s16) = COPY $h0 |
| 19 | + %1:_(s64) = G_FPEXT %0(s16) |
| 20 | + $d0 = COPY %1(s64) |
| 21 | + RET_ReallyLR implicit $d0 |
| 22 | +... |
| 23 | + |
| 24 | +--- |
| 25 | +name: fpext_v2f16_v2f64 |
| 26 | +body: | |
| 27 | + bb.0: |
| 28 | + liveins: $d0 |
| 29 | +
|
| 30 | + ; CHECK-LABEL: name: fpext_v2f16_v2f64 |
| 31 | + ; CHECK: liveins: $d0 |
| 32 | + ; CHECK-NEXT: {{ $}} |
| 33 | + ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $d0 |
| 34 | + ; CHECK-NEXT: [[FPEXT:%[0-9]+]]:_(<4 x s32>) = G_FPEXT [[COPY]](<4 x s16>) |
| 35 | + ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s32>), [[UV1:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[FPEXT]](<4 x s32>) |
| 36 | + ; CHECK-NEXT: [[FPEXT1:%[0-9]+]]:_(<2 x s64>) = G_FPEXT [[UV]](<2 x s32>) |
| 37 | + ; CHECK-NEXT: $q0 = COPY [[FPEXT1]](<2 x s64>) |
| 38 | + ; CHECK-NEXT: RET_ReallyLR implicit $q0 |
| 39 | + %1:_(<4 x s16>) = COPY $d0 |
| 40 | + %0:_(<2 x s16>), %2:_(<2 x s16>) = G_UNMERGE_VALUES %1(<4 x s16>) |
| 41 | + %3:_(<2 x s64>) = G_FPEXT %0(<2 x s16>) |
| 42 | + $q0 = COPY %3(<2 x s64>) |
| 43 | + RET_ReallyLR implicit $q0 |
| 44 | +... |
| 45 | + |
| 46 | +--- |
| 47 | +name: fpext_v3f16_v3f64 |
| 48 | +body: | |
| 49 | + bb.0: |
| 50 | + liveins: $d0 |
| 51 | +
|
| 52 | + ; CHECK-LABEL: name: fpext_v3f16_v3f64 |
| 53 | + ; CHECK: liveins: $d0 |
| 54 | + ; CHECK-NEXT: {{ $}} |
| 55 | + ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $d0 |
| 56 | + ; CHECK-NEXT: [[FPEXT:%[0-9]+]]:_(<4 x s32>) = G_FPEXT [[COPY]](<4 x s16>) |
| 57 | + ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s32>), [[UV1:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[FPEXT]](<4 x s32>) |
| 58 | + ; CHECK-NEXT: [[FPEXT1:%[0-9]+]]:_(<2 x s64>) = G_FPEXT [[UV]](<2 x s32>) |
| 59 | + ; CHECK-NEXT: [[FPEXT2:%[0-9]+]]:_(<2 x s64>) = G_FPEXT [[UV1]](<2 x s32>) |
| 60 | + ; CHECK-NEXT: [[UV2:%[0-9]+]]:_(s64), [[UV3:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[FPEXT1]](<2 x s64>) |
| 61 | + ; CHECK-NEXT: [[UV4:%[0-9]+]]:_(s64), [[UV5:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[FPEXT2]](<2 x s64>) |
| 62 | + ; CHECK-NEXT: $d0 = COPY [[UV2]](s64) |
| 63 | + ; CHECK-NEXT: $d1 = COPY [[UV3]](s64) |
| 64 | + ; CHECK-NEXT: $d2 = COPY [[UV4]](s64) |
| 65 | + ; CHECK-NEXT: RET_ReallyLR implicit $d0, implicit $d1, implicit $d2 |
| 66 | + %1:_(<4 x s16>) = COPY $d0 |
| 67 | + %2:_(s16), %3:_(s16), %4:_(s16), %5:_(s16) = G_UNMERGE_VALUES %1(<4 x s16>) |
| 68 | + %0:_(<3 x s16>) = G_BUILD_VECTOR %2(s16), %3(s16), %4(s16) |
| 69 | + %6:_(<3 x s64>) = G_FPEXT %0(<3 x s16>) |
| 70 | + %7:_(s64), %8:_(s64), %9:_(s64) = G_UNMERGE_VALUES %6(<3 x s64>) |
| 71 | + $d0 = COPY %7(s64) |
| 72 | + $d1 = COPY %8(s64) |
| 73 | + $d2 = COPY %9(s64) |
| 74 | + RET_ReallyLR implicit $d0, implicit $d1, implicit $d2 |
| 75 | +... |
| 76 | + |
| 77 | +--- |
| 78 | +name: fpext_v4f16_v4f64 |
| 79 | +body: | |
| 80 | + bb.0: |
| 81 | + liveins: $d0 |
| 82 | +
|
| 83 | + ; CHECK-LABEL: name: fpext_v4f16_v4f64 |
| 84 | + ; CHECK: liveins: $d0 |
| 85 | + ; CHECK-NEXT: {{ $}} |
| 86 | + ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $d0 |
| 87 | + ; CHECK-NEXT: [[FPEXT:%[0-9]+]]:_(<4 x s32>) = G_FPEXT [[COPY]](<4 x s16>) |
| 88 | + ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s32>), [[UV1:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[FPEXT]](<4 x s32>) |
| 89 | + ; CHECK-NEXT: [[FPEXT1:%[0-9]+]]:_(<2 x s64>) = G_FPEXT [[UV]](<2 x s32>) |
| 90 | + ; CHECK-NEXT: [[FPEXT2:%[0-9]+]]:_(<2 x s64>) = G_FPEXT [[UV1]](<2 x s32>) |
| 91 | + ; CHECK-NEXT: $q0 = COPY [[FPEXT1]](<2 x s64>) |
| 92 | + ; CHECK-NEXT: $q1 = COPY [[FPEXT2]](<2 x s64>) |
| 93 | + ; CHECK-NEXT: RET_ReallyLR implicit $q0, implicit $q1 |
| 94 | + %0:_(<4 x s16>) = COPY $d0 |
| 95 | + %1:_(<4 x s64>) = G_FPEXT %0(<4 x s16>) |
| 96 | + %2:_(<2 x s64>), %3:_(<2 x s64>) = G_UNMERGE_VALUES %1(<4 x s64>) |
| 97 | + $q0 = COPY %2(<2 x s64>) |
| 98 | + $q1 = COPY %3(<2 x s64>) |
| 99 | + RET_ReallyLR implicit $q0, implicit $q1 |
| 100 | +... |
| 101 | + |
| 102 | +--- |
| 103 | +name: fpext_v8f16_v8f64 |
| 104 | +body: | |
| 105 | + bb.0: |
| 106 | + liveins: $q0 |
| 107 | +
|
| 108 | + ; CHECK-LABEL: name: fpext_v8f16_v8f64 |
| 109 | + ; CHECK: liveins: $q0 |
| 110 | + ; CHECK-NEXT: {{ $}} |
| 111 | + ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<8 x s16>) = COPY $q0 |
| 112 | + ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<4 x s16>), [[UV1:%[0-9]+]]:_(<4 x s16>) = G_UNMERGE_VALUES [[COPY]](<8 x s16>) |
| 113 | + ; CHECK-NEXT: [[FPEXT:%[0-9]+]]:_(<4 x s32>) = G_FPEXT [[UV]](<4 x s16>) |
| 114 | + ; CHECK-NEXT: [[FPEXT1:%[0-9]+]]:_(<4 x s32>) = G_FPEXT [[UV1]](<4 x s16>) |
| 115 | + ; CHECK-NEXT: [[UV2:%[0-9]+]]:_(<2 x s32>), [[UV3:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[FPEXT]](<4 x s32>) |
| 116 | + ; CHECK-NEXT: [[UV4:%[0-9]+]]:_(<2 x s32>), [[UV5:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[FPEXT1]](<4 x s32>) |
| 117 | + ; CHECK-NEXT: [[FPEXT2:%[0-9]+]]:_(<2 x s64>) = G_FPEXT [[UV2]](<2 x s32>) |
| 118 | + ; CHECK-NEXT: [[FPEXT3:%[0-9]+]]:_(<2 x s64>) = G_FPEXT [[UV3]](<2 x s32>) |
| 119 | + ; CHECK-NEXT: [[FPEXT4:%[0-9]+]]:_(<2 x s64>) = G_FPEXT [[UV4]](<2 x s32>) |
| 120 | + ; CHECK-NEXT: [[FPEXT5:%[0-9]+]]:_(<2 x s64>) = G_FPEXT [[UV5]](<2 x s32>) |
| 121 | + ; CHECK-NEXT: $q0 = COPY [[FPEXT2]](<2 x s64>) |
| 122 | + ; CHECK-NEXT: $q1 = COPY [[FPEXT3]](<2 x s64>) |
| 123 | + ; CHECK-NEXT: $q2 = COPY [[FPEXT4]](<2 x s64>) |
| 124 | + ; CHECK-NEXT: $q3 = COPY [[FPEXT5]](<2 x s64>) |
| 125 | + ; CHECK-NEXT: RET_ReallyLR implicit $q0, implicit $q1, implicit $q2, implicit $q3 |
| 126 | + %0:_(<8 x s16>) = COPY $q0 |
| 127 | + %1:_(<8 x s64>) = G_FPEXT %0(<8 x s16>) |
| 128 | + %2:_(<2 x s64>), %3:_(<2 x s64>), %4:_(<2 x s64>), %5:_(<2 x s64>) = G_UNMERGE_VALUES %1(<8 x s64>) |
| 129 | + $q0 = COPY %2(<2 x s64>) |
| 130 | + $q1 = COPY %3(<2 x s64>) |
| 131 | + $q2 = COPY %4(<2 x s64>) |
| 132 | + $q3 = COPY %5(<2 x s64>) |
| 133 | + RET_ReallyLR implicit $q0, implicit $q1, implicit $q2, implicit $q3 |
| 134 | +... |
0 commit comments