[ARM] Better OR's for MVE compares
[llvm-core.git] / test / MC / AArch64 / neon-scalar-cvt.s
blob3cbf6bae67588e5b78745b8a68d49fb2cc34455e
1 // RUN: llvm-mc -triple aarch64-none-linux-gnu -mattr=+neon,+fullfp16 -show-encoding < %s | FileCheck %s
3 // Check that the assembler can handle the documented syntax for AArch64
5 //----------------------------------------------------------------------
6 // Scalar Signed Integer Convert To Floating-point
7 //----------------------------------------------------------------------
9 scvtf h23, h14
10 scvtf s22, s13
11 scvtf d21, d12
13 // CHECK: scvtf h23, h14 // encoding: [0xd7,0xd9,0x79,0x5e]
14 // CHECK: scvtf s22, s13 // encoding: [0xb6,0xd9,0x21,0x5e]
15 // CHECK: scvtf d21, d12 // encoding: [0x95,0xd9,0x61,0x5e]
17 //----------------------------------------------------------------------
18 // Scalar Unsigned Integer Convert To Floating-point
19 //----------------------------------------------------------------------
21 ucvtf h20, h12
22 ucvtf s22, s13
23 ucvtf d21, d14
25 // CHECK: ucvtf h20, h12 // encoding: [0x94,0xd9,0x79,0x7e]
26 // CHECK: ucvtf s22, s13 // encoding: [0xb6,0xd9,0x21,0x7e]
27 // CHECK: ucvtf d21, d14 // encoding: [0xd5,0xd9,0x61,0x7e]
29 //----------------------------------------------------------------------
30 // Scalar Signed Fixed-point Convert To Floating-Point (Immediate)
31 //----------------------------------------------------------------------
33 scvtf h22, h13, #16
34 scvtf s22, s13, #32
35 scvtf d21, d12, #64
37 // CHECK: scvtf h22, h13, #16 // encoding: [0xb6,0xe5,0x10,0x5f]
38 // CHECK: scvtf s22, s13, #32 // encoding: [0xb6,0xe5,0x20,0x5f]
39 // CHECK: scvtf d21, d12, #64 // encoding: [0x95,0xe5,0x40,0x5f]
41 //----------------------------------------------------------------------
42 // Scalar Unsigned Fixed-point Convert To Floating-Point (Immediate)
43 //----------------------------------------------------------------------
45 ucvtf h22, h13, #16
46 ucvtf s22, s13, #32
47 ucvtf d21, d14, #64
49 // CHECK: ucvtf h22, h13, #16 // encoding: [0xb6,0xe5,0x10,0x7f]
50 // CHECK: ucvtf s22, s13, #32 // encoding: [0xb6,0xe5,0x20,0x7f]
51 // CHECK: ucvtf d21, d14, #64 // encoding: [0xd5,0xe5,0x40,0x7f]
53 //----------------------------------------------------------------------
54 // Scalar Floating-point Convert To Signed Fixed-point (Immediate)
55 //----------------------------------------------------------------------
57 fcvtzs h21, h12, #1
58 fcvtzs s21, s12, #1
59 fcvtzs d21, d12, #1
61 // CHECK: fcvtzs h21, h12, #1 // encoding: [0x95,0xfd,0x1f,0x5f]
62 // CHECK: fcvtzs s21, s12, #1 // encoding: [0x95,0xfd,0x3f,0x5f]
63 // CHECK: fcvtzs d21, d12, #1 // encoding: [0x95,0xfd,0x7f,0x5f]
65 //----------------------------------------------------------------------
66 // Scalar Floating-point Convert To Unsigned Fixed-point (Immediate)
67 //----------------------------------------------------------------------
69 fcvtzu h21, h12, #1
70 fcvtzu s21, s12, #1
71 fcvtzu d21, d12, #1
73 // CHECK: fcvtzu h21, h12, #1 // encoding: [0x95,0xfd,0x1f,0x7f]
74 // CHECK: fcvtzu s21, s12, #1 // encoding: [0x95,0xfd,0x3f,0x7f]
75 // CHECK: fcvtzu d21, d12, #1 // encoding: [0x95,0xfd,0x7f,0x7f]
77 //----------------------------------------------------------------------
78 // Scalar Floating-point Convert To Lower Precision Narrow, Rounding To
79 // Odd
80 //----------------------------------------------------------------------
82 fcvtxn s22, d13
84 // CHECK: fcvtxn s22, d13 // encoding: [0xb6,0x69,0x61,0x7e]
86 //----------------------------------------------------------------------
87 // Scalar Floating-point Convert To Signed Integer, Rounding To Nearest
88 // With Ties To Away
89 //----------------------------------------------------------------------
91 fcvtas h12, h13
92 fcvtas s12, s13
93 fcvtas d21, d14
95 // CHECK: fcvtas h12, h13 // encoding: [0xac,0xc9,0x79,0x5e]
96 // CHECK: fcvtas s12, s13 // encoding: [0xac,0xc9,0x21,0x5e]
97 // CHECK: fcvtas d21, d14 // encoding: [0xd5,0xc9,0x61,0x5e]
99 //----------------------------------------------------------------------
100 // Scalar Floating-point Convert To Unsigned Integer, Rounding To
101 // Nearest With Ties To Away
102 //----------------------------------------------------------------------
104 fcvtau h12, h13
105 fcvtau s12, s13
106 fcvtau d21, d14
108 // CHECK: fcvtau h12, h13 // encoding: [0xac,0xc9,0x79,0x7e]
109 // CHECK: fcvtau s12, s13 // encoding: [0xac,0xc9,0x21,0x7e]
110 // CHECK: fcvtau d21, d14 // encoding: [0xd5,0xc9,0x61,0x7e]
112 //----------------------------------------------------------------------
113 // Scalar Floating-point Convert To Signed Integer, Rounding Toward
114 // Minus Infinity
115 //----------------------------------------------------------------------
117 fcvtms h22, h13
118 fcvtms s22, s13
119 fcvtms d21, d14
121 // CHECK: fcvtms h22, h13 // encoding: [0xb6,0xb9,0x79,0x5e]
122 // CHECK: fcvtms s22, s13 // encoding: [0xb6,0xb9,0x21,0x5e]
123 // CHECK: fcvtms d21, d14 // encoding: [0xd5,0xb9,0x61,0x5e]
125 //----------------------------------------------------------------------
126 // Scalar Floating-point Convert To Unsigned Integer, Rounding Toward
127 // Minus Infinity
128 //----------------------------------------------------------------------
130 fcvtmu h12, h13
131 fcvtmu s12, s13
132 fcvtmu d21, d14
134 // CHECK: fcvtmu h12, h13 // encoding: [0xac,0xb9,0x79,0x7e]
135 // CHECK: fcvtmu s12, s13 // encoding: [0xac,0xb9,0x21,0x7e]
136 // CHECK: fcvtmu d21, d14 // encoding: [0xd5,0xb9,0x61,0x7e]
138 //----------------------------------------------------------------------
139 // Scalar Floating-point Convert To Signed Integer, Rounding To Nearest
140 // With Ties To Even
141 //----------------------------------------------------------------------
143 fcvtns h22, h13
144 fcvtns s22, s13
145 fcvtns d21, d14
147 // CHECK: fcvtns h22, h13 // encoding: [0xb6,0xa9,0x79,0x5e]
148 // CHECK: fcvtns s22, s13 // encoding: [0xb6,0xa9,0x21,0x5e]
149 // CHECK: fcvtns d21, d14 // encoding: [0xd5,0xa9,0x61,0x5e]
151 //----------------------------------------------------------------------
152 // Scalar Floating-point Convert To Unsigned Integer, Rounding To
153 // Nearest With Ties To Even
154 //----------------------------------------------------------------------
156 fcvtnu h12, h13
157 fcvtnu s12, s13
158 fcvtnu d21, d14
160 // CHECK: fcvtnu h12, h13 // encoding: [0xac,0xa9,0x79,0x7e]
161 // CHECK: fcvtnu s12, s13 // encoding: [0xac,0xa9,0x21,0x7e]
162 // CHECK: fcvtnu d21, d14 // encoding: [0xd5,0xa9,0x61,0x7e]
164 //----------------------------------------------------------------------
165 // Scalar Floating-point Convert To Signed Integer, Rounding Toward
166 // Positive Infinity
167 //----------------------------------------------------------------------
169 fcvtps h22, h13
170 fcvtps s22, s13
171 fcvtps d21, d14
173 // CHECK: fcvtps h22, h13 // encoding: [0xb6,0xa9,0xf9,0x5e]
174 // CHECK: fcvtps s22, s13 // encoding: [0xb6,0xa9,0xa1,0x5e]
175 // CHECK: fcvtps d21, d14 // encoding: [0xd5,0xa9,0xe1,0x5e]
177 //----------------------------------------------------------------------
178 // Scalar Floating-point Convert To Unsigned Integer, Rounding Toward
179 // Positive Infinity
180 //----------------------------------------------------------------------
182 fcvtpu h12, h13
183 fcvtpu s12, s13
184 fcvtpu d21, d14
186 // CHECK: fcvtpu h12, h13 // encoding: [0xac,0xa9,0xf9,0x7e]
187 // CHECK: fcvtpu s12, s13 // encoding: [0xac,0xa9,0xa1,0x7e]
188 // CHECK: fcvtpu d21, d14 // encoding: [0xd5,0xa9,0xe1,0x7e]
190 //----------------------------------------------------------------------
191 // Scalar Floating-point Convert To Signed Integer, Rounding Toward Zero
192 //----------------------------------------------------------------------
194 fcvtzs h12, h13
195 fcvtzs s12, s13
196 fcvtzs d21, d14
198 // CHECK: fcvtzs h12, h13 // encoding: [0xac,0xb9,0xf9,0x5e]
199 // CHECK: fcvtzs s12, s13 // encoding: [0xac,0xb9,0xa1,0x5e]
200 // CHECK: fcvtzs d21, d14 // encoding: [0xd5,0xb9,0xe1,0x5e]
202 //----------------------------------------------------------------------
203 // Scalar Floating-point Convert To Unsigned Integer, Rounding Toward
204 // Zero
205 //----------------------------------------------------------------------
207 fcvtzu h12, h13
208 fcvtzu s12, s13
209 fcvtzu d21, d14
211 // CHECK: fcvtzu h12, h13 // encoding: [0xac,0xb9,0xf9,0x7e]
212 // CHECK: fcvtzu s12, s13 // encoding: [0xac,0xb9,0xa1,0x7e]
213 // CHECK: fcvtzu d21, d14 // encoding: [0xd5,0xb9,0xe1,0x7e]