|
| 1 | +# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py |
| 2 | +# RUN: llc -o - -mtriple=aarch64-unknown-unknown -run-pass=aarch64-prelegalizer-combiner -verify-machineinstrs %s | FileCheck %s |
| 3 | + |
| 4 | +--- |
| 5 | +name: fpowi_s64_zero |
| 6 | +body: | |
| 7 | + bb.0: |
| 8 | + liveins: $d0, $w0 |
| 9 | +
|
| 10 | + ; CHECK-LABEL: name: fpowi_s64_zero |
| 11 | + ; CHECK: liveins: $d0, $w0 |
| 12 | + ; CHECK-NEXT: {{ $}} |
| 13 | + ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_FCONSTANT double 1.000000e+00 |
| 14 | + ; CHECK-NEXT: $d0 = COPY [[C]](s64) |
| 15 | + %0:_(s64) = COPY $d0 |
| 16 | + %1:_(s32) = COPY $w0 |
| 17 | + %2:_(s32) = G_CONSTANT i32 0 |
| 18 | + %3:_(s64) = nnan ninf nsz arcp contract afn reassoc G_FPOWI %0, %2(s32) |
| 19 | + $d0 = COPY %3(s64) |
| 20 | +... |
| 21 | + |
| 22 | +--- |
| 23 | +name: fpowi_s32_zero |
| 24 | +body: | |
| 25 | + bb.0: |
| 26 | + liveins: $d0, $w0 |
| 27 | +
|
| 28 | + ; CHECK-LABEL: name: fpowi_s32_zero |
| 29 | + ; CHECK: liveins: $d0, $w0 |
| 30 | + ; CHECK-NEXT: {{ $}} |
| 31 | + ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_FCONSTANT float 1.000000e+00 |
| 32 | + ; CHECK-NEXT: $s0 = COPY [[C]](s32) |
| 33 | + %0:_(s32) = COPY $s0 |
| 34 | + %1:_(s32) = COPY $w0 |
| 35 | + %2:_(s32) = G_CONSTANT i32 0 |
| 36 | + %3:_(s32) = nnan ninf nsz arcp contract afn reassoc G_FPOWI %0, %2(s32) |
| 37 | + $s0 = COPY %3(s32) |
| 38 | +... |
| 39 | + |
| 40 | +--- |
| 41 | +name: fpowi_positive |
| 42 | +body: | |
| 43 | + bb.0: |
| 44 | + liveins: $d0, $w0 |
| 45 | +
|
| 46 | + ; CHECK-LABEL: name: fpowi_positive |
| 47 | + ; CHECK: liveins: $d0, $w0 |
| 48 | + ; CHECK-NEXT: {{ $}} |
| 49 | + ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $d0 |
| 50 | + ; CHECK-NEXT: [[FMUL:%[0-9]+]]:_(s64) = nnan ninf nsz arcp contract afn reassoc G_FMUL [[COPY]], [[COPY]] |
| 51 | + ; CHECK-NEXT: [[FMUL1:%[0-9]+]]:_(s64) = nnan ninf nsz arcp contract afn reassoc G_FMUL [[FMUL]], [[COPY]] |
| 52 | + ; CHECK-NEXT: [[FMUL2:%[0-9]+]]:_(s64) = nnan ninf nsz arcp contract afn reassoc G_FMUL [[FMUL1]], [[COPY]] |
| 53 | + ; CHECK-NEXT: [[FMUL3:%[0-9]+]]:_(s64) = nnan ninf nsz arcp contract afn reassoc G_FMUL [[FMUL2]], [[COPY]] |
| 54 | + ; CHECK-NEXT: $d0 = COPY [[FMUL3]](s64) |
| 55 | + %0:_(s64) = COPY $d0 |
| 56 | + %1:_(s32) = COPY $w0 |
| 57 | + %2:_(s32) = G_CONSTANT i32 5 |
| 58 | + %3:_(s64) = nnan ninf nsz arcp contract afn reassoc G_FPOWI %0, %2(s32) |
| 59 | + $d0 = COPY %3(s64) |
| 60 | +... |
| 61 | + |
| 62 | +--- |
| 63 | +name: fpowi_s64_negative |
| 64 | +body: | |
| 65 | + bb.0: |
| 66 | + liveins: $d0, $w0 |
| 67 | +
|
| 68 | + ; CHECK-LABEL: name: fpowi_s64_negative |
| 69 | + ; CHECK: liveins: $d0, $w0 |
| 70 | + ; CHECK-NEXT: {{ $}} |
| 71 | + ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $d0 |
| 72 | + ; CHECK-NEXT: [[FMUL:%[0-9]+]]:_(s64) = nnan ninf nsz arcp contract afn reassoc G_FMUL [[COPY]], [[COPY]] |
| 73 | + ; CHECK-NEXT: [[FMUL1:%[0-9]+]]:_(s64) = nnan ninf nsz arcp contract afn reassoc G_FMUL [[FMUL]], [[COPY]] |
| 74 | + ; CHECK-NEXT: [[FMUL2:%[0-9]+]]:_(s64) = nnan ninf nsz arcp contract afn reassoc G_FMUL [[FMUL1]], [[COPY]] |
| 75 | + ; CHECK-NEXT: [[FMUL3:%[0-9]+]]:_(s64) = nnan ninf nsz arcp contract afn reassoc G_FMUL [[FMUL2]], [[COPY]] |
| 76 | + ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_FCONSTANT double 1.000000e+00 |
| 77 | + ; CHECK-NEXT: [[FDIV:%[0-9]+]]:_(s64) = nnan ninf nsz arcp contract afn reassoc G_FDIV [[C]], [[FMUL3]] |
| 78 | + ; CHECK-NEXT: $d0 = COPY [[FDIV]](s64) |
| 79 | + %0:_(s64) = COPY $d0 |
| 80 | + %1:_(s32) = COPY $w0 |
| 81 | + %2:_(s32) = G_CONSTANT i32 -5 |
| 82 | + %3:_(s64) = nnan ninf nsz arcp contract afn reassoc G_FPOWI %0, %2(s32) |
| 83 | + $d0 = COPY %3(s64) |
| 84 | +... |
| 85 | + |
| 86 | +--- |
| 87 | +name: fpowi_s32_negative |
| 88 | +body: | |
| 89 | + bb.0: |
| 90 | + liveins: $d0, $w0 |
| 91 | +
|
| 92 | + ; CHECK-LABEL: name: fpowi_s32_negative |
| 93 | + ; CHECK: liveins: $d0, $w0 |
| 94 | + ; CHECK-NEXT: {{ $}} |
| 95 | + ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $s0 |
| 96 | + ; CHECK-NEXT: [[FMUL:%[0-9]+]]:_(s32) = nnan ninf nsz arcp contract afn reassoc G_FMUL [[COPY]], [[COPY]] |
| 97 | + ; CHECK-NEXT: [[FMUL1:%[0-9]+]]:_(s32) = nnan ninf nsz arcp contract afn reassoc G_FMUL [[FMUL]], [[COPY]] |
| 98 | + ; CHECK-NEXT: [[FMUL2:%[0-9]+]]:_(s32) = nnan ninf nsz arcp contract afn reassoc G_FMUL [[FMUL1]], [[COPY]] |
| 99 | + ; CHECK-NEXT: [[FMUL3:%[0-9]+]]:_(s32) = nnan ninf nsz arcp contract afn reassoc G_FMUL [[FMUL2]], [[COPY]] |
| 100 | + ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_FCONSTANT float 1.000000e+00 |
| 101 | + ; CHECK-NEXT: [[FDIV:%[0-9]+]]:_(s32) = nnan ninf nsz arcp contract afn reassoc G_FDIV [[C]], [[FMUL3]] |
| 102 | + ; CHECK-NEXT: $s0 = COPY [[FDIV]](s32) |
| 103 | + %0:_(s32) = COPY $s0 |
| 104 | + %1:_(s32) = COPY $w0 |
| 105 | + %2:_(s32) = G_CONSTANT i32 -5 |
| 106 | + %3:_(s32) = nnan ninf nsz arcp contract afn reassoc G_FPOWI %0, %2(s32) |
| 107 | + $s0 = COPY %3(s32) |
| 108 | +... |
| 109 | + |
| 110 | +--- |
| 111 | +name: fpowi_libcall |
| 112 | +body: | |
| 113 | + bb.0: |
| 114 | + liveins: $d0, $w0 |
| 115 | +
|
| 116 | + ; CHECK-LABEL: name: fpowi_libcall |
| 117 | + ; CHECK: liveins: $d0, $w0 |
| 118 | + ; CHECK-NEXT: {{ $}} |
| 119 | + ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $d0 |
| 120 | + ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w0 |
| 121 | + ; CHECK-NEXT: [[FPOWI:%[0-9]+]]:_(s64) = nnan ninf nsz arcp contract afn reassoc G_FPOWI [[COPY]], [[COPY1]](s32) |
| 122 | + ; CHECK-NEXT: $d0 = COPY [[FPOWI]](s64) |
| 123 | + %0:_(s64) = COPY $d0 |
| 124 | + %1:_(s32) = COPY $w0 |
| 125 | + %2:_(s64) = nnan ninf nsz arcp contract afn reassoc G_FPOWI %0, %1(s32) |
| 126 | + $d0 = COPY %2(s64) |
| 127 | +... |
0 commit comments