; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve -verify-machineinstrs < %s 2>%t | FileCheck %s ; RUN: FileCheck --check-prefix=WARN --allow-empty %s <%t ; If this check fails please read test/CodeGen/AArch64/README for instructions on how to resolve it. ; WARN-NOT: warning ; ; ADRB ; define @adrb_i32( %a, %b) { ; CHECK-LABEL: adrb_i32: ; CHECK: adr z0.s, [z0.s, z1.s] ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.adrb.nxv4i32( %a, %b) ret %out } define @adrb_i64( %a, %b) { ; CHECK-LABEL: adrb_i64: ; CHECK: adr z0.d, [z0.d, z1.d] ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.adrb.nxv2i64( %a, %b) ret %out } ; ; ADRH ; define @adrh_i32( %a, %b) { ; CHECK-LABEL: adrh_i32: ; CHECK: adr z0.s, [z0.s, z1.s, lsl #1] ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.adrh.nxv4i32( %a, %b) ret %out } define @adrh_i64( %a, %b) { ; CHECK-LABEL: adrh_i64: ; CHECK: adr z0.d, [z0.d, z1.d, lsl #1] ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.adrh.nxv2i64( %a, %b) ret %out } ; ; ADRW ; define @adrw_i32( %a, %b) { ; CHECK-LABEL: adrw_i32: ; CHECK: adr z0.s, [z0.s, z1.s, lsl #2] ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.adrw.nxv4i32( %a, %b) ret %out } define @adrw_i64( %a, %b) { ; CHECK-LABEL: adrw_i64: ; CHECK: adr z0.d, [z0.d, z1.d, lsl #2] ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.adrw.nxv2i64( %a, %b) ret %out } ; ; ADRD ; define @adrd_i32( %a, %b) { ; CHECK-LABEL: adrd_i32: ; CHECK: adr z0.s, [z0.s, z1.s, lsl #3] ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.adrd.nxv4i32( %a, %b) ret %out } define @adrd_i64( %a, %b) { ; CHECK-LABEL: adrd_i64: ; CHECK: adr z0.d, [z0.d, z1.d, lsl #3] ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.adrd.nxv2i64( %a, %b) ret %out } declare @llvm.aarch64.sve.adrb.nxv4i32(, ) declare @llvm.aarch64.sve.adrb.nxv2i64(, ) declare @llvm.aarch64.sve.adrh.nxv4i32(, ) declare @llvm.aarch64.sve.adrh.nxv2i64(, ) declare @llvm.aarch64.sve.adrw.nxv4i32(, ) declare @llvm.aarch64.sve.adrw.nxv2i64(, ) declare @llvm.aarch64.sve.adrd.nxv4i32(, ) declare @llvm.aarch64.sve.adrd.nxv2i64(, )