1 ; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 ; RUN: llc -global-isel -mtriple=aarch64-unknown-unknown -stop-after=irtranslator -verify-machineinstrs -o - %s | FileCheck %s
3 declare i1 @llvm.isnan.f16(half)
4 declare <4 x i1> @llvm.isnan.v4f16(<4 x half>)
6 define i1 @s16(half %x) {
7 ; CHECK-LABEL: name: s16
8 ; CHECK: bb.1 (%ir-block.0):
10 ; CHECK: [[COPY:%[0-9]+]]:_(s16) = COPY $h0
11 ; CHECK: %1:_(s1) = nofpexcept G_ISNAN [[COPY]](s16)
12 ; CHECK: [[ZEXT:%[0-9]+]]:_(s8) = G_ZEXT %1(s1)
13 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[ZEXT]](s8)
14 ; CHECK: $w0 = COPY [[ANYEXT]](s32)
15 ; CHECK: RET_ReallyLR implicit $w0
16 %isnan = tail call i1 @llvm.isnan.f16(half %x)
20 define <4 x i1> @v4s16(<4 x half> %x) {
21 ; CHECK-LABEL: name: v4s16
22 ; CHECK: bb.1 (%ir-block.0):
24 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $d0
25 ; CHECK: %1:_(<4 x s1>) = nofpexcept G_ISNAN [[COPY]](<4 x s16>)
26 ; CHECK: [[ANYEXT:%[0-9]+]]:_(<4 x s16>) = G_ANYEXT %1(<4 x s1>)
27 ; CHECK: $d0 = COPY [[ANYEXT]](<4 x s16>)
28 ; CHECK: RET_ReallyLR implicit $d0
29 %isnan = tail call <4 x i1> @llvm.isnan.v4f16(<4 x half> %x)
33 define i1 @strictfp(half %x) strictfp {
34 ; CHECK-LABEL: name: strictfp
35 ; CHECK: bb.1 (%ir-block.0):
37 ; CHECK: [[COPY:%[0-9]+]]:_(s16) = COPY $h0
38 ; CHECK: [[ISNAN:%[0-9]+]]:_(s1) = G_ISNAN [[COPY]](s16)
39 ; CHECK: [[ZEXT:%[0-9]+]]:_(s8) = G_ZEXT [[ISNAN]](s1)
40 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[ZEXT]](s8)
41 ; CHECK: $w0 = COPY [[ANYEXT]](s32)
42 ; CHECK: RET_ReallyLR implicit $w0
43 %isnan = tail call i1 @llvm.isnan.f16(half %x)