1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc < %s -mtriple aarch64-none-linux-gnu -mattr=+sve -stop-after=finalize-isel | FileCheck %s --check-prefix=CHECK
4 target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"
5 target triple = "aarch64-none-linux-gnu"
7 ; Function Attrs: nounwind readnone
8 ; CHECK: [[ARG1:%[0-9]+]]:zpr = COPY $z1
9 ; CHECK: [[ARG2:%[0-9]+]]:zpr = COPY $z0
10 ; CHECK: [[ARG3:%[0-9]+]]:zpr = COPY [[ARG2]]
11 ; CHECK: [[ARG4:%[0-9]+]]:zpr_3b = COPY [[ARG1]]
12 ; CHECK: INLINEASM {{.*}} [[ARG4]]
13 define <vscale x 16 x i8> @test_svadd_i8(<vscale x 16 x i8> %Zn, <vscale x 16 x i8> %Zm) {
14 %1 = tail call <vscale x 16 x i8> asm "add $0.b, $1.b, $2.b", "=w,w,y"(<vscale x 16 x i8> %Zn, <vscale x 16 x i8> %Zm)
15 ret <vscale x 16 x i8> %1
18 ; Function Attrs: nounwind readnone
19 ; CHECK: [[ARG1:%[0-9]+]]:zpr = COPY $z1
20 ; CHECK: [[ARG2:%[0-9]+]]:zpr = COPY $z0
21 ; CHECK: [[ARG3:%[0-9]+]]:zpr = COPY [[ARG2]]
22 ; CHECK: [[ARG4:%[0-9]+]]:zpr_4b = COPY [[ARG1]]
23 ; CHECK: INLINEASM {{.*}} [[ARG4]]
24 define <vscale x 2 x i64> @test_svsub_i64(<vscale x 2 x i64> %Zn, <vscale x 2 x i64> %Zm) {
25 %1 = tail call <vscale x 2 x i64> asm "sub $0.d, $1.d, $2.d", "=w,w,x"(<vscale x 2 x i64> %Zn, <vscale x 2 x i64> %Zm)
26 ret <vscale x 2 x i64> %1
29 ; Function Attrs: nounwind readnone
30 ; CHECK: [[ARG1:%[0-9]+]]:zpr = COPY $z1
31 ; CHECK: [[ARG2:%[0-9]+]]:zpr = COPY $z0
32 ; CHECK: [[ARG3:%[0-9]+]]:zpr = COPY [[ARG2]]
33 ; CHECK: [[ARG4:%[0-9]+]]:zpr_3b = COPY [[ARG1]]
34 ; CHECK: INLINEASM {{.*}} [[ARG4]]
35 define <vscale x 8 x half> @test_svfmul_f16(<vscale x 8 x half> %Zn, <vscale x 8 x half> %Zm) {
36 %1 = tail call <vscale x 8 x half> asm "fmul $0.h, $1.h, $2.h", "=w,w,y"(<vscale x 8 x half> %Zn, <vscale x 8 x half> %Zm)
37 ret <vscale x 8 x half> %1
40 ; Function Attrs: nounwind readnone
41 ; CHECK: [[ARG1:%[0-9]+]]:zpr = COPY $z1
42 ; CHECK: [[ARG2:%[0-9]+]]:zpr = COPY $z0
43 ; CHECK: [[ARG3:%[0-9]+]]:zpr = COPY [[ARG2]]
44 ; CHECK: [[ARG4:%[0-9]+]]:zpr_4b = COPY [[ARG1]]
45 ; CHECK: INLINEASM {{.*}} [[ARG4]]
46 define <vscale x 4 x float> @test_svfmul_f(<vscale x 4 x float> %Zn, <vscale x 4 x float> %Zm) {
47 %1 = tail call <vscale x 4 x float> asm "fmul $0.s, $1.s, $2.s", "=w,w,x"(<vscale x 4 x float> %Zn, <vscale x 4 x float> %Zm)
48 ret <vscale x 4 x float> %1
51 ; Function Attrs: nounwind readnone
52 ; CHECK: [[ARG1:%[0-9]+]]:zpr = COPY $z1
53 ; CHECK: [[ARG2:%[0-9]+]]:zpr = COPY $z0
54 ; CHECK: [[ARG3:%[0-9]+]]:ppr = COPY $p0
55 ; CHECK: [[ARG4:%[0-9]+]]:ppr_3b = COPY [[ARG3]]
56 ; CHECK: INLINEASM {{.*}} [[ARG4]]
57 define <vscale x 8 x half> @test_svfadd_f16(<vscale x 16 x i1> %Pg, <vscale x 8 x half> %Zn, <vscale x 8 x half> %Zm) {
58 %1 = tail call <vscale x 8 x half> asm "fadd $0.h, $1/m, $2.h, $3.h", "=w,@3Upl,w,w"(<vscale x 16 x i1> %Pg, <vscale x 8 x half> %Zn, <vscale x 8 x half> %Zm)
59 ret <vscale x 8 x half> %1
62 ; Function Attrs: nounwind readnone
63 ; CHECK: [[ARG1:%[0-9]+]]:zpr = COPY $z0
64 ; CHECK: [[ARG2:%[0-9]+]]:ppr = COPY $p0
65 ; CHECK: [[ARG3:%[0-9]+]]:ppr = COPY [[ARG2]]
66 ; CHECK: [[ARG4:%[0-9]+]]:zpr = COPY [[ARG1]]
67 ; CHECK: INLINEASM {{.*}} [[ARG3]]
68 define <vscale x 4 x i32> @test_incp(<vscale x 16 x i1> %Pg, <vscale x 4 x i32> %Zn) {
69 %1 = tail call <vscale x 4 x i32> asm "incp $0.s, $1", "=w,@3Upa,0"(<vscale x 16 x i1> %Pg, <vscale x 4 x i32> %Zn)
70 ret <vscale x 4 x i32> %1
73 ; Function Attrs: nounwind readnone
74 ; CHECK: [[ARG1:%[0-9]+]]:zpr = COPY $z1
75 ; CHECK: [[ARG2:%[0-9]+]]:zpr = COPY $z0
76 ; CHECK: [[ARG3:%[0-9]+]]:ppr = COPY $p0
77 ; CHECK: [[ARG4:%[0-9]+]]:ppr_p8to15 = COPY [[ARG3]]
78 ; CHECK: INLINEASM {{.*}} [[ARG4]]
79 define <vscale x 8 x half> @test_svfadd_f16_Uph_constraint(<vscale x 16 x i1> %Pg, <vscale x 8 x half> %Zn, <vscale x 8 x half> %Zm) {
80 %1 = tail call <vscale x 8 x half> asm "fadd $0.h, $1/m, $2.h, $3.h", "=w,@3Uph,w,w"(<vscale x 16 x i1> %Pg, <vscale x 8 x half> %Zn, <vscale x 8 x half> %Zm)
81 ret <vscale x 8 x half> %1
83 ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: