1 # RUN: llvm-mc -triple arm64-apple-darwin -mattr=neon --disassemble -output-asm-variant=1 < %s | FileCheck %s
2 # RUN: llvm-mc -triple arm64-apple-darwin -mattr=neon,v8.2a,fullfp16 --disassemble -output-asm-variant=1 < %s | FileCheck %s --check-prefix=CHECK --check-prefix=FP16
4 #-----------------------------------------------------------------------------
5 # Floating-point arithmetic
6 #-----------------------------------------------------------------------------
20 # FP16: fadd h1, h2, h3
21 # CHECK: fadd s1, s2, s3
22 # CHECK: fadd d1, d2, d3
28 # FP16: fdiv h1, h2, h3
29 # CHECK: fdiv s1, s2, s3
30 # CHECK: fdiv d1, d2, d3
36 # FP16: fmadd h1, h2, h3, h4
37 # CHECK: fmadd s1, s2, s3, s4
38 # CHECK: fmadd d1, d2, d3, d4
47 # FP16: fmax h1, h2, h3
48 # CHECK: fmax s1, s2, s3
49 # CHECK: fmax d1, d2, d3
50 # FP16: fmaxnm h1, h2, h3
51 # CHECK: fmaxnm s1, s2, s3
52 # CHECK: fmaxnm d1, d2, d3
61 # FP16: fmin h1, h2, h3
62 # CHECK: fmin s1, s2, s3
63 # CHECK: fmin d1, d2, d3
64 # FP16: fminnm h1, h2, h3
65 # CHECK: fminnm s1, s2, s3
66 # CHECK: fminnm d1, d2, d3
72 # FP16: fmsub h1, h2, h3, h4
73 # CHECK: fmsub s1, s2, s3, s4
74 # CHECK: fmsub d1, d2, d3, d4
80 # FP16: fmul h1, h2, h3
81 # CHECK: fmul s1, s2, s3
82 # CHECK: fmul d1, d2, d3
96 # FP16: fnmadd h1, h2, h3, h4
97 # CHECK: fnmadd s1, s2, s3, s4
98 # CHECK: fnmadd d1, d2, d3, d4
104 # FP16: fnmsub h1, h2, h3, h4
105 # CHECK: fnmsub s1, s2, s3, s4
106 # CHECK: fnmsub d1, d2, d3, d4
112 # FP16: fnmul h1, h2, h3
113 # CHECK: fnmul s1, s2, s3
114 # CHECK: fnmul d1, d2, d3
121 # CHECK: fsqrt s1, s2
122 # CHECK: fsqrt d1, d2
128 # FP16: fsub h1, h2, h3
129 # CHECK: fsub s1, s2, s3
130 # CHECK: fsub d1, d2, d3
132 #-----------------------------------------------------------------------------
133 # Floating-point comparison
134 #-----------------------------------------------------------------------------
143 # FP16: fccmp h1, h2, #0, eq
144 # CHECK: fccmp s1, s2, #0, eq
145 # CHECK: fccmp d1, d2, #0, eq
146 # FP16: fccmpe h1, h2, #0, eq
147 # CHECK: fccmpe s1, s2, #0, eq
148 # CHECK: fccmpe d1, d2, #0, eq
166 # FP16: fcmp h1, #0.0
167 # CHECK: fcmp s1, #0.0
168 # CHECK: fcmp d1, #0.0
170 # CHECK: fcmpe s1, s2
171 # CHECK: fcmpe d1, d2
172 # FP16: fcmpe h1, #0.0
173 # CHECK: fcmpe s1, #0.0
174 # CHECK: fcmpe d1, #0.0
176 #-----------------------------------------------------------------------------
177 # Floating-point conditional select
178 #-----------------------------------------------------------------------------
184 # FP16: fcsel h1, h2, h3, eq
185 # CHECK: fcsel s1, s2, s3, eq
186 # CHECK: fcsel d1, d2, d3, eq
188 #-----------------------------------------------------------------------------
189 # Floating-point convert
190 #-----------------------------------------------------------------------------
215 #-----------------------------------------------------------------------------
216 # Floating-point move
217 #-----------------------------------------------------------------------------
239 # FP16: fmov h1, #0.12500000
240 # CHECK: fmov s1, #0.12500000
241 # CHECK: fmov d1, #0.12500000
242 # CHECK: fmov d1, #-0.48437500
243 # CHECK: fmov d1, #0.48437500
253 #-----------------------------------------------------------------------------
254 # Floating-point round to integral
255 #-----------------------------------------------------------------------------
261 # FP16: frinta h1, h2
262 # CHECK: frinta s1, s2
263 # CHECK: frinta d1, d2
269 # FP16: frinti h1, h2
270 # CHECK: frinti s1, s2
271 # CHECK: frinti d1, d2
277 # FP16: frintm h1, h2
278 # CHECK: frintm s1, s2
279 # CHECK: frintm d1, d2
285 # FP16: frintn h1, h2
286 # CHECK: frintn s1, s2
287 # CHECK: frintn d1, d2
293 # FP16: frintp h1, h2
294 # CHECK: frintp s1, s2
295 # CHECK: frintp d1, d2
301 # FP16: frintx h1, h2
302 # CHECK: frintx s1, s2
303 # CHECK: frintx d1, d2
309 # FP16: frintz h1, h2
310 # CHECK: frintz s1, s2
311 # CHECK: frintz d1, d2
316 # CHECK: cmhs d0, d0, d0
317 # CHECK: cmtst d0, d0, d0
322 # CHECK: fmov.d v0[1], x0
323 # CHECK: fmov.d x0, v0[1]