1 ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve -verify-machineinstrs < %s | FileCheck %s
7 define <vscale x 4 x i32> @adrb_i32(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
8 ; CHECK-LABEL: adrb_i32:
9 ; CHECK: adr z0.s, [z0.s, z1.s]
11 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.adrb.nxv4i32(<vscale x 4 x i32> %a,
12 <vscale x 4 x i32> %b)
13 ret <vscale x 4 x i32> %out
16 define <vscale x 2 x i64> @adrb_i64(<vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
17 ; CHECK-LABEL: adrb_i64:
18 ; CHECK: adr z0.d, [z0.d, z1.d]
20 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.adrb.nxv2i64(<vscale x 2 x i64> %a,
21 <vscale x 2 x i64> %b)
22 ret <vscale x 2 x i64> %out
29 define <vscale x 4 x i32> @adrh_i32(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
30 ; CHECK-LABEL: adrh_i32:
31 ; CHECK: adr z0.s, [z0.s, z1.s, lsl #1]
33 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.adrh.nxv4i32(<vscale x 4 x i32> %a,
34 <vscale x 4 x i32> %b)
35 ret <vscale x 4 x i32> %out
38 define <vscale x 2 x i64> @adrh_i64(<vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
39 ; CHECK-LABEL: adrh_i64:
40 ; CHECK: adr z0.d, [z0.d, z1.d, lsl #1]
42 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.adrh.nxv2i64(<vscale x 2 x i64> %a,
43 <vscale x 2 x i64> %b)
44 ret <vscale x 2 x i64> %out
51 define <vscale x 4 x i32> @adrw_i32(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
52 ; CHECK-LABEL: adrw_i32:
53 ; CHECK: adr z0.s, [z0.s, z1.s, lsl #2]
55 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.adrw.nxv4i32(<vscale x 4 x i32> %a,
56 <vscale x 4 x i32> %b)
57 ret <vscale x 4 x i32> %out
60 define <vscale x 2 x i64> @adrw_i64(<vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
61 ; CHECK-LABEL: adrw_i64:
62 ; CHECK: adr z0.d, [z0.d, z1.d, lsl #2]
64 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.adrw.nxv2i64(<vscale x 2 x i64> %a,
65 <vscale x 2 x i64> %b)
66 ret <vscale x 2 x i64> %out
73 define <vscale x 4 x i32> @adrd_i32(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
74 ; CHECK-LABEL: adrd_i32:
75 ; CHECK: adr z0.s, [z0.s, z1.s, lsl #3]
77 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.adrd.nxv4i32(<vscale x 4 x i32> %a,
78 <vscale x 4 x i32> %b)
79 ret <vscale x 4 x i32> %out
82 define <vscale x 2 x i64> @adrd_i64(<vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
83 ; CHECK-LABEL: adrd_i64:
84 ; CHECK: adr z0.d, [z0.d, z1.d, lsl #3]
86 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.adrd.nxv2i64(<vscale x 2 x i64> %a,
87 <vscale x 2 x i64> %b)
88 ret <vscale x 2 x i64> %out
91 declare <vscale x 4 x i32> @llvm.aarch64.sve.adrb.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i32>)
92 declare <vscale x 2 x i64> @llvm.aarch64.sve.adrb.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i64>)
94 declare <vscale x 4 x i32> @llvm.aarch64.sve.adrh.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i32>)
95 declare <vscale x 2 x i64> @llvm.aarch64.sve.adrh.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i64>)
97 declare <vscale x 4 x i32> @llvm.aarch64.sve.adrw.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i32>)
98 declare <vscale x 2 x i64> @llvm.aarch64.sve.adrw.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i64>)
100 declare <vscale x 4 x i32> @llvm.aarch64.sve.adrd.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i32>)
101 declare <vscale x 2 x i64> @llvm.aarch64.sve.adrd.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i64>)