1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
; RUN: llc -mtriple=aarch64-unknown-linux-gnu -global-isel=0 %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-SD
; RUN: llc -mtriple=aarch64-unknown-linux-gnu -global-isel=1 %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-GI
define fp128 @fabs_f128(fp128 %a) {
; CHECK-SD-LABEL: fabs_f128:
; CHECK-SD: // %bb.0: // %entry
; CHECK-SD-NEXT: str q0, [sp, #-16]!
; CHECK-SD-NEXT: .cfi_def_cfa_offset 16
; CHECK-SD-NEXT: ldrb w8, [sp, #15]
; CHECK-SD-NEXT: and w8, w8, #0x7f
; CHECK-SD-NEXT: strb w8, [sp, #15]
; CHECK-SD-NEXT: ldr q0, [sp], #16
; CHECK-SD-NEXT: ret
;
; CHECK-GI-LABEL: fabs_f128:
; CHECK-GI: // %bb.0: // %entry
; CHECK-GI-NEXT: mov x8, v0.d[1]
; CHECK-GI-NEXT: mov v0.d[0], v0.d[0]
; CHECK-GI-NEXT: and x8, x8, #0x7fffffffffffffff
; CHECK-GI-NEXT: mov v0.d[1], x8
; CHECK-GI-NEXT: ret
entry:
%c = call fp128 @llvm.fabs.f128(fp128 %a)
ret fp128 %c
}
define <1 x fp128> @fabs_v1f128(<1 x fp128> %a) {
; CHECK-SD-LABEL: fabs_v1f128:
; CHECK-SD: // %bb.0: // %entry
; CHECK-SD-NEXT: str q0, [sp, #-16]!
; CHECK-SD-NEXT: .cfi_def_cfa_offset 16
; CHECK-SD-NEXT: ldrb w8, [sp, #15]
; CHECK-SD-NEXT: and w8, w8, #0x7f
; CHECK-SD-NEXT: strb w8, [sp, #15]
; CHECK-SD-NEXT: ldr q0, [sp], #16
; CHECK-SD-NEXT: ret
;
; CHECK-GI-LABEL: fabs_v1f128:
; CHECK-GI: // %bb.0: // %entry
; CHECK-GI-NEXT: mov x8, v0.d[1]
; CHECK-GI-NEXT: mov v0.d[0], v0.d[0]
; CHECK-GI-NEXT: and x8, x8, #0x7fffffffffffffff
; CHECK-GI-NEXT: mov v0.d[1], x8
; CHECK-GI-NEXT: ret
entry:
%c = call <1 x fp128> @llvm.fabs.v1f128(<1 x fp128> %a)
ret <1 x fp128> %c
}
define <2 x fp128> @fabs_v2f128(<2 x fp128> %a) {
; CHECK-SD-LABEL: fabs_v2f128:
; CHECK-SD: // %bb.0: // %entry
; CHECK-SD-NEXT: stp q0, q1, [sp, #-32]!
; CHECK-SD-NEXT: .cfi_def_cfa_offset 32
; CHECK-SD-NEXT: ldrb w8, [sp, #15]
; CHECK-SD-NEXT: and w8, w8, #0x7f
; CHECK-SD-NEXT: strb w8, [sp, #15]
; CHECK-SD-NEXT: ldrb w8, [sp, #31]
; CHECK-SD-NEXT: and w8, w8, #0x7f
; CHECK-SD-NEXT: strb w8, [sp, #31]
; CHECK-SD-NEXT: ldp q0, q1, [sp], #32
; CHECK-SD-NEXT: ret
;
; CHECK-GI-LABEL: fabs_v2f128:
; CHECK-GI: // %bb.0: // %entry
; CHECK-GI-NEXT: mov x8, v0.d[1]
; CHECK-GI-NEXT: mov x9, v1.d[1]
; CHECK-GI-NEXT: mov v0.d[0], v0.d[0]
; CHECK-GI-NEXT: mov v1.d[0], v1.d[0]
; CHECK-GI-NEXT: and x8, x8, #0x7fffffffffffffff
; CHECK-GI-NEXT: and x9, x9, #0x7fffffffffffffff
; CHECK-GI-NEXT: mov v0.d[1], x8
; CHECK-GI-NEXT: mov v1.d[1], x9
; CHECK-GI-NEXT: ret
entry:
%c = call <2 x fp128> @llvm.fabs.v2f128(<2 x fp128> %a)
ret <2 x fp128> %c
}
define <3 x fp128> @fabs_v3f128(<3 x fp128> %a) {
; CHECK-SD-LABEL: fabs_v3f128:
; CHECK-SD: // %bb.0: // %entry
; CHECK-SD-NEXT: stp q0, q1, [sp, #-48]!
; CHECK-SD-NEXT: .cfi_def_cfa_offset 48
; CHECK-SD-NEXT: ldrb w8, [sp, #15]
; CHECK-SD-NEXT: str q2, [sp, #32]
; CHECK-SD-NEXT: and w8, w8, #0x7f
; CHECK-SD-NEXT: strb w8, [sp, #15]
; CHECK-SD-NEXT: ldrb w8, [sp, #31]
; CHECK-SD-NEXT: and w8, w8, #0x7f
; CHECK-SD-NEXT: strb w8, [sp, #31]
; CHECK-SD-NEXT: ldrb w8, [sp, #47]
; CHECK-SD-NEXT: ldp q0, q1, [sp]
; CHECK-SD-NEXT: and w8, w8, #0x7f
; CHECK-SD-NEXT: strb w8, [sp, #47]
; CHECK-SD-NEXT: ldr q2, [sp, #32]
; CHECK-SD-NEXT: add sp, sp, #48
; CHECK-SD-NEXT: ret
;
; CHECK-GI-LABEL: fabs_v3f128:
; CHECK-GI: // %bb.0: // %entry
; CHECK-GI-NEXT: mov x8, v0.d[1]
; CHECK-GI-NEXT: mov x9, v1.d[1]
; CHECK-GI-NEXT: mov x10, v2.d[1]
; CHECK-GI-NEXT: mov v0.d[0], v0.d[0]
; CHECK-GI-NEXT: mov v1.d[0], v1.d[0]
; CHECK-GI-NEXT: mov v2.d[0], v2.d[0]
; CHECK-GI-NEXT: and x8, x8, #0x7fffffffffffffff
; CHECK-GI-NEXT: and x9, x9, #0x7fffffffffffffff
; CHECK-GI-NEXT: and x10, x10, #0x7fffffffffffffff
; CHECK-GI-NEXT: mov v0.d[1], x8
; CHECK-GI-NEXT: mov v1.d[1], x9
; CHECK-GI-NEXT: mov v2.d[1], x10
; CHECK-GI-NEXT: ret
entry:
%c = call <3 x fp128> @llvm.fabs.v3f128(<3 x fp128> %a)
ret <3 x fp128> %c
}
define <4 x fp128> @fabs_v4f128(<4 x fp128> %a) {
; CHECK-SD-LABEL: fabs_v4f128:
; CHECK-SD: // %bb.0: // %entry
; CHECK-SD-NEXT: stp q0, q1, [sp, #-64]!
; CHECK-SD-NEXT: .cfi_def_cfa_offset 64
; CHECK-SD-NEXT: ldrb w8, [sp, #15]
; CHECK-SD-NEXT: stp q2, q3, [sp, #32]
; CHECK-SD-NEXT: and w8, w8, #0x7f
; CHECK-SD-NEXT: strb w8, [sp, #15]
; CHECK-SD-NEXT: ldrb w8, [sp, #31]
; CHECK-SD-NEXT: and w8, w8, #0x7f
; CHECK-SD-NEXT: strb w8, [sp, #31]
; CHECK-SD-NEXT: ldrb w8, [sp, #47]
; CHECK-SD-NEXT: ldp q0, q1, [sp]
; CHECK-SD-NEXT: and w8, w8, #0x7f
; CHECK-SD-NEXT: strb w8, [sp, #47]
; CHECK-SD-NEXT: ldrb w8, [sp, #63]
; CHECK-SD-NEXT: and w8, w8, #0x7f
; CHECK-SD-NEXT: strb w8, [sp, #63]
; CHECK-SD-NEXT: ldp q2, q3, [sp, #32]
; CHECK-SD-NEXT: add sp, sp, #64
; CHECK-SD-NEXT: ret
;
; CHECK-GI-LABEL: fabs_v4f128:
; CHECK-GI: // %bb.0: // %entry
; CHECK-GI-NEXT: mov x8, v0.d[1]
; CHECK-GI-NEXT: mov v7.d[0], v0.d[0]
; CHECK-GI-NEXT: mov x9, v1.d[1]
; CHECK-GI-NEXT: mov x10, v2.d[1]
; CHECK-GI-NEXT: mov x11, v3.d[1]
; CHECK-GI-NEXT: mov v1.d[0], v1.d[0]
; CHECK-GI-NEXT: mov v2.d[0], v2.d[0]
; CHECK-GI-NEXT: mov v3.d[0], v3.d[0]
; CHECK-GI-NEXT: and x8, x8, #0x7fffffffffffffff
; CHECK-GI-NEXT: mov v7.d[1], x8
; CHECK-GI-NEXT: and x8, x9, #0x7fffffffffffffff
; CHECK-GI-NEXT: and x9, x10, #0x7fffffffffffffff
; CHECK-GI-NEXT: and x10, x11, #0x7fffffffffffffff
; CHECK-GI-NEXT: mov v1.d[1], x8
; CHECK-GI-NEXT: mov v2.d[1], x9
; CHECK-GI-NEXT: mov v3.d[1], x10
; CHECK-GI-NEXT: mov v0.16b, v7.16b
; CHECK-GI-NEXT: ret
entry:
%c = call <4 x fp128> @llvm.fabs.v4f128(<4 x fp128> %a)
ret <4 x fp128> %c
}
;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
; CHECK: {{.*}}
|