1 ; RUN: llc < %s -mtriple=arm64-eabi -mattr=+fullfp16 -enable-no-nans-fp-math | FileCheck %s
3 declare i1 @llvm.experimental.constrained.fcmp.f32(float, float, metadata, metadata)
4 declare i1 @llvm.experimental.constrained.fcmp.f64(double, double, metadata, metadata)
6 ; CHECK-LABEL: @f32_constrained_fcmp_ueq
8 ; CHECK-NEXT: cset w0, eq
10 define i1 @f32_constrained_fcmp_ueq(float %a, float %b) nounwind ssp strictfp {
11 %cmp = tail call i1 @llvm.experimental.constrained.fcmp.f32(float %a, float %b, metadata !"ueq", metadata !"fpexcept.strict")
15 ; CHECK-LABEL: @f32_constrained_fcmp_une
17 ; CHECK-NEXT: cset w0, ne
19 define i1 @f32_constrained_fcmp_une(float %a, float %b) nounwind ssp strictfp {
20 %cmp = tail call i1 @llvm.experimental.constrained.fcmp.f32(float %a, float %b, metadata !"une", metadata !"fpexcept.strict")
24 ; CHECK-LABEL: @f32_constrained_fcmp_ugt
26 ; CHECK-NEXT: cset w0, gt
28 define i1 @f32_constrained_fcmp_ugt(float %a, float %b) nounwind ssp strictfp {
29 %cmp = tail call i1 @llvm.experimental.constrained.fcmp.f32(float %a, float %b, metadata !"ugt", metadata !"fpexcept.strict")
33 ; CHECK-LABEL: @f32_constrained_fcmp_uge
35 ; CHECK-NEXT: cset w0, ge
37 define i1 @f32_constrained_fcmp_uge(float %a, float %b) nounwind ssp strictfp {
38 %cmp = tail call i1 @llvm.experimental.constrained.fcmp.f32(float %a, float %b, metadata !"uge", metadata !"fpexcept.strict")
42 ; CHECK-LABEL: @f32_constrained_fcmp_ult
44 ; CHECK-NEXT: cset w0, lt
46 define i1 @f32_constrained_fcmp_ult(float %a, float %b) nounwind ssp strictfp {
47 %cmp = tail call i1 @llvm.experimental.constrained.fcmp.f32(float %a, float %b, metadata !"ult", metadata !"fpexcept.strict")
51 ; CHECK-LABEL: @f32_constrained_fcmp_ule
53 ; CHECK-NEXT: cset w0, le
55 define i1 @f32_constrained_fcmp_ule(float %a, float %b) nounwind ssp strictfp {
56 %cmp = tail call i1 @llvm.experimental.constrained.fcmp.f32(float %a, float %b, metadata !"ule", metadata !"fpexcept.strict")
60 ; CHECK-LABEL: @f64_constrained_fcmp_ueq
62 ; CHECK-NEXT: cset w0, eq
64 define i1 @f64_constrained_fcmp_ueq(double %a, double %b) nounwind ssp strictfp {
65 %cmp = tail call i1 @llvm.experimental.constrained.fcmp.f64(double %a, double %b, metadata !"ueq", metadata !"fpexcept.strict")
69 ; CHECK-LABEL: @f64_constrained_fcmp_une
71 ; CHECK-NEXT: cset w0, ne
73 define i1 @f64_constrained_fcmp_une(double %a, double %b) nounwind ssp strictfp {
74 %cmp = tail call i1 @llvm.experimental.constrained.fcmp.f64(double %a, double %b, metadata !"une", metadata !"fpexcept.strict")
78 ; CHECK-LABEL: @f64_constrained_fcmp_ugt
80 ; CHECK-NEXT: cset w0, gt
82 define i1 @f64_constrained_fcmp_ugt(double %a, double %b) nounwind ssp strictfp {
83 %cmp = tail call i1 @llvm.experimental.constrained.fcmp.f64(double %a, double %b, metadata !"ugt", metadata !"fpexcept.strict")
87 ; CHECK-LABEL: @f64_constrained_fcmp_uge
89 ; CHECK-NEXT: cset w0, ge
91 define i1 @f64_constrained_fcmp_uge(double %a, double %b) nounwind ssp strictfp {
92 %cmp = tail call i1 @llvm.experimental.constrained.fcmp.f64(double %a, double %b, metadata !"uge", metadata !"fpexcept.strict")
96 ; CHECK-LABEL: @f64_constrained_fcmp_ult
98 ; CHECK-NEXT: cset w0, lt
100 define i1 @f64_constrained_fcmp_ult(double %a, double %b) nounwind ssp strictfp {
101 %cmp = tail call i1 @llvm.experimental.constrained.fcmp.f64(double %a, double %b, metadata !"ult", metadata !"fpexcept.strict")
105 ; CHECK-LABEL: @f64_constrained_fcmp_ule
107 ; CHECK-NEXT: cset w0, le
109 define i1 @f64_constrained_fcmp_ule(double %a, double %b) nounwind ssp strictfp {
110 %cmp = tail call i1 @llvm.experimental.constrained.fcmp.f64(double %a, double %b, metadata !"ule", metadata !"fpexcept.strict")