1 ; RUN: llc -O0 -fast-isel -fast-isel-abort=1 -verify-machineinstrs -mtriple=arm64-apple-darwin < %s | FileCheck %s
3 define zeroext i1 @fcmp_float1(float %a) {
4 ; CHECK-LABEL: fcmp_float1
6 ; CHECK-NEXT: cset {{w[0-9]+}}, ne
7 %1 = fcmp une float %a, 0.000000e+00
11 define zeroext i1 @fcmp_float2(float %a, float %b) {
12 ; CHECK-LABEL: fcmp_float2
14 ; CHECK-NEXT: cset {{w[0-9]+}}, ne
15 %1 = fcmp une float %a, %b
19 define zeroext i1 @fcmp_double1(double %a) {
20 ; CHECK-LABEL: fcmp_double1
21 ; CHECK: fcmp d0, #0.0
22 ; CHECK-NEXT: cset {{w[0-9]+}}, ne
23 %1 = fcmp une double %a, 0.000000e+00
27 define zeroext i1 @fcmp_double2(double %a, double %b) {
28 ; CHECK-LABEL: fcmp_double2
30 ; CHECK-NEXT: cset {{w[0-9]+}}, ne
31 %1 = fcmp une double %a, %b
35 ; Check each fcmp condition
36 define zeroext i1 @fcmp_false(float %a) {
37 ; CHECK-LABEL: fcmp_false
38 ; CHECK: mov {{w[0-9]+}}, wzr
39 %1 = fcmp ogt float %a, %a
43 define zeroext i1 @fcmp_oeq(float %a, float %b) {
44 ; CHECK-LABEL: fcmp_oeq
46 ; CHECK-NEXT: cset {{w[0-9]+}}, eq
47 %1 = fcmp oeq float %a, %b
51 define zeroext i1 @fcmp_ogt(float %a, float %b) {
52 ; CHECK-LABEL: fcmp_ogt
54 ; CHECK-NEXT: cset {{w[0-9]+}}, gt
55 %1 = fcmp ogt float %a, %b
59 define zeroext i1 @fcmp_oge(float %a, float %b) {
60 ; CHECK-LABEL: fcmp_oge
62 ; CHECK-NEXT: cset {{w[0-9]+}}, ge
63 %1 = fcmp oge float %a, %b
67 define zeroext i1 @fcmp_olt(float %a, float %b) {
68 ; CHECK-LABEL: fcmp_olt
70 ; CHECK-NEXT: cset {{w[0-9]+}}, mi
71 %1 = fcmp olt float %a, %b
75 define zeroext i1 @fcmp_ole(float %a, float %b) {
76 ; CHECK-LABEL: fcmp_ole
78 ; CHECK-NEXT: cset {{w[0-9]+}}, ls
79 %1 = fcmp ole float %a, %b
83 define zeroext i1 @fcmp_one(float %a, float %b) {
84 ; CHECK-LABEL: fcmp_one
86 ; CHECK-NEXT: cset [[REG:w[0-9]+]], mi
87 ; CHECK-NEXT: csinc {{w[0-9]+}}, [[REG]], wzr, le
88 %1 = fcmp one float %a, %b
92 define zeroext i1 @fcmp_ord(float %a, float %b) {
93 ; CHECK-LABEL: fcmp_ord
95 ; CHECK-NEXT: cset {{w[0-9]+}}, vc
96 %1 = fcmp ord float %a, %b
100 define zeroext i1 @fcmp_uno(float %a, float %b) {
101 ; CHECK-LABEL: fcmp_uno
103 ; CHECK-NEXT: cset {{w[0-9]+}}, vs
104 %1 = fcmp uno float %a, %b
108 define zeroext i1 @fcmp_ueq(float %a, float %b) {
109 ; CHECK-LABEL: fcmp_ueq
111 ; CHECK-NEXT: cset [[REG:w[0-9]+]], eq
112 ; CHECK-NEXT: csinc {{w[0-9]+}}, [[REG]], wzr, vc
113 %1 = fcmp ueq float %a, %b
117 define zeroext i1 @fcmp_ugt(float %a, float %b) {
118 ; CHECK-LABEL: fcmp_ugt
120 ; CHECK-NEXT: cset {{w[0-9]+}}, hi
121 %1 = fcmp ugt float %a, %b
125 define zeroext i1 @fcmp_uge(float %a, float %b) {
126 ; CHECK-LABEL: fcmp_uge
128 ; CHECK-NEXT: cset {{w[0-9]+}}, pl
129 %1 = fcmp uge float %a, %b
133 define zeroext i1 @fcmp_ult(float %a, float %b) {
134 ; CHECK-LABEL: fcmp_ult
136 ; CHECK-NEXT: cset {{w[0-9]+}}, lt
137 %1 = fcmp ult float %a, %b
141 define zeroext i1 @fcmp_ule(float %a, float %b) {
142 ; CHECK-LABEL: fcmp_ule
144 ; CHECK-NEXT: cset {{w[0-9]+}}, le
145 %1 = fcmp ule float %a, %b
149 define zeroext i1 @fcmp_une(float %a, float %b) {
150 ; CHECK-LABEL: fcmp_une
152 ; CHECK-NEXT: cset {{w[0-9]+}}, ne
153 %1 = fcmp une float %a, %b
157 define zeroext i1 @fcmp_true(float %a) {
158 ; CHECK-LABEL: fcmp_true
159 ; CHECK: mov {{w[0-9]+}}, #1
160 %1 = fcmp ueq float %a, %a