; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve2 < %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 ; ; CADD ; define @cadd_b( %a, %b) { ; CHECK-LABEL: cadd_b: ; CHECK: cadd z0.b, z0.b, z1.b, #90 ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cadd.x.nxv16i8( %a, %b, i32 90) ret %out } define @cadd_h( %a, %b) { ; CHECK-LABEL: cadd_h: ; CHECK: cadd z0.h, z0.h, z1.h, #90 ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cadd.x.nxv8i16( %a, %b, i32 90) ret %out } define @cadd_s( %a, %b) { ; CHECK-LABEL: cadd_s: ; CHECK: cadd z0.s, z0.s, z1.s, #270 ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cadd.x.nxv4i32( %a, %b, i32 270) ret %out } define @cadd_d( %a, %b) { ; CHECK-LABEL: cadd_d: ; CHECK: cadd z0.d, z0.d, z1.d, #270 ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cadd.x.nxv2i64( %a, %b, i32 270) ret %out } ; ; SQCADD ; define @sqcadd_b( %a, %b) { ; CHECK-LABEL: sqcadd_b: ; CHECK: sqcadd z0.b, z0.b, z1.b, #90 ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.sqcadd.x.nxv16i8( %a, %b, i32 90) ret %out } define @sqcadd_h( %a, %b) { ; CHECK-LABEL: sqcadd_h: ; CHECK: sqcadd z0.h, z0.h, z1.h, #90 ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.sqcadd.x.nxv8i16( %a, %b, i32 90) ret %out } define @sqcadd_s( %a, %b) { ; CHECK-LABEL: sqcadd_s: ; CHECK: sqcadd z0.s, z0.s, z1.s, #270 ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.sqcadd.x.nxv4i32( %a, %b, i32 270) ret %out } define @sqcadd_d( %a, %b) { ; CHECK-LABEL: sqcadd_d: ; CHECK: sqcadd z0.d, z0.d, z1.d, #270 ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.sqcadd.x.nxv2i64( %a, %b, i32 270) ret %out } ; ; CMLA ; define @cmla_b( %a, %b, %c) { ; CHECK-LABEL: cmla_b: ; CHECK: cmla z0.b, z1.b, z2.b, #90 ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmla.x.nxv16i8( %a, %b, %c, i32 90) ret %out } define @cmla_h( %a, %b, %c) { ; CHECK-LABEL: cmla_h: ; CHECK: cmla z0.h, z1.h, z2.h, #180 ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmla.x.nxv8i16( %a, %b, %c, i32 180) ret %out } define @cmla_s( %a, %b, %c) { ; CHECK-LABEL: cmla_s: ; CHECK: cmla z0.s, z1.s, z2.s, #270 ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmla.x.nxv4i32( %a, %b, %c, i32 270) ret %out } define @cmla_d( %a, %b, %c) { ; CHECK-LABEL: cmla_d: ; CHECK: cmla z0.d, z1.d, z2.d, #0 ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmla.x.nxv2i64( %a, %b, %c, i32 0) ret %out } ; ; CMLA_LANE ; define @cmla_lane_h( %a, %b, %c) { ; CHECK-LABEL: cmla_lane_h: ; CHECK: cmla z0.h, z1.h, z2.h[1], #180 ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmla.lane.x.nxv8i16( %a, %b, %c, i32 1, i32 180) ret %out } define @cmla_lane_s( %a, %b, %c) { ; CHECK-LABEL: cmla_lane_s: ; CHECK: cmla z0.s, z1.s, z2.s[0], #270 ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.cmla.lane.x.nxv4i32( %a, %b, %c, i32 0, i32 270) ret %out } ; ; QRDCMLAH ; define @sqrdcmlah_b( %a, %b, %c) { ; CHECK-LABEL: sqrdcmlah_b: ; CHECK: sqrdcmlah z0.b, z1.b, z2.b, #0 ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.sqrdcmlah.x.nxv16i8( %a, %b, %c, i32 0) ret %out } define @sqrdcmlah_h( %a, %b, %c) { ; CHECK-LABEL: sqrdcmlah_h: ; CHECK: sqrdcmlah z0.h, z1.h, z2.h, #90 ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.sqrdcmlah.x.nxv8i16( %a, %b, %c, i32 90) ret %out } define @sqrdcmlah_s( %a, %b, %c) { ; CHECK-LABEL: sqrdcmlah_s: ; CHECK: sqrdcmlah z0.s, z1.s, z2.s, #180 ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.sqrdcmlah.x.nxv4i32( %a, %b, %c, i32 180) ret %out } define @sqrdcmlah_d( %a, %b, %c) { ; CHECK-LABEL: sqrdcmlah_d: ; CHECK: sqrdcmlah z0.d, z1.d, z2.d, #270 ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.sqrdcmlah.x.nxv2i64( %a, %b, %c, i32 270) ret %out } ; ; QRDCMLAH_LANE ; define @sqrdcmlah_lane_h( %a, %b, %c) { ; CHECK-LABEL: sqrdcmlah_lane_h: ; CHECK: sqrdcmlah z0.h, z1.h, z2.h[1], #90 ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.sqrdcmlah.lane.x.nxv8i16( %a, %b, %c, i32 1, i32 90) ret %out } define @sqrdcmlah_lane_s( %a, %b, %c) { ; CHECK-LABEL: sqrdcmlah_lane_s: ; CHECK: sqrdcmlah z0.s, z1.s, z2.s[0], #180 ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.sqrdcmlah.lane.x.nxv4i32( %a, %b, %c, i32 0, i32 180) ret %out } declare @llvm.aarch64.sve.cadd.x.nxv16i8(, , i32) declare @llvm.aarch64.sve.cadd.x.nxv8i16(, , i32) declare @llvm.aarch64.sve.cadd.x.nxv4i32(, , i32) declare @llvm.aarch64.sve.cadd.x.nxv2i64(, , i32) declare @llvm.aarch64.sve.sqcadd.x.nxv16i8(, , i32) declare @llvm.aarch64.sve.sqcadd.x.nxv8i16(, , i32) declare @llvm.aarch64.sve.sqcadd.x.nxv4i32(, , i32) declare @llvm.aarch64.sve.sqcadd.x.nxv2i64(, , i32) declare @llvm.aarch64.sve.cmla.x.nxv16i8(, , , i32) declare @llvm.aarch64.sve.cmla.x.nxv8i16(, , , i32) declare @llvm.aarch64.sve.cmla.x.nxv4i32(, , , i32) declare @llvm.aarch64.sve.cmla.x.nxv2i64(, , , i32) declare @llvm.aarch64.sve.cmla.lane.x.nxv8i16(, , , i32, i32) declare @llvm.aarch64.sve.cmla.lane.x.nxv4i32(, , , i32, i32) declare @llvm.aarch64.sve.sqrdcmlah.x.nxv16i8(, , , i32) declare @llvm.aarch64.sve.sqrdcmlah.x.nxv8i16(, , , i32) declare @llvm.aarch64.sve.sqrdcmlah.x.nxv4i32(, , , i32) declare @llvm.aarch64.sve.sqrdcmlah.x.nxv2i64(, , , i32) declare @llvm.aarch64.sve.sqrdcmlah.lane.x.nxv8i16(, , , i32, i32) declare @llvm.aarch64.sve.sqrdcmlah.lane.x.nxv4i32(, , , i32, i32)