1 ; RUN: llc -O0 -fast-isel -verify-machineinstrs -mtriple=arm64-eabi < %s | FileCheck --enable-var-scope %s
4 define i32 @fptosi_wh(half %a) nounwind ssp {
6 ; CHECK-LABEL: fptosi_wh
8 ; CHECK: fcvtzs [[REG:w[0-9]+]], s1
9 ; CHECK: mov w0, [[REG]]
10 %conv = fptosi half %a to i32
15 define i32 @fptoui_swh(half %a) nounwind ssp {
17 ; CHECK-LABEL: fptoui_swh
19 ; CHECK: fcvtzu [[REG:w[0-9]+]], s1
20 ; CHECK: mov w0, [[REG]]
21 %conv = fptoui half %a to i32
26 define half @sitofp_hw_i1(i1 %a) nounwind ssp {
28 ; CHECK-LABEL: sitofp_hw_i1
29 ; CHECK: sbfx w8, w0, #0, #1
32 %conv = sitofp i1 %a to half
37 define half @sitofp_hw_i8(i8 %a) nounwind ssp {
39 ; CHECK-LABEL: sitofp_hw_i8
43 %conv = sitofp i8 %a to half
48 define half @sitofp_hw_i16(i16 %a) nounwind ssp {
50 ; CHECK-LABEL: sitofp_hw_i16
54 %conv = sitofp i16 %a to half
59 define half @sitofp_hw_i32(i32 %a) nounwind ssp {
61 ; CHECK-LABEL: sitofp_hw_i32
64 %conv = sitofp i32 %a to half
69 define half @sitofp_hx(i64 %a) nounwind ssp {
71 ; CHECK-LABEL: sitofp_hx
74 %conv = sitofp i64 %a to half
79 define half @uitofp_hw_i1(i1 %a) nounwind ssp {
81 ; CHECK-LABEL: uitofp_hw_i1
82 ; CHECK: and w8, w0, #0x1
85 %conv = uitofp i1 %a to half
90 define half @uitofp_hw_i8(i8 %a) nounwind ssp {
92 ; CHECK-LABEL: uitofp_hw_i8
93 ; CHECK: and w8, w0, #0xff
96 %conv = uitofp i8 %a to half
101 define half @uitofp_hw_i16(i16 %a) nounwind ssp {
103 ; CHECK-LABEL: uitofp_hw_i16
104 ; CHECK: and w8, w0, #0xffff
105 ; CHECK: ucvtf s0, w8
107 %conv = uitofp i16 %a to half
112 define half @uitofp_hw_i32(i32 %a) nounwind ssp {
114 ; CHECK-LABEL: uitofp_hw_i32
115 ; CHECK: ucvtf s0, w0
117 %conv = uitofp i32 %a to half
122 define half @uitofp_hx(i64 %a) nounwind ssp {
124 ; CHECK-LABEL: uitofp_hx
125 ; CHECK: ucvtf s0, x0
127 %conv = uitofp i64 %a to half