1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple aarch64-unknown-unknown -verify-machineinstrs -run-pass=legalizer %s -o - | FileCheck %s --check-prefix=NO-FP16
3 # RUN: llc -mtriple aarch64-unknown-unknown -verify-machineinstrs -mattr=+fullfp16 -run-pass=legalizer %s -o - | FileCheck %s --check-prefix=FP16
7 tracksRegLiveness: true
10 ; NO-FP16-LABEL: name: fp16
11 ; NO-FP16: %cst:_(s16) = G_CONSTANT i16 0
12 ; NO-FP16-NEXT: $h0 = COPY %cst(s16)
13 ; NO-FP16-NEXT: RET_ReallyLR implicit $h0
14 ; FP16-LABEL: name: fp16
15 ; FP16: %cst:_(s16) = G_FCONSTANT half 0xH0000
16 ; FP16-NEXT: $h0 = COPY %cst(s16)
17 ; FP16-NEXT: RET_ReallyLR implicit $h0
18 %cst:_(s16) = G_FCONSTANT half 0.0
20 RET_ReallyLR implicit $h0
24 tracksRegLiveness: true
27 ; NO-FP16-LABEL: name: fp16_non_zero
28 ; NO-FP16: %cst:_(s16) = G_CONSTANT i16 16384
29 ; NO-FP16-NEXT: $h0 = COPY %cst(s16)
30 ; NO-FP16-NEXT: RET_ReallyLR implicit $h0
31 ; FP16-LABEL: name: fp16_non_zero
32 ; FP16: %cst:_(s16) = G_FCONSTANT half 0xH4000
33 ; FP16-NEXT: $h0 = COPY %cst(s16)
34 ; FP16-NEXT: RET_ReallyLR implicit $h0
35 %cst:_(s16) = G_FCONSTANT half 2.0
37 RET_ReallyLR implicit $h0
41 tracksRegLiveness: true
44 ; NO-FP16-LABEL: name: nan
45 ; NO-FP16: %cst:_(s16) = G_CONSTANT i16 31745
46 ; NO-FP16-NEXT: %ext:_(s32) = G_FPEXT %cst(s16)
47 ; NO-FP16-NEXT: $w0 = COPY %ext(s32)
48 ; NO-FP16-NEXT: RET_ReallyLR implicit $w0
49 ; FP16-LABEL: name: nan
50 ; FP16: %cst:_(s16) = G_FCONSTANT half 0xH7C01
51 ; FP16-NEXT: %ext:_(s32) = G_FPEXT %cst(s16)
52 ; FP16-NEXT: $w0 = COPY %ext(s32)
53 ; FP16-NEXT: RET_ReallyLR implicit $w0
54 %cst:_(s16) = G_FCONSTANT half 0xH7C01
55 %ext:_(s32) = G_FPEXT %cst(s16)
57 RET_ReallyLR implicit $w0