; 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 ; ; TBL2 ; define @tbl2_b( %a, %unused, %b, %c) { ; CHECK-LABEL: tbl2_b: ; CHECK: mov z1.d, z0.d ; CHECK-NEXT: tbl z0.b, { z1.b, z2.b }, z3.b ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.tbl2.nxv16i8( %a, %b, %c) ret %out } define @tbl2_h( %a, %unused, %b, %c) { ; CHECK-LABEL: tbl2_h: ; CHECK: mov z1.d, z0.d ; CHECK-NEXT: tbl z0.h, { z1.h, z2.h }, z3.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.tbl2.nxv8i16( %a, %b, %c) ret %out } define @tbl2_s( %a, %unused, %b, %c) { ; CHECK-LABEL: tbl2_s: ; CHECK: mov z1.d, z0.d ; CHECK-NEXT: tbl z0.s, { z1.s, z2.s }, z3.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.tbl2.nxv4i32( %a, %b, %c) ret %out } define @tbl2_d( %a, %unused, %b, %c) { ; CHECK-LABEL: tbl2_d: ; CHECK: mov z1.d, z0.d ; CHECK-NEXT: tbl z0.d, { z1.d, z2.d }, z3.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.tbl2.nxv2i64( %a, %b, %c) ret %out } define @tbl2_fh( %a, %unused, %b, %c) { ; CHECK-LABEL: tbl2_fh: ; CHECK: mov z1.d, z0.d ; CHECK-NEXT: tbl z0.h, { z1.h, z2.h }, z3.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.tbl2.nxv8f16( %a, %b, %c) ret %out } define @tbl2_fs( %a, %unused, %b, %c) { ; CHECK-LABEL: tbl2_fs: ; CHECK: mov z1.d, z0.d ; CHECK-NEXT: tbl z0.s, { z1.s, z2.s }, z3.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.tbl2.nxv4f32( %a, %b, %c) ret %out } define @tbl2_fd( %a, %unused, %b, %c) { ; CHECK-LABEL: tbl2_fd: ; CHECK: mov z1.d, z0.d ; CHECK-NEXT: tbl z0.d, { z1.d, z2.d }, z3.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.tbl2.nxv2f64( %a, %b, %c) ret %out } ; ; TBX ; define @tbx_b( %a, %b, %c) { ; CHECK-LABEL: tbx_b: ; CHECK: tbx z0.b, z1.b, z2.b ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.tbx.nxv16i8( %a, %b, %c) ret %out } define @tbx_h( %a, %b, %c) { ; CHECK-LABEL: tbx_h: ; CHECK: tbx z0.h, z1.h, z2.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.tbx.nxv8i16( %a, %b, %c) ret %out } define @ftbx_h( %a, %b, %c) { ; CHECK-LABEL: ftbx_h: ; CHECK: tbx z0.h, z1.h, z2.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.tbx.nxv8f16( %a, %b, %c) ret %out } define @ftbx_h_bf16( %a, %b, %c) #0 { ; CHECK-LABEL: ftbx_h_bf16: ; CHECK: tbx z0.h, z1.h, z2.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.tbx.nxv8bf16( %a, %b, %c) ret %out } define @tbx_s( %a, %b, %c) { ; CHECK-LABEL: tbx_s: ; CHECK: tbx z0.s, z1.s, z2.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.tbx.nxv4i32( %a, %b, %c) ret %out } define @ftbx_s( %a, %b, %c) { ; CHECK-LABEL: ftbx_s: ; CHECK: tbx z0.s, z1.s, z2.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.tbx.nxv4f32( %a, %b, %c) ret %out } define @tbx_d( %a, %b, %c) { ; CHECK-LABEL: tbx_d: ; CHECK: tbx z0.d, z1.d, z2.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.tbx.nxv2i64( %a, %b, %c) ret %out } define @ftbx_d( %a, %b, %c) { ; CHECK-LABEL: ftbx_d: ; CHECK: tbx z0.d, z1.d, z2.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.tbx.nxv2f64( %a, %b, %c) ret %out } declare @llvm.aarch64.sve.tbl2.nxv16i8(, , ) declare @llvm.aarch64.sve.tbl2.nxv8i16(, , ) declare @llvm.aarch64.sve.tbl2.nxv4i32(, , ) declare @llvm.aarch64.sve.tbl2.nxv2i64(, , ) declare @llvm.aarch64.sve.tbl2.nxv8f16(, , ) declare @llvm.aarch64.sve.tbl2.nxv4f32(, , ) declare @llvm.aarch64.sve.tbl2.nxv2f64(, , ) declare @llvm.aarch64.sve.tbx.nxv16i8(, , ) declare @llvm.aarch64.sve.tbx.nxv8i16(, , ) declare @llvm.aarch64.sve.tbx.nxv4i32(, , ) declare @llvm.aarch64.sve.tbx.nxv2i64(, , ) declare @llvm.aarch64.sve.tbx.nxv8f16(, , ) declare @llvm.aarch64.sve.tbx.nxv4f32(, , ) declare @llvm.aarch64.sve.tbx.nxv2f64(, , ) declare @llvm.aarch64.sve.tbx.nxv8bf16(, , ) ; +bf16 is required for the bfloat version. attributes #0 = { "target-features"="+sve,+bf16" }