; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve,+bf16 -asm-verbose=0 < %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 ; ; BFDOT ; define @bfdot_f32( %a, %b, %c) nounwind { ; CHECK-LABEL: bfdot_f32: ; CHECK-NEXT: bfdot z0.s, z1.h, z2.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.bfdot( %a, %b, %c) ret %out } define @bfdot_lane_0_f32( %a, %b, %c) nounwind { ; CHECK-LABEL: bfdot_lane_0_f32: ; CHECK-NEXT: bfdot z0.s, z1.h, z2.h[0] ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.bfdot.lane( %a, %b, %c, i64 0) ret %out } define @bfdot_lane_1_f32( %a, %b, %c) nounwind { ; CHECK-LABEL: bfdot_lane_1_f32: ; CHECK-NEXT: bfdot z0.s, z1.h, z2.h[1] ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.bfdot.lane( %a, %b, %c, i64 1) ret %out } define @bfdot_lane_2_f32( %a, %b, %c) nounwind { ; CHECK-LABEL: bfdot_lane_2_f32: ; CHECK-NEXT: bfdot z0.s, z1.h, z2.h[2] ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.bfdot.lane( %a, %b, %c, i64 2) ret %out } define @bfdot_lane_3_f32( %a, %b, %c) nounwind { ; CHECK-LABEL: bfdot_lane_3_f32: ; CHECK-NEXT: bfdot z0.s, z1.h, z2.h[3] ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.bfdot.lane( %a, %b, %c, i64 3) ret %out } ; ; BFMLALB ; define @bfmlalb_f32( %a, %b, %c) nounwind { ; CHECK-LABEL: bfmlalb_f32: ; CHECK-NEXT: bfmlalb z0.s, z1.h, z2.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.bfmlalb( %a, %b, %c) ret %out } define @bfmlalb_lane_0_f32( %a, %b, %c) nounwind { ; CHECK-LABEL: bfmlalb_lane_0_f32: ; CHECK-NEXT: bfmlalb z0.s, z1.h, z2.h[0] ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.bfmlalb.lane( %a, %b, %c, i64 0) ret %out } define @bfmlalb_lane_1_f32( %a, %b, %c) nounwind { ; CHECK-LABEL: bfmlalb_lane_1_f32: ; CHECK-NEXT: bfmlalb z0.s, z1.h, z2.h[1] ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.bfmlalb.lane( %a, %b, %c, i64 1) ret %out } define @bfmlalb_lane_2_f32( %a, %b, %c) nounwind { ; CHECK-LABEL: bfmlalb_lane_2_f32: ; CHECK-NEXT: bfmlalb z0.s, z1.h, z2.h[2] ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.bfmlalb.lane( %a, %b, %c, i64 2) ret %out } define @bfmlalb_lane_3_f32( %a, %b, %c) nounwind { ; CHECK-LABEL: bfmlalb_lane_3_f32: ; CHECK-NEXT: bfmlalb z0.s, z1.h, z2.h[3] ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.bfmlalb.lane( %a, %b, %c, i64 3) ret %out } define @bfmlalb_lane_4_f32( %a, %b, %c) nounwind { ; CHECK-LABEL: bfmlalb_lane_4_f32: ; CHECK-NEXT: bfmlalb z0.s, z1.h, z2.h[4] ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.bfmlalb.lane( %a, %b, %c, i64 4) ret %out } define @bfmlalb_lane_5_f32( %a, %b, %c) nounwind { ; CHECK-LABEL: bfmlalb_lane_5_f32: ; CHECK-NEXT: bfmlalb z0.s, z1.h, z2.h[5] ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.bfmlalb.lane( %a, %b, %c, i64 5) ret %out } define @bfmlalb_lane_6_f32( %a, %b, %c) nounwind { ; CHECK-LABEL: bfmlalb_lane_6_f32: ; CHECK-NEXT: bfmlalb z0.s, z1.h, z2.h[6] ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.bfmlalb.lane( %a, %b, %c, i64 6) ret %out } define @bfmlalb_lane_7_f32( %a, %b, %c) nounwind { ; CHECK-LABEL: bfmlalb_lane_7_f32: ; CHECK-NEXT: bfmlalb z0.s, z1.h, z2.h[7] ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.bfmlalb.lane( %a, %b, %c, i64 7) ret %out } ; ; BFMLALT ; define @bfmlalt_f32( %a, %b, %c) nounwind { ; CHECK-LABEL: bfmlalt_f32: ; CHECK-NEXT: bfmlalt z0.s, z1.h, z2.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.bfmlalt( %a, %b, %c) ret %out } define @bfmlalt_lane_0_f32( %a, %b, %c) nounwind { ; CHECK-LABEL: bfmlalt_lane_0_f32: ; CHECK-NEXT: bfmlalt z0.s, z1.h, z2.h[0] ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.bfmlalt.lane( %a, %b, %c, i64 0) ret %out } define @bfmlalt_lane_1_f32( %a, %b, %c) nounwind { ; CHECK-LABEL: bfmlalt_lane_1_f32: ; CHECK-NEXT: bfmlalt z0.s, z1.h, z2.h[1] ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.bfmlalt.lane( %a, %b, %c, i64 1) ret %out } define @bfmlalt_lane_2_f32( %a, %b, %c) nounwind { ; CHECK-LABEL: bfmlalt_lane_2_f32: ; CHECK-NEXT: bfmlalt z0.s, z1.h, z2.h[2] ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.bfmlalt.lane( %a, %b, %c, i64 2) ret %out } define @bfmlalt_lane_3_f32( %a, %b, %c) nounwind { ; CHECK-LABEL: bfmlalt_lane_3_f32: ; CHECK-NEXT: bfmlalt z0.s, z1.h, z2.h[3] ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.bfmlalt.lane( %a, %b, %c, i64 3) ret %out } define @bfmlalt_lane_4_f32( %a, %b, %c) nounwind { ; CHECK-LABEL: bfmlalt_lane_4_f32: ; CHECK-NEXT: bfmlalt z0.s, z1.h, z2.h[4] ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.bfmlalt.lane( %a, %b, %c, i64 4) ret %out } define @bfmlalt_lane_5_f32( %a, %b, %c) nounwind { ; CHECK-LABEL: bfmlalt_lane_5_f32: ; CHECK-NEXT: bfmlalt z0.s, z1.h, z2.h[5] ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.bfmlalt.lane( %a, %b, %c, i64 5) ret %out } define @bfmlalt_lane_6_f32( %a, %b, %c) nounwind { ; CHECK-LABEL: bfmlalt_lane_6_f32: ; CHECK-NEXT: bfmlalt z0.s, z1.h, z2.h[6] ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.bfmlalt.lane( %a, %b, %c, i64 6) ret %out } define @bfmlalt_lane_7_f32( %a, %b, %c) nounwind { ; CHECK-LABEL: bfmlalt_lane_7_f32: ; CHECK-NEXT: bfmlalt z0.s, z1.h, z2.h[7] ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.bfmlalt.lane( %a, %b, %c, i64 7) ret %out } ; ; BFMMLA ; define @bfmmla_f32( %a, %b, %c) nounwind { ; CHECK-LABEL: bfmmla_f32: ; CHECK-NEXT: bfmmla z0.s, z1.h, z2.h ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.bfmmla( %a, %b, %c) ret %out } ; ; BFCVT ; define @fcvt_bf16_f32( %a, %pg, %b) nounwind { ; CHECK-LABEL: fcvt_bf16_f32: ; CHECK-NEXT: bfcvt z0.h, p0/m, z1.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.fcvt.bf16f32( %a, %pg, %b) ret %out } ; ; BFCVTNT ; define @fcvtnt_bf16_f32( %a, %pg, %b) nounwind { ; CHECK-LABEL: fcvtnt_bf16_f32: ; CHECK-NEXT: bfcvtnt z0.h, p0/m, z1.s ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.fcvtnt.bf16f32( %a, %pg, %b) ret %out } declare @llvm.aarch64.sve.bfdot(, , ) declare @llvm.aarch64.sve.bfdot.lane(, , , i64) declare @llvm.aarch64.sve.bfmlalb(, , ) declare @llvm.aarch64.sve.bfmlalb.lane(, , , i64) declare @llvm.aarch64.sve.bfmlalt(, , ) declare @llvm.aarch64.sve.bfmlalt.lane(, , , i64) declare @llvm.aarch64.sve.bfmmla(, , ) declare @llvm.aarch64.sve.fcvt.bf16f32(, , ) declare @llvm.aarch64.sve.fcvtnt.bf16f32(, , )