1 ; RUN: llc -O0 -fast-isel-abort -verify-machineinstrs -mtriple=arm64-apple-darwin < %s | FileCheck %s
3 define zeroext i1 @fcmp_float1(float %a) nounwind ssp {
5 ; CHECK-LABEL: @fcmp_float1
7 ; CHECK: cset w{{[0-9]+}}, ne
8 %cmp = fcmp une float %a, 0.000000e+00
12 define zeroext i1 @fcmp_float2(float %a, float %b) nounwind ssp {
14 ; CHECK-LABEL: @fcmp_float2
16 ; CHECK: cset w{{[0-9]+}}, ne
17 %cmp = fcmp une float %a, %b
21 define zeroext i1 @fcmp_double1(double %a) nounwind ssp {
23 ; CHECK-LABEL: @fcmp_double1
24 ; CHECK: fcmp d0, #0.0
25 ; CHECK: cset w{{[0-9]+}}, ne
26 %cmp = fcmp une double %a, 0.000000e+00
30 define zeroext i1 @fcmp_double2(double %a, double %b) nounwind ssp {
32 ; CHECK-LABEL: @fcmp_double2
34 ; CHECK: cset w{{[0-9]+}}, ne
35 %cmp = fcmp une double %a, %b
39 ; Check each fcmp condition
40 define float @fcmp_oeq(float %a, float %b) nounwind ssp {
41 ; CHECK-LABEL: @fcmp_oeq
43 ; CHECK: cset w{{[0-9]+}}, eq
44 %cmp = fcmp oeq float %a, %b
45 %conv = uitofp i1 %cmp to float
49 define float @fcmp_ogt(float %a, float %b) nounwind ssp {
50 ; CHECK-LABEL: @fcmp_ogt
52 ; CHECK: cset w{{[0-9]+}}, gt
53 %cmp = fcmp ogt float %a, %b
54 %conv = uitofp i1 %cmp to float
58 define float @fcmp_oge(float %a, float %b) nounwind ssp {
59 ; CHECK-LABEL: @fcmp_oge
61 ; CHECK: cset w{{[0-9]+}}, ge
62 %cmp = fcmp oge float %a, %b
63 %conv = uitofp i1 %cmp to float
67 define float @fcmp_olt(float %a, float %b) nounwind ssp {
68 ; CHECK-LABEL: @fcmp_olt
70 ; CHECK: cset w{{[0-9]+}}, mi
71 %cmp = fcmp olt float %a, %b
72 %conv = uitofp i1 %cmp to float
76 define float @fcmp_ole(float %a, float %b) nounwind ssp {
77 ; CHECK-LABEL: @fcmp_ole
79 ; CHECK: cset w{{[0-9]+}}, ls
80 %cmp = fcmp ole float %a, %b
81 %conv = uitofp i1 %cmp to float
85 define float @fcmp_ord(float %a, float %b) nounwind ssp {
86 ; CHECK-LABEL: @fcmp_ord
88 ; CHECK: cset {{w[0-9]+}}, vc
89 %cmp = fcmp ord float %a, %b
90 %conv = uitofp i1 %cmp to float
94 define float @fcmp_uno(float %a, float %b) nounwind ssp {
95 ; CHECK-LABEL: @fcmp_uno
97 ; CHECK: cset {{w[0-9]+}}, vs
98 %cmp = fcmp uno float %a, %b
99 %conv = uitofp i1 %cmp to float
103 define float @fcmp_ugt(float %a, float %b) nounwind ssp {
104 ; CHECK-LABEL: @fcmp_ugt
106 ; CHECK: cset {{w[0-9]+}}, hi
107 %cmp = fcmp ugt float %a, %b
108 %conv = uitofp i1 %cmp to float
112 define float @fcmp_uge(float %a, float %b) nounwind ssp {
113 ; CHECK-LABEL: @fcmp_uge
115 ; CHECK: cset {{w[0-9]+}}, pl
116 %cmp = fcmp uge float %a, %b
117 %conv = uitofp i1 %cmp to float
121 define float @fcmp_ult(float %a, float %b) nounwind ssp {
122 ; CHECK-LABEL: @fcmp_ult
124 ; CHECK: cset {{w[0-9]+}}, lt
125 %cmp = fcmp ult float %a, %b
126 %conv = uitofp i1 %cmp to float
130 define float @fcmp_ule(float %a, float %b) nounwind ssp {
131 ; CHECK-LABEL: @fcmp_ule
133 ; CHECK: cset {{w[0-9]+}}, le
134 %cmp = fcmp ule float %a, %b
135 %conv = uitofp i1 %cmp to float
139 define float @fcmp_une(float %a, float %b) nounwind ssp {
140 ; CHECK-LABEL: @fcmp_une
142 ; CHECK: cset {{w[0-9]+}}, ne
143 %cmp = fcmp une float %a, %b
144 %conv = uitofp i1 %cmp to float