xref: /aosp_15_r20/external/llvm/test/CodeGen/AArch64/arm64-inline-asm.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=arm64-apple-ios -aarch64-neon-syntax=apple -no-integrated-as -disable-post-ra | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; rdar://9167275
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Workerdefine i32 @t1() nounwind ssp {
6*9880d681SAndroid Build Coastguard Workerentry:
7*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: t1:
8*9880d681SAndroid Build Coastguard Worker; CHECK: mov {{w[0-9]+}}, 7
9*9880d681SAndroid Build Coastguard Worker  %0 = tail call i32 asm "mov ${0:w}, 7", "=r"() nounwind
10*9880d681SAndroid Build Coastguard Worker  ret i32 %0
11*9880d681SAndroid Build Coastguard Worker}
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard Workerdefine i64 @t2() nounwind ssp {
14*9880d681SAndroid Build Coastguard Workerentry:
15*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: t2:
16*9880d681SAndroid Build Coastguard Worker; CHECK: mov {{x[0-9]+}}, 7
17*9880d681SAndroid Build Coastguard Worker  %0 = tail call i64 asm "mov $0, 7", "=r"() nounwind
18*9880d681SAndroid Build Coastguard Worker  ret i64 %0
19*9880d681SAndroid Build Coastguard Worker}
20*9880d681SAndroid Build Coastguard Worker
21*9880d681SAndroid Build Coastguard Workerdefine i64 @t3() nounwind ssp {
22*9880d681SAndroid Build Coastguard Workerentry:
23*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: t3:
24*9880d681SAndroid Build Coastguard Worker; CHECK: mov {{w[0-9]+}}, 7
25*9880d681SAndroid Build Coastguard Worker  %0 = tail call i64 asm "mov ${0:w}, 7", "=r"() nounwind
26*9880d681SAndroid Build Coastguard Worker  ret i64 %0
27*9880d681SAndroid Build Coastguard Worker}
28*9880d681SAndroid Build Coastguard Worker
29*9880d681SAndroid Build Coastguard Worker; rdar://9281206
30*9880d681SAndroid Build Coastguard Worker
31*9880d681SAndroid Build Coastguard Workerdefine void @t4(i64 %op) nounwind {
32*9880d681SAndroid Build Coastguard Workerentry:
33*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: t4:
34*9880d681SAndroid Build Coastguard Worker; CHECK: mov x0, {{x[0-9]+}}; svc #0
35*9880d681SAndroid Build Coastguard Worker  %0 = tail call i64 asm sideeffect "mov x0, $1; svc #0;", "=r,r,r,~{x0}"(i64 %op, i64 undef) nounwind
36*9880d681SAndroid Build Coastguard Worker  ret void
37*9880d681SAndroid Build Coastguard Worker}
38*9880d681SAndroid Build Coastguard Worker
39*9880d681SAndroid Build Coastguard Worker; rdar://9394290
40*9880d681SAndroid Build Coastguard Worker
41*9880d681SAndroid Build Coastguard Workerdefine float @t5(float %x) nounwind {
42*9880d681SAndroid Build Coastguard Workerentry:
43*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: t5:
44*9880d681SAndroid Build Coastguard Worker; CHECK: fadd {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
45*9880d681SAndroid Build Coastguard Worker  %0 = tail call float asm "fadd ${0:s}, ${0:s}, ${0:s}", "=w,0"(float %x) nounwind
46*9880d681SAndroid Build Coastguard Worker  ret float %0
47*9880d681SAndroid Build Coastguard Worker}
48*9880d681SAndroid Build Coastguard Worker
49*9880d681SAndroid Build Coastguard Worker; rdar://9553599
50*9880d681SAndroid Build Coastguard Worker
51*9880d681SAndroid Build Coastguard Workerdefine zeroext i8 @t6(i8* %src) nounwind {
52*9880d681SAndroid Build Coastguard Workerentry:
53*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: t6:
54*9880d681SAndroid Build Coastguard Worker; CHECK: ldtrb {{w[0-9]+}}, [{{x[0-9]+}}]
55*9880d681SAndroid Build Coastguard Worker  %0 = tail call i8 asm "ldtrb ${0:w}, [$1]", "=r,r"(i8* %src) nounwind
56*9880d681SAndroid Build Coastguard Worker  ret i8 %0
57*9880d681SAndroid Build Coastguard Worker}
58*9880d681SAndroid Build Coastguard Worker
59*9880d681SAndroid Build Coastguard Workerdefine void @t7(i8* %f, i32 %g) nounwind {
60*9880d681SAndroid Build Coastguard Workerentry:
61*9880d681SAndroid Build Coastguard Worker  %f.addr = alloca i8*, align 8
62*9880d681SAndroid Build Coastguard Worker  store i8* %f, i8** %f.addr, align 8
63*9880d681SAndroid Build Coastguard Worker  ; CHECK-LABEL: t7:
64*9880d681SAndroid Build Coastguard Worker  ; CHECK: str {{w[0-9]+}}, [{{x[0-9]+}}]
65*9880d681SAndroid Build Coastguard Worker  call void asm "str ${1:w}, $0", "=*Q,r"(i8** %f.addr, i32 %g) nounwind
66*9880d681SAndroid Build Coastguard Worker  ret void
67*9880d681SAndroid Build Coastguard Worker}
68*9880d681SAndroid Build Coastguard Worker
69*9880d681SAndroid Build Coastguard Worker; rdar://10258229
70*9880d681SAndroid Build Coastguard Worker; ARM64TargetLowering::getRegForInlineAsmConstraint() should recognize 'v'
71*9880d681SAndroid Build Coastguard Worker; registers.
72*9880d681SAndroid Build Coastguard Workerdefine void @t8() nounwind ssp {
73*9880d681SAndroid Build Coastguard Workerentry:
74*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: t8:
75*9880d681SAndroid Build Coastguard Worker; CHECK: stp {{d[0-9]+}}, {{d[0-9]+}}, [sp, #-16]
76*9880d681SAndroid Build Coastguard Worker  tail call void asm sideeffect "nop", "~{v8}"() nounwind
77*9880d681SAndroid Build Coastguard Worker  ret void
78*9880d681SAndroid Build Coastguard Worker}
79*9880d681SAndroid Build Coastguard Worker
80*9880d681SAndroid Build Coastguard Workerdefine i32 @constraint_I(i32 %i, i32 %j) nounwind {
81*9880d681SAndroid Build Coastguard Workerentry:
82*9880d681SAndroid Build Coastguard Worker  ; CHECK-LABEL: constraint_I:
83*9880d681SAndroid Build Coastguard Worker  %0 = tail call i32 asm sideeffect "add ${0:w}, ${1:w}, $2", "=r,r,I"(i32 %i, i32 16773120) nounwind
84*9880d681SAndroid Build Coastguard Worker  ; CHECK: add   {{w[0-9]+}}, {{w[0-9]+}}, #16773120
85*9880d681SAndroid Build Coastguard Worker  %1 = tail call i32 asm sideeffect "add ${0:w}, ${1:w}, $2", "=r,r,I"(i32 %i, i32 4096) nounwind
86*9880d681SAndroid Build Coastguard Worker  ; CHECK: add   {{w[0-9]+}}, {{w[0-9]+}}, #4096
87*9880d681SAndroid Build Coastguard Worker  ret i32 %1
88*9880d681SAndroid Build Coastguard Worker}
89*9880d681SAndroid Build Coastguard Worker
90*9880d681SAndroid Build Coastguard Workerdefine i32 @constraint_J(i32 %i, i32 %j, i64 %k) nounwind {
91*9880d681SAndroid Build Coastguard Workerentry:
92*9880d681SAndroid Build Coastguard Worker  ; CHECK-LABEL: constraint_J:
93*9880d681SAndroid Build Coastguard Worker  %0 = tail call i32 asm sideeffect "sub ${0:w}, ${1:w}, $2", "=r,r,J"(i32 %i, i32 -16773120) nounwind
94*9880d681SAndroid Build Coastguard Worker  ; CHECK: sub   {{w[0-9]+}}, {{w[0-9]+}}, #-16773120
95*9880d681SAndroid Build Coastguard Worker  %1 = tail call i32 asm sideeffect "sub ${0:w}, ${1:w}, $2", "=r,r,J"(i32 %i, i32 -1) nounwind
96*9880d681SAndroid Build Coastguard Worker  ; CHECK: sub   {{w[0-9]+}}, {{w[0-9]+}}, #-1
97*9880d681SAndroid Build Coastguard Worker  %2 = tail call i64 asm sideeffect "sub ${0:x}, ${1:x}, $2", "=r,r,J"(i64 %k, i32 -1) nounwind
98*9880d681SAndroid Build Coastguard Worker  ; CHECK: sub   {{x[0-9]+}}, {{x[0-9]+}}, #-1
99*9880d681SAndroid Build Coastguard Worker  %3 = tail call i64 asm sideeffect "sub ${0:x}, ${1:x}, $2", "=r,r,J"(i64 %k, i64 -1) nounwind
100*9880d681SAndroid Build Coastguard Worker  ; CHECK: sub   {{x[0-9]+}}, {{x[0-9]+}}, #-1
101*9880d681SAndroid Build Coastguard Worker  ret i32 %1
102*9880d681SAndroid Build Coastguard Worker}
103*9880d681SAndroid Build Coastguard Worker
104*9880d681SAndroid Build Coastguard Workerdefine i32 @constraint_KL(i32 %i, i32 %j) nounwind {
105*9880d681SAndroid Build Coastguard Workerentry:
106*9880d681SAndroid Build Coastguard Worker  ; CHECK-LABEL: constraint_KL:
107*9880d681SAndroid Build Coastguard Worker  %0 = tail call i32 asm sideeffect "eor ${0:w}, ${1:w}, $2", "=r,r,K"(i32 %i, i32 255) nounwind
108*9880d681SAndroid Build Coastguard Worker  ; CHECK: eor {{w[0-9]+}}, {{w[0-9]+}}, #255
109*9880d681SAndroid Build Coastguard Worker  %1 = tail call i32 asm sideeffect "eor ${0:w}, ${1:w}, $2", "=r,r,L"(i32 %i, i64 16711680) nounwind
110*9880d681SAndroid Build Coastguard Worker  ; CHECK: eor {{w[0-9]+}}, {{w[0-9]+}}, #16711680
111*9880d681SAndroid Build Coastguard Worker  ret i32 %1
112*9880d681SAndroid Build Coastguard Worker}
113*9880d681SAndroid Build Coastguard Worker
114*9880d681SAndroid Build Coastguard Workerdefine i32 @constraint_MN(i32 %i, i32 %j) nounwind {
115*9880d681SAndroid Build Coastguard Workerentry:
116*9880d681SAndroid Build Coastguard Worker  ; CHECK-LABEL: constraint_MN:
117*9880d681SAndroid Build Coastguard Worker  %0 = tail call i32 asm sideeffect "movk ${0:w}, $1", "=r,M"(i32 65535) nounwind
118*9880d681SAndroid Build Coastguard Worker  ; CHECK: movk  {{w[0-9]+}}, #65535
119*9880d681SAndroid Build Coastguard Worker  %1 = tail call i32 asm sideeffect "movz ${0:w}, $1", "=r,N"(i64 0) nounwind
120*9880d681SAndroid Build Coastguard Worker  ; CHECK: movz  {{w[0-9]+}}, #0
121*9880d681SAndroid Build Coastguard Worker  ret i32 %1
122*9880d681SAndroid Build Coastguard Worker}
123*9880d681SAndroid Build Coastguard Worker
124*9880d681SAndroid Build Coastguard Workerdefine void @t9() nounwind {
125*9880d681SAndroid Build Coastguard Workerentry:
126*9880d681SAndroid Build Coastguard Worker  ; CHECK-LABEL: t9:
127*9880d681SAndroid Build Coastguard Worker  %data = alloca <2 x double>, align 16
128*9880d681SAndroid Build Coastguard Worker  %0 = load <2 x double>, <2 x double>* %data, align 16
129*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect "mov.2d v4, $0\0A", "w,~{v4}"(<2 x double> %0) nounwind
130*9880d681SAndroid Build Coastguard Worker  ; CHECK: mov.2d v4, {{v[0-9]+}}
131*9880d681SAndroid Build Coastguard Worker  ret void
132*9880d681SAndroid Build Coastguard Worker}
133*9880d681SAndroid Build Coastguard Worker
134*9880d681SAndroid Build Coastguard Workerdefine void @t10() nounwind {
135*9880d681SAndroid Build Coastguard Workerentry:
136*9880d681SAndroid Build Coastguard Worker  ; CHECK-LABEL: t10:
137*9880d681SAndroid Build Coastguard Worker  %data = alloca <2 x float>, align 8
138*9880d681SAndroid Build Coastguard Worker  %a = alloca [2 x float], align 4
139*9880d681SAndroid Build Coastguard Worker  %arraydecay = getelementptr inbounds [2 x float], [2 x float]* %a, i32 0, i32 0
140*9880d681SAndroid Build Coastguard Worker  %0 = load <2 x float>, <2 x float>* %data, align 8
141*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect "ldr ${1:q}, [$0]\0A", "r,w"(float* %arraydecay, <2 x float> %0) nounwind
142*9880d681SAndroid Build Coastguard Worker  ; CHECK: ldr {{q[0-9]+}}, [{{x[0-9]+}}]
143*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect "ldr ${1:d}, [$0]\0A", "r,w"(float* %arraydecay, <2 x float> %0) nounwind
144*9880d681SAndroid Build Coastguard Worker  ; CHECK: ldr {{d[0-9]+}}, [{{x[0-9]+}}]
145*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect "ldr ${1:s}, [$0]\0A", "r,w"(float* %arraydecay, <2 x float> %0) nounwind
146*9880d681SAndroid Build Coastguard Worker  ; CHECK: ldr {{s[0-9]+}}, [{{x[0-9]+}}]
147*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect "ldr ${1:h}, [$0]\0A", "r,w"(float* %arraydecay, <2 x float> %0) nounwind
148*9880d681SAndroid Build Coastguard Worker  ; CHECK: ldr {{h[0-9]+}}, [{{x[0-9]+}}]
149*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect "ldr ${1:b}, [$0]\0A", "r,w"(float* %arraydecay, <2 x float> %0) nounwind
150*9880d681SAndroid Build Coastguard Worker  ; CHECK: ldr {{b[0-9]+}}, [{{x[0-9]+}}]
151*9880d681SAndroid Build Coastguard Worker  ret void
152*9880d681SAndroid Build Coastguard Worker}
153*9880d681SAndroid Build Coastguard Worker
154*9880d681SAndroid Build Coastguard Workerdefine void @t11() nounwind {
155*9880d681SAndroid Build Coastguard Workerentry:
156*9880d681SAndroid Build Coastguard Worker  ; CHECK-LABEL: t11:
157*9880d681SAndroid Build Coastguard Worker  %a = alloca i32, align 4
158*9880d681SAndroid Build Coastguard Worker  %0 = load i32, i32* %a, align 4
159*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect "mov ${1:x}, ${0:x}\0A", "r,i"(i32 %0, i32 0) nounwind
160*9880d681SAndroid Build Coastguard Worker  ; CHECK: mov xzr, {{x[0-9]+}}
161*9880d681SAndroid Build Coastguard Worker  %1 = load i32, i32* %a, align 4
162*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect "mov ${1:w}, ${0:w}\0A", "r,i"(i32 %1, i32 0) nounwind
163*9880d681SAndroid Build Coastguard Worker  ; CHECK: mov wzr, {{w[0-9]+}}
164*9880d681SAndroid Build Coastguard Worker  ret void
165*9880d681SAndroid Build Coastguard Worker}
166*9880d681SAndroid Build Coastguard Worker
167*9880d681SAndroid Build Coastguard Workerdefine void @t12() nounwind {
168*9880d681SAndroid Build Coastguard Workerentry:
169*9880d681SAndroid Build Coastguard Worker  ; CHECK-LABEL: t12:
170*9880d681SAndroid Build Coastguard Worker  %data = alloca <4 x float>, align 16
171*9880d681SAndroid Build Coastguard Worker  %0 = load <4 x float>, <4 x float>* %data, align 16
172*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect "mov.2d v4, $0\0A", "x,~{v4}"(<4 x float> %0) nounwind
173*9880d681SAndroid Build Coastguard Worker  ; CHECK: mov.2d v4, {{v([0-9])|(1[0-5])}}
174*9880d681SAndroid Build Coastguard Worker  ret void
175*9880d681SAndroid Build Coastguard Worker}
176*9880d681SAndroid Build Coastguard Worker
177*9880d681SAndroid Build Coastguard Workerdefine void @t13() nounwind {
178*9880d681SAndroid Build Coastguard Workerentry:
179*9880d681SAndroid Build Coastguard Worker  ; CHECK-LABEL: t13:
180*9880d681SAndroid Build Coastguard Worker  tail call void asm sideeffect "mov x4, $0\0A", "N"(i64 1311673391471656960) nounwind
181*9880d681SAndroid Build Coastguard Worker  ; CHECK: mov x4, #1311673391471656960
182*9880d681SAndroid Build Coastguard Worker  tail call void asm sideeffect "mov x4, $0\0A", "N"(i64 -4662) nounwind
183*9880d681SAndroid Build Coastguard Worker  ; CHECK: mov x4, #-4662
184*9880d681SAndroid Build Coastguard Worker  tail call void asm sideeffect "mov x4, $0\0A", "N"(i64 4660) nounwind
185*9880d681SAndroid Build Coastguard Worker  ; CHECK: mov x4, #4660
186*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect "mov x4, $0\0A", "N"(i64 -71777214294589696) nounwind
187*9880d681SAndroid Build Coastguard Worker  ; CHECK: mov x4, #-71777214294589696
188*9880d681SAndroid Build Coastguard Worker  ret void
189*9880d681SAndroid Build Coastguard Worker}
190*9880d681SAndroid Build Coastguard Worker
191*9880d681SAndroid Build Coastguard Workerdefine void @t14() nounwind {
192*9880d681SAndroid Build Coastguard Workerentry:
193*9880d681SAndroid Build Coastguard Worker  ; CHECK-LABEL: t14:
194*9880d681SAndroid Build Coastguard Worker  tail call void asm sideeffect "mov w4, $0\0A", "M"(i32 305397760) nounwind
195*9880d681SAndroid Build Coastguard Worker  ; CHECK: mov w4, #305397760
196*9880d681SAndroid Build Coastguard Worker  tail call void asm sideeffect "mov w4, $0\0A", "M"(i32 -4662) nounwind
197*9880d681SAndroid Build Coastguard Worker  ; CHECK: mov w4, #4294962634
198*9880d681SAndroid Build Coastguard Worker  tail call void asm sideeffect "mov w4, $0\0A", "M"(i32 4660) nounwind
199*9880d681SAndroid Build Coastguard Worker  ; CHECK: mov w4, #4660
200*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect "mov w4, $0\0A", "M"(i32 -16711936) nounwind
201*9880d681SAndroid Build Coastguard Worker  ; CHECK: mov w4, #4278255360
202*9880d681SAndroid Build Coastguard Worker  ret void
203*9880d681SAndroid Build Coastguard Worker}
204*9880d681SAndroid Build Coastguard Worker
205*9880d681SAndroid Build Coastguard Workerdefine void @t15() nounwind {
206*9880d681SAndroid Build Coastguard Workerentry:
207*9880d681SAndroid Build Coastguard Worker  %0 = tail call double asm sideeffect "fmov $0, d8", "=r"() nounwind
208*9880d681SAndroid Build Coastguard Worker  ; CHECK: fmov {{x[0-9]+}}, d8
209*9880d681SAndroid Build Coastguard Worker  ret void
210*9880d681SAndroid Build Coastguard Worker}
211*9880d681SAndroid Build Coastguard Worker
212*9880d681SAndroid Build Coastguard Worker; rdar://problem/14285178
213*9880d681SAndroid Build Coastguard Worker
214*9880d681SAndroid Build Coastguard Workerdefine void @test_zero_reg(i32* %addr) {
215*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test_zero_reg:
216*9880d681SAndroid Build Coastguard Worker
217*9880d681SAndroid Build Coastguard Worker  tail call void asm sideeffect "USE($0)", "z"(i32 0) nounwind
218*9880d681SAndroid Build Coastguard Worker; CHECK: USE(xzr)
219*9880d681SAndroid Build Coastguard Worker
220*9880d681SAndroid Build Coastguard Worker  tail call void asm sideeffect "USE(${0:w})", "zr"(i32 0)
221*9880d681SAndroid Build Coastguard Worker; CHECK: USE(wzr)
222*9880d681SAndroid Build Coastguard Worker
223*9880d681SAndroid Build Coastguard Worker  tail call void asm sideeffect "USE(${0:w})", "zr"(i32 1)
224*9880d681SAndroid Build Coastguard Worker; CHECK: orr [[VAL1:w[0-9]+]], wzr, #0x1
225*9880d681SAndroid Build Coastguard Worker; CHECK: USE([[VAL1]])
226*9880d681SAndroid Build Coastguard Worker
227*9880d681SAndroid Build Coastguard Worker  tail call void asm sideeffect "USE($0), USE($1)", "z,z"(i32 0, i32 0) nounwind
228*9880d681SAndroid Build Coastguard Worker; CHECK: USE(xzr), USE(xzr)
229*9880d681SAndroid Build Coastguard Worker
230*9880d681SAndroid Build Coastguard Worker  tail call void asm sideeffect "USE($0), USE(${1:w})", "z,z"(i32 0, i32 0) nounwind
231*9880d681SAndroid Build Coastguard Worker; CHECK: USE(xzr), USE(wzr)
232*9880d681SAndroid Build Coastguard Worker
233*9880d681SAndroid Build Coastguard Worker  ret void
234*9880d681SAndroid Build Coastguard Worker}
235*9880d681SAndroid Build Coastguard Worker
236*9880d681SAndroid Build Coastguard Workerdefine <2 x float> @test_vreg_64bit(<2 x float> %in) nounwind {
237*9880d681SAndroid Build Coastguard Worker  ; CHECK-LABEL: test_vreg_64bit:
238*9880d681SAndroid Build Coastguard Worker  %1 = tail call <2 x float> asm sideeffect "fadd ${0}.2s, ${1}.2s, ${1}.2s", "={v14},w"(<2 x float> %in) nounwind
239*9880d681SAndroid Build Coastguard Worker  ; CHECK fadd v14.2s, v0.2s, v0.2s:
240*9880d681SAndroid Build Coastguard Worker  ret <2 x float> %1
241*9880d681SAndroid Build Coastguard Worker}
242*9880d681SAndroid Build Coastguard Worker
243*9880d681SAndroid Build Coastguard Workerdefine <4 x float> @test_vreg_128bit(<4 x float> %in) nounwind {
244*9880d681SAndroid Build Coastguard Worker  ; CHECK-LABEL: test_vreg_128bit:
245*9880d681SAndroid Build Coastguard Worker  %1 = tail call <4 x float> asm sideeffect "fadd ${0}.4s, ${1}.4s, ${1}.4s", "={v14},w"(<4 x float> %in) nounwind
246*9880d681SAndroid Build Coastguard Worker  ; CHECK fadd v14.4s, v0.4s, v0.4s:
247*9880d681SAndroid Build Coastguard Worker  ret <4 x float> %1
248*9880d681SAndroid Build Coastguard Worker}
249*9880d681SAndroid Build Coastguard Worker
250*9880d681SAndroid Build Coastguard Workerdefine void @test_constraint_w(i32 %a) {
251*9880d681SAndroid Build Coastguard Worker  ; CHECK: fmov [[SREG:s[0-9]+]], {{w[0-9]+}}
252*9880d681SAndroid Build Coastguard Worker  ; CHECK: sqxtn h0, [[SREG]]
253*9880d681SAndroid Build Coastguard Worker
254*9880d681SAndroid Build Coastguard Worker  tail call void asm sideeffect "sqxtn h0, ${0:s}\0A", "w"(i32 %a)
255*9880d681SAndroid Build Coastguard Worker  ret void
256*9880d681SAndroid Build Coastguard Worker}
257