; 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 ; ; SEL (Vectors) ; define @sel_i1( %pg, %a, %b) { ; CHECK-LABEL: sel_i1: ; CHECK: sel p0.b, p0, p1.b, p2.b ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.sel.nxv16i1( %pg, %a, %b) ret %out } define @sel_i8( %pg, %a, %b) { ; CHECK-LABEL: sel_i8: ; CHECK: sel z0.b, p0, z0.b, z1.b ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.sel.nxv16i8( %pg, %a, %b) ret %out } define @sel_i16( %pg, %a, %b) { ; CHECK-LABEL: sel_i16: ; CHECK: sel z0.h, p0, z0.h, z1.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.sel.nxv8i16( %pg, %a, %b) ret %out } define @sel_i32( %pg, %a, %b) { ; CHECK-LABEL: sel_i32: ; CHECK: sel z0.s, p0, z0.s, z1.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.sel.nxv4i32( %pg, %a, %b) ret %out } define @sel_i64( %pg, %a, %b) { ; CHECK-LABEL: sel_i64: ; CHECK: sel z0.d, p0, z0.d, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.sel.nxv2i64( %pg, %a, %b) ret %out } define @sel_bf16( %pg, %a, %b) #0 { ; CHECK-LABEL: sel_bf16: ; CHECK: sel z0.h, p0, z0.h, z1.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.sel.nxv8bf16( %pg, %a, %b) ret %out } define @sel_f16( %pg, %a, %b) { ; CHECK-LABEL: sel_f16: ; CHECK: sel z0.h, p0, z0.h, z1.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.sel.nxv8f16( %pg, %a, %b) ret %out } define @sel_f32( %pg, %a, %b) { ; CHECK-LABEL: sel_f32: ; CHECK: sel z0.s, p0, z0.s, z1.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.sel.nxv4f32( %pg, %a, %b) ret %out } define @sel_f64( %pg, %a, %b) { ; CHECK-LABEL: sel_f64: ; CHECK: sel z0.d, p0, z0.d, z1.d ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.sel.nxv2f64( %pg, %a, %b) ret %out } declare @llvm.aarch64.sve.sel.nxv16i1(, , ) declare @llvm.aarch64.sve.sel.nxv16i8(, , ) declare @llvm.aarch64.sve.sel.nxv8i16(, , ) declare @llvm.aarch64.sve.sel.nxv4i32(, , ) declare @llvm.aarch64.sve.sel.nxv2i64(, , ) declare @llvm.aarch64.sve.sel.nxv8bf16(, , ) declare @llvm.aarch64.sve.sel.nxv8f16(, , ) declare @llvm.aarch64.sve.sel.nxv4f32(, , ) declare @llvm.aarch64.sve.sel.nxv2f64(, , ) ; +bf16 is required for the bfloat version. attributes #0 = { "target-features"="+sve,+bf16" }