1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s | FileCheck %s
3 ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sme < %s | FileCheck %s
9 define <vscale x 8 x i16> @sxtb_i16(<vscale x 8 x i16> %a, <vscale x 8 x i1> %pg, <vscale x 8 x i16> %b) {
10 ; CHECK-LABEL: sxtb_i16:
12 ; CHECK-NEXT: sxtb z0.h, p0/m, z1.h
14 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.sxtb.nxv8i16(<vscale x 8 x i16> %a,
15 <vscale x 8 x i1> %pg,
16 <vscale x 8 x i16> %b)
17 ret <vscale x 8 x i16> %out
20 define <vscale x 4 x i32> @sxtb_i32(<vscale x 4 x i32> %a, <vscale x 4 x i1> %pg, <vscale x 4 x i32> %b) {
21 ; CHECK-LABEL: sxtb_i32:
23 ; CHECK-NEXT: sxtb z0.s, p0/m, z1.s
25 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.sxtb.nxv4i32(<vscale x 4 x i32> %a,
26 <vscale x 4 x i1> %pg,
27 <vscale x 4 x i32> %b)
28 ret <vscale x 4 x i32> %out
31 define <vscale x 2 x i64> @sxtb_i64(<vscale x 2 x i64> %a, <vscale x 2 x i1> %pg, <vscale x 2 x i64> %b) {
32 ; CHECK-LABEL: sxtb_i64:
34 ; CHECK-NEXT: sxtb z0.d, p0/m, z1.d
36 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.sxtb.nxv2i64(<vscale x 2 x i64> %a,
37 <vscale x 2 x i1> %pg,
38 <vscale x 2 x i64> %b)
39 ret <vscale x 2 x i64> %out
46 define <vscale x 4 x i32> @sxth_i32(<vscale x 4 x i32> %a, <vscale x 4 x i1> %pg, <vscale x 4 x i32> %b) {
47 ; CHECK-LABEL: sxth_i32:
49 ; CHECK-NEXT: sxth z0.s, p0/m, z1.s
51 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.sxth.nxv4i32(<vscale x 4 x i32> %a,
52 <vscale x 4 x i1> %pg,
53 <vscale x 4 x i32> %b)
54 ret <vscale x 4 x i32> %out
57 define <vscale x 2 x i64> @sxth_i64(<vscale x 2 x i64> %a, <vscale x 2 x i1> %pg, <vscale x 2 x i64> %b) {
58 ; CHECK-LABEL: sxth_i64:
60 ; CHECK-NEXT: sxth z0.d, p0/m, z1.d
62 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.sxth.nxv2i64(<vscale x 2 x i64> %a,
63 <vscale x 2 x i1> %pg,
64 <vscale x 2 x i64> %b)
65 ret <vscale x 2 x i64> %out
72 define <vscale x 2 x i64> @sxtw_i64(<vscale x 2 x i64> %a, <vscale x 2 x i1> %pg, <vscale x 2 x i64> %b) {
73 ; CHECK-LABEL: sxtw_i64:
75 ; CHECK-NEXT: sxtw z0.d, p0/m, z1.d
77 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.sxtw.nxv2i64(<vscale x 2 x i64> %a,
78 <vscale x 2 x i1> %pg,
79 <vscale x 2 x i64> %b)
80 ret <vscale x 2 x i64> %out
87 define <vscale x 8 x i16> @uxtb_i16(<vscale x 8 x i16> %a, <vscale x 8 x i1> %pg, <vscale x 8 x i16> %b) {
88 ; CHECK-LABEL: uxtb_i16:
90 ; CHECK-NEXT: uxtb z0.h, p0/m, z1.h
92 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.uxtb.nxv8i16(<vscale x 8 x i16> %a,
93 <vscale x 8 x i1> %pg,
94 <vscale x 8 x i16> %b)
95 ret <vscale x 8 x i16> %out
98 define <vscale x 4 x i32> @uxtb_i32(<vscale x 4 x i32> %a, <vscale x 4 x i1> %pg, <vscale x 4 x i32> %b) {
99 ; CHECK-LABEL: uxtb_i32:
101 ; CHECK-NEXT: uxtb z0.s, p0/m, z1.s
103 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.uxtb.nxv4i32(<vscale x 4 x i32> %a,
104 <vscale x 4 x i1> %pg,
105 <vscale x 4 x i32> %b)
106 ret <vscale x 4 x i32> %out
109 define <vscale x 2 x i64> @uxtb_i64(<vscale x 2 x i64> %a, <vscale x 2 x i1> %pg, <vscale x 2 x i64> %b) {
110 ; CHECK-LABEL: uxtb_i64:
112 ; CHECK-NEXT: uxtb z0.d, p0/m, z1.d
114 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.uxtb.nxv2i64(<vscale x 2 x i64> %a,
115 <vscale x 2 x i1> %pg,
116 <vscale x 2 x i64> %b)
117 ret <vscale x 2 x i64> %out
124 define <vscale x 4 x i32> @uxth_i32(<vscale x 4 x i32> %a, <vscale x 4 x i1> %pg, <vscale x 4 x i32> %b) {
125 ; CHECK-LABEL: uxth_i32:
127 ; CHECK-NEXT: uxth z0.s, p0/m, z1.s
129 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.uxth.nxv4i32(<vscale x 4 x i32> %a,
130 <vscale x 4 x i1> %pg,
131 <vscale x 4 x i32> %b)
132 ret <vscale x 4 x i32> %out
135 define <vscale x 2 x i64> @uxth_i64(<vscale x 2 x i64> %a, <vscale x 2 x i1> %pg, <vscale x 2 x i64> %b) {
136 ; CHECK-LABEL: uxth_i64:
138 ; CHECK-NEXT: uxth z0.d, p0/m, z1.d
140 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.uxth.nxv2i64(<vscale x 2 x i64> %a,
141 <vscale x 2 x i1> %pg,
142 <vscale x 2 x i64> %b)
143 ret <vscale x 2 x i64> %out
150 define <vscale x 2 x i64> @uxtw_i64(<vscale x 2 x i64> %a, <vscale x 2 x i1> %pg, <vscale x 2 x i64> %b) {
151 ; CHECK-LABEL: uxtw_i64:
153 ; CHECK-NEXT: uxtw z0.d, p0/m, z1.d
155 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.uxtw.nxv2i64(<vscale x 2 x i64> %a,
156 <vscale x 2 x i1> %pg,
157 <vscale x 2 x i64> %b)
158 ret <vscale x 2 x i64> %out
161 declare <vscale x 8 x i16> @llvm.aarch64.sve.sxtb.nxv8i16(<vscale x 8 x i16>, <vscale x 8 x i1>, <vscale x 8 x i16>)
162 declare <vscale x 4 x i32> @llvm.aarch64.sve.sxtb.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i1>, <vscale x 4 x i32>)
163 declare <vscale x 2 x i64> @llvm.aarch64.sve.sxtb.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i1>, <vscale x 2 x i64>)
164 declare <vscale x 4 x i32> @llvm.aarch64.sve.sxth.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i1>, <vscale x 4 x i32>)
165 declare <vscale x 2 x i64> @llvm.aarch64.sve.sxth.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i1>, <vscale x 2 x i64>)
166 declare <vscale x 2 x i64> @llvm.aarch64.sve.sxtw.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i1>, <vscale x 2 x i64>)
168 declare <vscale x 8 x i16> @llvm.aarch64.sve.uxtb.nxv8i16(<vscale x 8 x i16>, <vscale x 8 x i1>, <vscale x 8 x i16>)
169 declare <vscale x 4 x i32> @llvm.aarch64.sve.uxtb.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i1>, <vscale x 4 x i32>)
170 declare <vscale x 2 x i64> @llvm.aarch64.sve.uxtb.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i1>, <vscale x 2 x i64>)
171 declare <vscale x 4 x i32> @llvm.aarch64.sve.uxth.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i1>, <vscale x 4 x i32>)
172 declare <vscale x 2 x i64> @llvm.aarch64.sve.uxth.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i1>, <vscale x 2 x i64>)
173 declare <vscale x 2 x i64> @llvm.aarch64.sve.uxtw.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i1>, <vscale x 2 x i64>)