; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %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 define @add_i8( %pg, %a, %b) { ; CHECK-LABEL: add_i8: ; CHECK: add z0.b, p0/m, z0.b, z1.b ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.add.nxv16i8( %pg, %a, %b) ret %out } define @add_i16( %pg, %a, %b) { ; CHECK-LABEL: add_i16: ; CHECK: add z0.h, p0/m, z0.h, z1.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.add.nxv8i16( %pg, %a, %b) ret %out } define @add_i32( %pg, %a, %b) { ; CHECK-LABEL: add_i32: ; CHECK: add z0.s, p0/m, z0.s, z1.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.add.nxv4i32( %pg, %a, %b) ret %out } define @add_i64( %pg, %a, %b) { ; CHECK-LABEL: add_i64: ; CHECK: add z0.d, p0/m, z0.d, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.add.nxv2i64( %pg, %a, %b) ret %out } define @sub_i8( %pg, %a, %b) { ; CHECK-LABEL: sub_i8: ; CHECK: sub z0.b, p0/m, z0.b, z1.b ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.sub.nxv16i8( %pg, %a, %b) ret %out } define @sub_i16( %pg, %a, %b) { ; CHECK-LABEL: sub_i16: ; CHECK: sub z0.h, p0/m, z0.h, z1.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.sub.nxv8i16( %pg, %a, %b) ret %out } define @sub_i32( %pg, %a, %b) { ; CHECK-LABEL: sub_i32: ; CHECK: sub z0.s, p0/m, z0.s, z1.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.sub.nxv4i32( %pg, %a, %b) ret %out } define @sub_i64( %pg, %a, %b) { ; CHECK-LABEL: sub_i64: ; CHECK: sub z0.d, p0/m, z0.d, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.sub.nxv2i64( %pg, %a, %b) ret %out } define @subr_i8( %pg, %a, %b) { ; CHECK-LABEL: subr_i8: ; CHECK: subr z0.b, p0/m, z0.b, z1.b ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.subr.nxv16i8( %pg, %a, %b) ret %out } define @subr_i16( %pg, %a, %b) { ; CHECK-LABEL: subr_i16: ; CHECK: subr z0.h, p0/m, z0.h, z1.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.subr.nxv8i16( %pg, %a, %b) ret %out } define @subr_i32( %pg, %a, %b) { ; CHECK-LABEL: subr_i32: ; CHECK: subr z0.s, p0/m, z0.s, z1.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.subr.nxv4i32( %pg, %a, %b) ret %out } define @subr_i64( %pg, %a, %b) { ; CHECK-LABEL: subr_i64: ; CHECK: subr z0.d, p0/m, z0.d, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.subr.nxv2i64( %pg, %a, %b) ret %out } define @smax_i8( %pg, %a, %b) { ; CHECK-LABEL: smax_i8: ; CHECK: smax z0.b, p0/m, z0.b, z1.b ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.smax.nxv16i8( %pg, %a, %b) ret %out } define @smax_i16( %pg, %a, %b) { ; CHECK-LABEL: smax_i16: ; CHECK: smax z0.h, p0/m, z0.h, z1.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.smax.nxv8i16( %pg, %a, %b) ret %out } define @smax_i32( %pg, %a, %b) { ; CHECK-LABEL: smax_i32: ; CHECK: smax z0.s, p0/m, z0.s, z1.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.smax.nxv4i32( %pg, %a, %b) ret %out } define @smax_i64( %pg, %a, %b) { ; CHECK-LABEL: smax_i64: ; CHECK: smax z0.d, p0/m, z0.d, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.smax.nxv2i64( %pg, %a, %b) ret %out } define @umax_i8( %pg, %a, %b) { ; CHECK-LABEL: umax_i8: ; CHECK: umax z0.b, p0/m, z0.b, z1.b ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.umax.nxv16i8( %pg, %a, %b) ret %out } define @umax_i16( %pg, %a, %b) { ; CHECK-LABEL: umax_i16: ; CHECK: umax z0.h, p0/m, z0.h, z1.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.umax.nxv8i16( %pg, %a, %b) ret %out } define @umax_i32( %pg, %a, %b) { ; CHECK-LABEL: umax_i32: ; CHECK: umax z0.s, p0/m, z0.s, z1.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.umax.nxv4i32( %pg, %a, %b) ret %out } define @umax_i64( %pg, %a, %b) { ; CHECK-LABEL: umax_i64: ; CHECK: umax z0.d, p0/m, z0.d, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.umax.nxv2i64( %pg, %a, %b) ret %out } define @smin_i8( %pg, %a, %b) { ; CHECK-LABEL: smin_i8: ; CHECK: smin z0.b, p0/m, z0.b, z1.b ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.smin.nxv16i8( %pg, %a, %b) ret %out } define @smin_i16( %pg, %a, %b) { ; CHECK-LABEL: smin_i16: ; CHECK: smin z0.h, p0/m, z0.h, z1.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.smin.nxv8i16( %pg, %a, %b) ret %out } define @smin_i32( %pg, %a, %b) { ; CHECK-LABEL: smin_i32: ; CHECK: smin z0.s, p0/m, z0.s, z1.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.smin.nxv4i32( %pg, %a, %b) ret %out } define @smin_i64( %pg, %a, %b) { ; CHECK-LABEL: smin_i64: ; CHECK: smin z0.d, p0/m, z0.d, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.smin.nxv2i64( %pg, %a, %b) ret %out } define @umin_i8( %pg, %a, %b) { ; CHECK-LABEL: umin_i8: ; CHECK: umin z0.b, p0/m, z0.b, z1.b ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.umin.nxv16i8( %pg, %a, %b) ret %out } define @umin_i16( %pg, %a, %b) { ; CHECK-LABEL: umin_i16: ; CHECK: umin z0.h, p0/m, z0.h, z1.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.umin.nxv8i16( %pg, %a, %b) ret %out } define @umin_i32( %pg, %a, %b) { ; CHECK-LABEL: umin_i32: ; CHECK: umin z0.s, p0/m, z0.s, z1.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.umin.nxv4i32( %pg, %a, %b) ret %out } define @umin_i64( %pg, %a, %b) { ; CHECK-LABEL: umin_i64: ; CHECK: umin z0.d, p0/m, z0.d, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.umin.nxv2i64( %pg, %a, %b) ret %out } define @sabd_i8( %pg, %a, %b) { ; CHECK-LABEL: sabd_i8: ; CHECK: sabd z0.b, p0/m, z0.b, z1.b ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.sabd.nxv16i8( %pg, %a, %b) ret %out } define @sabd_i16( %pg, %a, %b) { ; CHECK-LABEL: sabd_i16: ; CHECK: sabd z0.h, p0/m, z0.h, z1.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.sabd.nxv8i16( %pg, %a, %b) ret %out } define @sabd_i32( %pg, %a, %b) { ; CHECK-LABEL: sabd_i32: ; CHECK: sabd z0.s, p0/m, z0.s, z1.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.sabd.nxv4i32( %pg, %a, %b) ret %out } define @sabd_i64( %pg, %a, %b) { ; CHECK-LABEL: sabd_i64: ; CHECK: sabd z0.d, p0/m, z0.d, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.sabd.nxv2i64( %pg, %a, %b) ret %out } define @uabd_i8( %pg, %a, %b) { ; CHECK-LABEL: uabd_i8: ; CHECK: uabd z0.b, p0/m, z0.b, z1.b ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.uabd.nxv16i8( %pg, %a, %b) ret %out } define @uabd_i16( %pg, %a, %b) { ; CHECK-LABEL: uabd_i16: ; CHECK: uabd z0.h, p0/m, z0.h, z1.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.uabd.nxv8i16( %pg, %a, %b) ret %out } define @uabd_i32( %pg, %a, %b) { ; CHECK-LABEL: uabd_i32: ; CHECK: uabd z0.s, p0/m, z0.s, z1.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.uabd.nxv4i32( %pg, %a, %b) ret %out } define @uabd_i64( %pg, %a, %b) { ; CHECK-LABEL: uabd_i64: ; CHECK: uabd z0.d, p0/m, z0.d, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.uabd.nxv2i64( %pg, %a, %b) ret %out } declare @llvm.aarch64.sve.add.nxv16i8(, , ) declare @llvm.aarch64.sve.add.nxv8i16(, , ) declare @llvm.aarch64.sve.add.nxv4i32(, , ) declare @llvm.aarch64.sve.add.nxv2i64(, , ) declare @llvm.aarch64.sve.sub.nxv16i8(, , ) declare @llvm.aarch64.sve.sub.nxv8i16(, , ) declare @llvm.aarch64.sve.sub.nxv4i32(, , ) declare @llvm.aarch64.sve.sub.nxv2i64(, , ) declare @llvm.aarch64.sve.subr.nxv16i8(, , ) declare @llvm.aarch64.sve.subr.nxv8i16(, , ) declare @llvm.aarch64.sve.subr.nxv4i32(, , ) declare @llvm.aarch64.sve.subr.nxv2i64(, , ) declare @llvm.aarch64.sve.smax.nxv16i8(, , ) declare @llvm.aarch64.sve.smax.nxv8i16(, , ) declare @llvm.aarch64.sve.smax.nxv4i32(, , ) declare @llvm.aarch64.sve.smax.nxv2i64(, , ) declare @llvm.aarch64.sve.umax.nxv16i8(, , ) declare @llvm.aarch64.sve.umax.nxv8i16(, , ) declare @llvm.aarch64.sve.umax.nxv4i32(, , ) declare @llvm.aarch64.sve.umax.nxv2i64(, , ) declare @llvm.aarch64.sve.smin.nxv16i8(, , ) declare @llvm.aarch64.sve.smin.nxv8i16(, , ) declare @llvm.aarch64.sve.smin.nxv4i32(, , ) declare @llvm.aarch64.sve.smin.nxv2i64(, , ) declare @llvm.aarch64.sve.umin.nxv16i8(, , ) declare @llvm.aarch64.sve.umin.nxv8i16(, , ) declare @llvm.aarch64.sve.umin.nxv4i32(, , ) declare @llvm.aarch64.sve.umin.nxv2i64(, , ) declare @llvm.aarch64.sve.sabd.nxv16i8(, , ) declare @llvm.aarch64.sve.sabd.nxv8i16(, , ) declare @llvm.aarch64.sve.sabd.nxv4i32(, , ) declare @llvm.aarch64.sve.sabd.nxv2i64(, , ) declare @llvm.aarch64.sve.uabd.nxv16i8(, , ) declare @llvm.aarch64.sve.uabd.nxv8i16(, , ) declare @llvm.aarch64.sve.uabd.nxv4i32(, , ) declare @llvm.aarch64.sve.uabd.nxv2i64(, , )