; 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 ; ; SMLALB ; define @smlalb_i32( %a, %b, %c) { ; CHECK-LABEL: smlalb_i32 ; CHECK: smlalb z0.s, z1.h, z2.h[1] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.smlalb.lane.nxv4i32( %a, %b, %c, i32 1) ret %res } define @smlalb_i32_2( %a, %b, %c) { ; CHECK-LABEL: smlalb_i32_2 ; CHECK: smlalb z0.s, z1.h, z2.h[7] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.smlalb.lane.nxv4i32( %a, %b, %c, i32 7) ret %res } define @smlalb_i64( %a, %b, %c) { ; CHECK-LABEL: smlalb_i64 ; CHECK: smlalb z0.d, z1.s, z2.s[0] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.smlalb.lane.nxv2i64( %a, %b, %c, i32 0) ret %res } define @smlalb_i64_2( %a, %b, %c) { ; CHECK-LABEL: smlalb_i64_2 ; CHECK: smlalb z0.d, z1.s, z2.s[3] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.smlalb.lane.nxv2i64( %a, %b, %c, i32 3) ret %res } ; ; SMLALT ; define @smlalt_i32( %a, %b, %c) { ; CHECK-LABEL: smlalt_i32 ; CHECK: smlalt z0.s, z1.h, z2.h[1] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.smlalt.lane.nxv4i32( %a, %b, %c, i32 1) ret %res } define @smlalt_i32_2( %a, %b, %c) { ; CHECK-LABEL: smlalt_i32_2 ; CHECK: smlalt z0.s, z1.h, z2.h[7] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.smlalt.lane.nxv4i32( %a, %b, %c, i32 7) ret %res } define @smlalt_i64( %a, %b, %c) { ; CHECK-LABEL: smlalt_i64 ; CHECK: smlalt z0.d, z1.s, z2.s[0] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.smlalt.lane.nxv2i64( %a, %b, %c, i32 0) ret %res } define @smlalt_i64_2( %a, %b, %c) { ; CHECK-LABEL: smlalt_i64_2 ; CHECK: smlalt z0.d, z1.s, z2.s[3] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.smlalt.lane.nxv2i64( %a, %b, %c, i32 3) ret %res } ; ; UMLALB ; define @umlalb_i32( %a, %b, %c) { ; CHECK-LABEL: umlalb_i32 ; CHECK: umlalb z0.s, z1.h, z2.h[1] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.umlalb.lane.nxv4i32( %a, %b, %c, i32 1) ret %res } define @umlalb_i32_2( %a, %b, %c) { ; CHECK-LABEL: umlalb_i32_2 ; CHECK: umlalb z0.s, z1.h, z2.h[7] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.umlalb.lane.nxv4i32( %a, %b, %c, i32 7) ret %res } define @umlalb_i64( %a, %b, %c) { ; CHECK-LABEL: umlalb_i64 ; CHECK: umlalb z0.d, z1.s, z2.s[0] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.umlalb.lane.nxv2i64( %a, %b, %c, i32 0) ret %res } define @umlalb_i64_2( %a, %b, %c) { ; CHECK-LABEL: umlalb_i64_2 ; CHECK: umlalb z0.d, z1.s, z2.s[3] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.umlalb.lane.nxv2i64( %a, %b, %c, i32 3) ret %res } ; ; UMLALT ; define @umlalt_i32( %a, %b, %c) { ; CHECK-LABEL: umlalt_i32 ; CHECK: umlalt z0.s, z1.h, z2.h[1] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.umlalt.lane.nxv4i32( %a, %b, %c, i32 1) ret %res } define @umlalt_i32_2( %a, %b, %c) { ; CHECK-LABEL: umlalt_i32_2 ; CHECK: umlalt z0.s, z1.h, z2.h[7] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.umlalt.lane.nxv4i32( %a, %b, %c, i32 7) ret %res } define @umlalt_i64( %a, %b, %c) { ; CHECK-LABEL: umlalt_i64 ; CHECK: umlalt z0.d, z1.s, z2.s[0] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.umlalt.lane.nxv2i64( %a, %b, %c, i32 0) ret %res } define @umlalt_i64_2( %a, %b, %c) { ; CHECK-LABEL: umlalt_i64_2 ; CHECK: umlalt z0.d, z1.s, z2.s[3] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.umlalt.lane.nxv2i64( %a, %b, %c, i32 3) ret %res } ; ; SMLSLB ; define @smlslb_i32( %a, %b, %c) { ; CHECK-LABEL: smlslb_i32 ; CHECK: smlslb z0.s, z1.h, z2.h[1] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.smlslb.lane.nxv4i32( %a, %b, %c, i32 1) ret %res } define @smlslb_i32_2( %a, %b, %c) { ; CHECK-LABEL: smlslb_i32_2 ; CHECK: smlslb z0.s, z1.h, z2.h[7] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.smlslb.lane.nxv4i32( %a, %b, %c, i32 7) ret %res } define @smlslb_i64( %a, %b, %c) { ; CHECK-LABEL: smlslb_i64 ; CHECK: smlslb z0.d, z1.s, z2.s[0] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.smlslb.lane.nxv2i64( %a, %b, %c, i32 0) ret %res } define @smlslb_i64_2( %a, %b, %c) { ; CHECK-LABEL: smlslb_i64_2 ; CHECK: smlslb z0.d, z1.s, z2.s[3] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.smlslb.lane.nxv2i64( %a, %b, %c, i32 3) ret %res } ; ; SMLSLT ; define @smlslt_i32( %a, %b, %c) { ; CHECK-LABEL: smlslt_i32 ; CHECK: smlslt z0.s, z1.h, z2.h[1] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.smlslt.lane.nxv4i32( %a, %b, %c, i32 1) ret %res } define @smlslt_i32_2( %a, %b, %c) { ; CHECK-LABEL: smlslt_i32_2 ; CHECK: smlslt z0.s, z1.h, z2.h[7] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.smlslt.lane.nxv4i32( %a, %b, %c, i32 7) ret %res } define @smlslt_i64( %a, %b, %c) { ; CHECK-LABEL: smlslt_i64 ; CHECK: smlslt z0.d, z1.s, z2.s[0] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.smlslt.lane.nxv2i64( %a, %b, %c, i32 0) ret %res } define @smlslt_i64_2( %a, %b, %c) { ; CHECK-LABEL: smlslt_i64_2 ; CHECK: smlslt z0.d, z1.s, z2.s[3] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.smlslt.lane.nxv2i64( %a, %b, %c, i32 3) ret %res } ; ; UMLSLB ; define @umlslb_i32( %a, %b, %c) { ; CHECK-LABEL: umlslb_i32 ; CHECK: umlslb z0.s, z1.h, z2.h[1] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.umlslb.lane.nxv4i32( %a, %b, %c, i32 1) ret %res } define @umlslb_i32_2( %a, %b, %c) { ; CHECK-LABEL: umlslb_i32_2 ; CHECK: umlslb z0.s, z1.h, z2.h[7] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.umlslb.lane.nxv4i32( %a, %b, %c, i32 7) ret %res } define @umlslb_i64( %a, %b, %c) { ; CHECK-LABEL: umlslb_i64 ; CHECK: umlslb z0.d, z1.s, z2.s[0] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.umlslb.lane.nxv2i64( %a, %b, %c, i32 0) ret %res } define @umlslb_i64_2( %a, %b, %c) { ; CHECK-LABEL: umlslb_i64_2 ; CHECK: umlslb z0.d, z1.s, z2.s[3] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.umlslb.lane.nxv2i64( %a, %b, %c, i32 3) ret %res } ; ; UMLSLT ; define @umlslt_i32( %a, %b, %c) { ; CHECK-LABEL: umlslt_i32 ; CHECK: umlslt z0.s, z1.h, z2.h[1] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.umlslt.lane.nxv4i32( %a, %b, %c, i32 1) ret %res } define @umlslt_i32_2( %a, %b, %c) { ; CHECK-LABEL: umlslt_i32_2 ; CHECK: umlslt z0.s, z1.h, z2.h[7] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.umlslt.lane.nxv4i32( %a, %b, %c, i32 7) ret %res } define @umlslt_i64( %a, %b, %c) { ; CHECK-LABEL: umlslt_i64 ; CHECK: umlslt z0.d, z1.s, z2.s[0] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.umlslt.lane.nxv2i64( %a, %b, %c, i32 0) ret %res } define @umlslt_i64_2( %a, %b, %c) { ; CHECK-LABEL: umlslt_i64_2 ; CHECK: umlslt z0.d, z1.s, z2.s[3] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.umlslt.lane.nxv2i64( %a, %b, %c, i32 3) ret %res } ; ; SQDMLALB ; define @sqdmlalb_i32( %a, %b, %c) { ; CHECK-LABEL: sqdmlalb_i32 ; CHECK: sqdmlalb z0.s, z1.h, z2.h[1] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.sqdmlalb.lane.nxv4i32( %a, %b, %c, i32 1) ret %res } define @sqdmlalb_i32_2( %a, %b, %c) { ; CHECK-LABEL: sqdmlalb_i32_2 ; CHECK: sqdmlalb z0.s, z1.h, z2.h[7] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.sqdmlalb.lane.nxv4i32( %a, %b, %c, i32 7) ret %res } define @sqdmlalb_i64( %a, %b, %c) { ; CHECK-LABEL: sqdmlalb_i64 ; CHECK: sqdmlalb z0.d, z1.s, z2.s[0] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.sqdmlalb.lane.nxv2i64( %a, %b, %c, i32 0) ret %res } define @sqdmlalb_i64_2( %a, %b, %c) { ; CHECK-LABEL: sqdmlalb_i64_2 ; CHECK: sqdmlalb z0.d, z1.s, z2.s[3] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.sqdmlalb.lane.nxv2i64( %a, %b, %c, i32 3) ret %res } ; ; SQDMLALT ; define @sqdmlalt_i32( %a, %b, %c) { ; CHECK-LABEL: sqdmlalt_i32 ; CHECK: sqdmlalt z0.s, z1.h, z2.h[1] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.sqdmlalt.lane.nxv4i32( %a, %b, %c, i32 1) ret %res } define @sqdmlalt_i32_2( %a, %b, %c) { ; CHECK-LABEL: sqdmlalt_i32_2 ; CHECK: sqdmlalt z0.s, z1.h, z2.h[7] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.sqdmlalt.lane.nxv4i32( %a, %b, %c, i32 7) ret %res } define @sqdmlalt_i64( %a, %b, %c) { ; CHECK-LABEL: sqdmlalt_i64 ; CHECK: sqdmlalt z0.d, z1.s, z2.s[0] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.sqdmlalt.lane.nxv2i64( %a, %b, %c, i32 0) ret %res } define @sqdmlalt_i64_2( %a, %b, %c) { ; CHECK-LABEL: sqdmlalt_i64_2 ; CHECK: sqdmlalt z0.d, z1.s, z2.s[3] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.sqdmlalt.lane.nxv2i64( %a, %b, %c, i32 3) ret %res } ; ; SQDMLSLB ; define @sqdmlslb_i32( %a, %b, %c) { ; CHECK-LABEL: sqdmlslb_i32 ; CHECK: sqdmlslb z0.s, z1.h, z2.h[1] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.sqdmlslb.lane.nxv4i32( %a, %b, %c, i32 1) ret %res } define @sqdmlslb_i32_2( %a, %b, %c) { ; CHECK-LABEL: sqdmlslb_i32_2 ; CHECK: sqdmlslb z0.s, z1.h, z2.h[7] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.sqdmlslb.lane.nxv4i32( %a, %b, %c, i32 7) ret %res } define @sqdmlslb_i64( %a, %b, %c) { ; CHECK-LABEL: sqdmlslb_i64 ; CHECK: sqdmlslb z0.d, z1.s, z2.s[0] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.sqdmlslb.lane.nxv2i64( %a, %b, %c, i32 0) ret %res } define @sqdmlslb_i64_2( %a, %b, %c) { ; CHECK-LABEL: sqdmlslb_i64_2 ; CHECK: sqdmlslb z0.d, z1.s, z2.s[3] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.sqdmlslb.lane.nxv2i64( %a, %b, %c, i32 3) ret %res } ; ; SQDMLSLT ; define @sqdmlslt_i32( %a, %b, %c) { ; CHECK-LABEL: sqdmlslt_i32 ; CHECK: sqdmlslt z0.s, z1.h, z2.h[1] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.sqdmlslt.lane.nxv4i32( %a, %b, %c, i32 1) ret %res } define @sqdmlslt_i32_2( %a, %b, %c) { ; CHECK-LABEL: sqdmlslt_i32_2 ; CHECK: sqdmlslt z0.s, z1.h, z2.h[7] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.sqdmlslt.lane.nxv4i32( %a, %b, %c, i32 7) ret %res } define @sqdmlslt_i64( %a, %b, %c) { ; CHECK-LABEL: sqdmlslt_i64 ; CHECK: sqdmlslt z0.d, z1.s, z2.s[0] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.sqdmlslt.lane.nxv2i64( %a, %b, %c, i32 0) ret %res } define @sqdmlslt_i64_2( %a, %b, %c) { ; CHECK-LABEL: sqdmlslt_i64_2 ; CHECK: sqdmlslt z0.d, z1.s, z2.s[3] ; CHECK-NEXT: ret %res = call @llvm.aarch64.sve.sqdmlslt.lane.nxv2i64( %a, %b, %c, i32 3) ret %res } declare @llvm.aarch64.sve.smlalb.lane.nxv4i32(, , , i32) declare @llvm.aarch64.sve.smlalb.lane.nxv2i64(, , , i32) declare @llvm.aarch64.sve.smlalt.lane.nxv4i32(, , , i32) declare @llvm.aarch64.sve.smlalt.lane.nxv2i64(, , , i32) declare @llvm.aarch64.sve.umlalb.lane.nxv4i32(, , , i32) declare @llvm.aarch64.sve.umlalb.lane.nxv2i64(, , , i32) declare @llvm.aarch64.sve.umlalt.lane.nxv4i32(, , , i32) declare @llvm.aarch64.sve.umlalt.lane.nxv2i64(, , , i32) declare @llvm.aarch64.sve.smlslb.lane.nxv4i32(, , , i32) declare @llvm.aarch64.sve.smlslb.lane.nxv2i64(, , , i32) declare @llvm.aarch64.sve.smlslt.lane.nxv4i32(, , , i32) declare @llvm.aarch64.sve.smlslt.lane.nxv2i64(, , , i32) declare @llvm.aarch64.sve.umlslb.lane.nxv4i32(, , , i32) declare @llvm.aarch64.sve.umlslb.lane.nxv2i64(, , , i32) declare @llvm.aarch64.sve.umlslt.lane.nxv4i32(, , , i32) declare @llvm.aarch64.sve.umlslt.lane.nxv2i64(, , , i32) declare @llvm.aarch64.sve.sqdmlalb.lane.nxv4i32(, , , i32) declare @llvm.aarch64.sve.sqdmlalb.lane.nxv2i64(, , , i32) declare @llvm.aarch64.sve.sqdmlalt.lane.nxv4i32(, , , i32) declare @llvm.aarch64.sve.sqdmlalt.lane.nxv2i64(, , , i32) declare @llvm.aarch64.sve.sqdmlslb.lane.nxv4i32(, , , i32) declare @llvm.aarch64.sve.sqdmlslb.lane.nxv2i64(, , , i32) declare @llvm.aarch64.sve.sqdmlslt.lane.nxv4i32(, , , i32) declare @llvm.aarch64.sve.sqdmlslt.lane.nxv2i64(, , , i32)