1 ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s | FileCheck %s
3 define <vscale x 16 x i8> @mul_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a, <vscale x 16 x i8> %b) {
5 ; CHECK: mul z0.b, p0/m, z0.b, z1.b
7 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.mul.nxv16i8(<vscale x 16 x i1> %pg,
10 ret <vscale x 16 x i8> %out
13 define <vscale x 8 x i16> @mul_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a, <vscale x 8 x i16> %b) {
14 ; CHECK-LABEL: mul_i16:
15 ; CHECK: mul z0.h, p0/m, z0.h, z1.h
17 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.mul.nxv8i16(<vscale x 8 x i1> %pg,
18 <vscale x 8 x i16> %a,
19 <vscale x 8 x i16> %b)
20 ret <vscale x 8 x i16> %out
23 define <vscale x 4 x i32> @mul_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
24 ; CHECK-LABEL: mul_i32:
25 ; CHECK: mul z0.s, p0/m, z0.s, z1.s
27 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.mul.nxv4i32(<vscale x 4 x i1> %pg,
28 <vscale x 4 x i32> %a,
29 <vscale x 4 x i32> %b)
30 ret <vscale x 4 x i32> %out
33 define <vscale x 2 x i64> @mul_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
34 ; CHECK-LABEL: mul_i64:
35 ; CHECK: mul z0.d, p0/m, z0.d, z1.d
37 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.mul.nxv2i64(<vscale x 2 x i1> %pg,
38 <vscale x 2 x i64> %a,
39 <vscale x 2 x i64> %b)
40 ret <vscale x 2 x i64> %out
43 define <vscale x 16 x i8> @smulh_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a, <vscale x 16 x i8> %b) {
44 ; CHECK-LABEL: smulh_i8:
45 ; CHECK: smulh z0.b, p0/m, z0.b, z1.b
47 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.smulh.nxv16i8(<vscale x 16 x i1> %pg,
48 <vscale x 16 x i8> %a,
49 <vscale x 16 x i8> %b)
50 ret <vscale x 16 x i8> %out
53 define <vscale x 8 x i16> @smulh_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a, <vscale x 8 x i16> %b) {
54 ; CHECK-LABEL: smulh_i16:
55 ; CHECK: smulh z0.h, p0/m, z0.h, z1.h
57 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.smulh.nxv8i16(<vscale x 8 x i1> %pg,
58 <vscale x 8 x i16> %a,
59 <vscale x 8 x i16> %b)
60 ret <vscale x 8 x i16> %out
63 define <vscale x 4 x i32> @smulh_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
64 ; CHECK-LABEL: smulh_i32:
65 ; CHECK: smulh z0.s, p0/m, z0.s, z1.s
67 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.smulh.nxv4i32(<vscale x 4 x i1> %pg,
68 <vscale x 4 x i32> %a,
69 <vscale x 4 x i32> %b)
70 ret <vscale x 4 x i32> %out
73 define <vscale x 2 x i64> @smulh_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
74 ; CHECK-LABEL: smulh_i64:
75 ; CHECK: smulh z0.d, p0/m, z0.d, z1.d
77 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.smulh.nxv2i64(<vscale x 2 x i1> %pg,
78 <vscale x 2 x i64> %a,
79 <vscale x 2 x i64> %b)
80 ret <vscale x 2 x i64> %out
83 define <vscale x 16 x i8> @umulh_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a, <vscale x 16 x i8> %b) {
84 ; CHECK-LABEL: umulh_i8:
85 ; CHECK: umulh z0.b, p0/m, z0.b, z1.b
87 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.umulh.nxv16i8(<vscale x 16 x i1> %pg,
88 <vscale x 16 x i8> %a,
89 <vscale x 16 x i8> %b)
90 ret <vscale x 16 x i8> %out
93 define <vscale x 8 x i16> @umulh_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a, <vscale x 8 x i16> %b) {
94 ; CHECK-LABEL: umulh_i16:
95 ; CHECK: umulh z0.h, p0/m, z0.h, z1.h
97 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.umulh.nxv8i16(<vscale x 8 x i1> %pg,
98 <vscale x 8 x i16> %a,
99 <vscale x 8 x i16> %b)
100 ret <vscale x 8 x i16> %out
103 define <vscale x 4 x i32> @umulh_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
104 ; CHECK-LABEL: umulh_i32:
105 ; CHECK: umulh z0.s, p0/m, z0.s, z1.s
107 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.umulh.nxv4i32(<vscale x 4 x i1> %pg,
108 <vscale x 4 x i32> %a,
109 <vscale x 4 x i32> %b)
110 ret <vscale x 4 x i32> %out
113 define <vscale x 2 x i64> @umulh_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
114 ; CHECK-LABEL: umulh_i64:
115 ; CHECK: umulh z0.d, p0/m, z0.d, z1.d
117 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.umulh.nxv2i64(<vscale x 2 x i1> %pg,
118 <vscale x 2 x i64> %a,
119 <vscale x 2 x i64> %b)
120 ret <vscale x 2 x i64> %out
123 declare <vscale x 16 x i8> @llvm.aarch64.sve.mul.nxv16i8(<vscale x 16 x i1>, <vscale x 16 x i8>, <vscale x 16 x i8>)
124 declare <vscale x 8 x i16> @llvm.aarch64.sve.mul.nxv8i16(<vscale x 8 x i1>, <vscale x 8 x i16>, <vscale x 8 x i16>)
125 declare <vscale x 4 x i32> @llvm.aarch64.sve.mul.nxv4i32(<vscale x 4 x i1>, <vscale x 4 x i32>, <vscale x 4 x i32>)
126 declare <vscale x 2 x i64> @llvm.aarch64.sve.mul.nxv2i64(<vscale x 2 x i1>, <vscale x 2 x i64>, <vscale x 2 x i64>)
127 declare <vscale x 16 x i8> @llvm.aarch64.sve.smulh.nxv16i8(<vscale x 16 x i1>, <vscale x 16 x i8>, <vscale x 16 x i8>)
128 declare <vscale x 8 x i16> @llvm.aarch64.sve.smulh.nxv8i16(<vscale x 8 x i1>, <vscale x 8 x i16>, <vscale x 8 x i16>)
129 declare <vscale x 4 x i32> @llvm.aarch64.sve.smulh.nxv4i32(<vscale x 4 x i1>, <vscale x 4 x i32>, <vscale x 4 x i32>)
130 declare <vscale x 2 x i64> @llvm.aarch64.sve.smulh.nxv2i64(<vscale x 2 x i1>, <vscale x 2 x i64>, <vscale x 2 x i64>)
131 declare <vscale x 16 x i8> @llvm.aarch64.sve.umulh.nxv16i8(<vscale x 16 x i1>, <vscale x 16 x i8>, <vscale x 16 x i8>)
132 declare <vscale x 8 x i16> @llvm.aarch64.sve.umulh.nxv8i16(<vscale x 8 x i1>, <vscale x 8 x i16>, <vscale x 8 x i16>)
133 declare <vscale x 4 x i32> @llvm.aarch64.sve.umulh.nxv4i32(<vscale x 4 x i1>, <vscale x 4 x i32>, <vscale x 4 x i32>)
134 declare <vscale x 2 x i64> @llvm.aarch64.sve.umulh.nxv2i64(<vscale x 2 x i1>, <vscale x 2 x i64>, <vscale x 2 x i64>)