reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    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
  171
  172
  173
  174
  175
  176
  177
  178
  179
  180
  181
  182
  183
  184
  185
  186
  187
  188
  189
  190
  191
  192
  193
  194
  195
  196
  197
  198
  199
  200
  201
  202
  203
  204
  205
  206
  207
  208
  209
  210
  211
  212
  213
  214
  215
  216
  217
  218
  219
  220
  221
  222
  223
  224
  225
  226
  227
  228
  229
  230
  231
  232
  233
  234
  235
  236
  237
  238
  239
  240
  241
  242
  243
  244
  245
  246
  247
  248
  249
  250
  251
  252
  253
  254
  255
  256
  257
  258
  259
  260
  261
  262
  263
  264
  265
  266
  267
  268
  269
  270
  271
  272
  273
  274
  275
  276
  277
  278
  279
  280
  281
  282
  283
  284
  285
  286
  287
  288
  289
  290
  291
  292
  293
  294
  295
  296
  297
  298
  299
  300
  301
  302
  303
  304
  305
  306
  307
  308
  309
  310
  311
  312
  313
  314
  315
  316
  317
  318
; RUN: llc < %s -mtriple=aarch64-eabi -mattr=+v8.2a,+fullfp16  | FileCheck %s

declare i64 @llvm.aarch64.neon.fcvtpu.i64.f16(half)
declare i32 @llvm.aarch64.neon.fcvtpu.i32.f16(half)
declare i64 @llvm.aarch64.neon.fcvtps.i64.f16(half)
declare i32 @llvm.aarch64.neon.fcvtps.i32.f16(half)
declare i64 @llvm.aarch64.neon.fcvtnu.i64.f16(half)
declare i32 @llvm.aarch64.neon.fcvtnu.i32.f16(half)
declare i64 @llvm.aarch64.neon.fcvtns.i64.f16(half)
declare i32 @llvm.aarch64.neon.fcvtns.i32.f16(half)
declare i64 @llvm.aarch64.neon.fcvtmu.i64.f16(half)
declare i32 @llvm.aarch64.neon.fcvtmu.i32.f16(half)
declare i64 @llvm.aarch64.neon.fcvtms.i64.f16(half)
declare i32 @llvm.aarch64.neon.fcvtms.i32.f16(half)
declare i64 @llvm.aarch64.neon.fcvtau.i64.f16(half)
declare i32 @llvm.aarch64.neon.fcvtau.i32.f16(half)
declare i64 @llvm.aarch64.neon.fcvtas.i64.f16(half)
declare i32 @llvm.aarch64.neon.fcvtas.i32.f16(half)
declare half @llvm.aarch64.neon.frsqrte.f16(half)
declare half @llvm.aarch64.neon.frecpx.f16(half)
declare half @llvm.aarch64.neon.frecpe.f16(half)

define dso_local i16 @t2(half %a) {
; CHECK-LABEL: t2:
; CHECK:         fcmp h0, #0.0
; CHECK-NEXT:    csetm w0, eq
; CHECK-NEXT:    ret
entry:
  %0 = fcmp oeq half %a, 0xH0000
  %vceqz = sext i1 %0 to i16
  ret i16 %vceqz
}

define dso_local i16 @t3(half %a) {
; CHECK-LABEL: t3:
; CHECK:         fcmp h0, #0.0
; CHECK-NEXT:    csetm w0, ge
; CHECK-NEXT:    ret
entry:
  %0 = fcmp oge half %a, 0xH0000
  %vcgez = sext i1 %0 to i16
  ret i16 %vcgez
}

define dso_local i16 @t4(half %a) {
; CHECK-LABEL: t4:
; CHECK:         fcmp h0, #0.0
; CHECK-NEXT:    csetm w0, gt
; CHECK-NEXT:    ret
entry:
  %0 = fcmp ogt half %a, 0xH0000
  %vcgtz = sext i1 %0 to i16
  ret i16 %vcgtz
}

define dso_local i16 @t5(half %a) {
; CHECK-LABEL: t5:
; CHECK:         fcmp h0, #0.0
; CHECK-NEXT:    csetm w0, ls
; CHECK-NEXT:    ret
entry:
  %0 = fcmp ole half %a, 0xH0000
  %vclez = sext i1 %0 to i16
  ret i16 %vclez
}

define dso_local i16 @t6(half %a) {
; CHECK-LABEL: t6:
; CHECK:         fcmp h0, #0.0
; CHECK-NEXT:    csetm w0, mi
; CHECK-NEXT:    ret
entry:
  %0 = fcmp olt half %a, 0xH0000
  %vcltz = sext i1 %0 to i16
  ret i16 %vcltz
}

define dso_local half @t8(i32 %a) {
; CHECK-LABEL: t8:
; CHECK:         scvtf h0, w0
; CHECK-NEXT:    ret
entry:
  %0 = sitofp i32 %a to half
  ret half %0
}

define dso_local half @t9(i64 %a) {
; CHECK-LABEL: t9:
; CHECK:         scvtf h0, x0
; CHECK-NEXT:    ret
entry:
  %0 = sitofp i64 %a to half
  ret half %0
}

define dso_local half @t12(i64 %a) {
; CHECK-LABEL: t12:
; CHECK:         ucvtf h0, x0
; CHECK-NEXT:    ret
entry:
  %0 = uitofp i64 %a to half
  ret half %0
}

define dso_local i16 @t13(half %a) {
; CHECK-LABEL: t13:
; CHECK:         fcvtzs w0, h0
; CHECK-NEXT:    ret
entry:
  %0 = fptosi half %a to i16
  ret i16 %0
}

define dso_local i64 @t15(half %a) {
; CHECK-LABEL: t15:
; CHECK:         fcvtzs x0, h0
; CHECK-NEXT:    ret
entry:
  %0 = fptosi half %a to i64
  ret i64 %0
}

define dso_local i16 @t16(half %a) {
; CHECK-LABEL: t16:
; CHECK:         fcvtzs w0, h0
; CHECK-NEXT:    ret
entry:
  %0 = fptoui half %a to i16
  ret i16 %0
}

define dso_local i64 @t18(half %a) {
; CHECK-LABEL: t18:
; CHECK:         fcvtzu x0, h0
; CHECK-NEXT:    ret
entry:
  %0 = fptoui half %a to i64
  ret i64 %0
}

define dso_local i16 @t19(half %a) {
; CHECK-LABEL: t19:
; CHECK:         fcvtas w0, h0
; CHECK-NEXT:    ret
entry:
  %fcvt = tail call i32 @llvm.aarch64.neon.fcvtas.i32.f16(half %a)
  %0 = trunc i32 %fcvt to i16
  ret i16 %0
}

define dso_local i64 @t21(half %a) {
; CHECK-LABEL: t21:
; CHECK:         fcvtas x0, h0
; CHECK-NEXT:    ret
entry:
  %vcvtah_s64_f16 = tail call i64 @llvm.aarch64.neon.fcvtas.i64.f16(half %a)
  ret i64 %vcvtah_s64_f16
}

define dso_local i16 @t22(half %a) {
; CHECK-LABEL: t22:
; CHECK:         fcvtau w0, h0
; CHECK-NEXT:    ret
entry:
  %fcvt = tail call i32 @llvm.aarch64.neon.fcvtau.i32.f16(half %a)
  %0 = trunc i32 %fcvt to i16
  ret i16 %0
}

define dso_local i64 @t24(half %a) {
; CHECK-LABEL: t24:
; CHECK:         fcvtau x0, h0
; CHECK-NEXT:    ret
entry:
  %vcvtah_u64_f16 = tail call i64 @llvm.aarch64.neon.fcvtau.i64.f16(half %a)
  ret i64 %vcvtah_u64_f16
}

define dso_local i16 @t25(half %a) {
; CHECK-LABEL: t25:
; CHECK:         fcvtms w0, h0
; CHECK-NEXT:    ret
entry:
  %fcvt = tail call i32 @llvm.aarch64.neon.fcvtms.i32.f16(half %a)
  %0 = trunc i32 %fcvt to i16
  ret i16 %0
}

define dso_local i64 @t27(half %a) {
; CHECK-LABEL: t27:
; CHECK:         fcvtms x0, h0
; CHECK-NEXT:    ret
entry:
  %vcvtmh_s64_f16 = tail call i64 @llvm.aarch64.neon.fcvtms.i64.f16(half %a)
  ret i64 %vcvtmh_s64_f16
}

define dso_local i16 @t28(half %a) {
; CHECK-LABEL: t28:
; CHECK:         fcvtmu w0, h0
; CHECK-NEXT:    ret
entry:
  %fcvt = tail call i32 @llvm.aarch64.neon.fcvtmu.i32.f16(half %a)
  %0 = trunc i32 %fcvt to i16
  ret i16 %0
}

define dso_local i64 @t30(half %a) {
; CHECK-LABEL: t30:
; CHECK:         fcvtmu x0, h0
; CHECK-NEXT:    ret
entry:
  %vcvtmh_u64_f16 = tail call i64 @llvm.aarch64.neon.fcvtmu.i64.f16(half %a)
  ret i64 %vcvtmh_u64_f16
}

define dso_local i16 @t31(half %a) {
; CHECK-LABEL: t31:
; CHECK:         fcvtns w0, h0
; CHECK-NEXT:    ret
entry:
  %fcvt = tail call i32 @llvm.aarch64.neon.fcvtns.i32.f16(half %a)
  %0 = trunc i32 %fcvt to i16
  ret i16 %0
}

define dso_local i64 @t33(half %a) {
; CHECK-LABEL: t33:
; CHECK:         fcvtns x0, h0
; CHECK-NEXT:    ret
entry:
  %vcvtnh_s64_f16 = tail call i64 @llvm.aarch64.neon.fcvtns.i64.f16(half %a)
  ret i64 %vcvtnh_s64_f16
}

define dso_local i16 @t34(half %a) {
; CHECK-LABEL: t34:
; CHECK:         fcvtnu w0, h0
; CHECK-NEXT:    ret
entry:
  %fcvt = tail call i32 @llvm.aarch64.neon.fcvtnu.i32.f16(half %a)
  %0 = trunc i32 %fcvt to i16
  ret i16 %0
}

define dso_local i64 @t36(half %a) {
; CHECK-LABEL: t36:
; CHECK:         fcvtnu x0, h0
; CHECK-NEXT:    ret
entry:
  %vcvtnh_u64_f16 = tail call i64 @llvm.aarch64.neon.fcvtnu.i64.f16(half %a)
  ret i64 %vcvtnh_u64_f16
}

define dso_local i16 @t37(half %a) {
; CHECK-LABEL: t37:
; CHECK:         fcvtps w0, h0
; CHECK-NEXT:    ret
entry:
  %fcvt = tail call i32 @llvm.aarch64.neon.fcvtps.i32.f16(half %a)
  %0 = trunc i32 %fcvt to i16
  ret i16 %0
}

define dso_local i64 @t39(half %a) {
; CHECK-LABEL: t39:
; CHECK:         fcvtps x0, h0
; CHECK-NEXT:    ret
entry:
  %vcvtph_s64_f16 = tail call i64 @llvm.aarch64.neon.fcvtps.i64.f16(half %a)
  ret i64 %vcvtph_s64_f16
}

define dso_local i16 @t40(half %a) {
; CHECK-LABEL: t40:
; CHECK:         fcvtpu w0, h0
; CHECK-NEXT:    ret
entry:
  %fcvt = tail call i32 @llvm.aarch64.neon.fcvtpu.i32.f16(half %a)
  %0 = trunc i32 %fcvt to i16
  ret i16 %0
}

define dso_local i64 @t42(half %a) {
; CHECK-LABEL: t42:
; CHECK:         fcvtpu x0, h0
; CHECK-NEXT:    ret
entry:
  %vcvtph_u64_f16 = tail call i64 @llvm.aarch64.neon.fcvtpu.i64.f16(half %a)
  ret i64 %vcvtph_u64_f16
}

define dso_local half @t44(half %a) {
; CHECK-LABEL: t44:
; CHECK:         frecpe h0, h0
; CHECK-NEXT:    ret
entry:
  %vrecpeh_f16 = tail call half @llvm.aarch64.neon.frecpe.f16(half %a)
  ret half %vrecpeh_f16
}

define dso_local half @t45(half %a) {
; CHECK-LABEL: t45:
; CHECK:         frecpx h0, h0
; CHECK-NEXT:    ret
entry:
  %vrecpxh_f16 = tail call half @llvm.aarch64.neon.frecpx.f16(half %a)
  ret half %vrecpxh_f16
}

define dso_local half @t53(half %a) {
; CHECK-LABEL: t53:
; CHECK:         frsqrte h0, h0
; CHECK-NEXT:    ret
entry:
  %vrsqrteh_f16 = tail call half @llvm.aarch64.neon.frsqrte.f16(half %a)
  ret half %vrsqrteh_f16
}