1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve2p1 -mattr=+b16b16 -mattr=+use-experimental-zeroing-pseudos -verify-machineinstrs < %s \
5 define <vscale x 8 x bfloat> @bfmul_pred(<vscale x 8 x i1> %pg, <vscale x 8 x bfloat> %a, <vscale x 8 x bfloat> %b){
6 ; CHECK-LABEL: bfmul_pred:
8 ; CHECK-NEXT: bfmul z0.h, p0/m, z0.h, z1.h
10 %res = call <vscale x 8 x bfloat> @llvm.aarch64.sve.fmul.nxv8bf16(<vscale x 8 x i1> %pg, <vscale x 8 x bfloat> %a, <vscale x 8 x bfloat> %b)
11 ret <vscale x 8 x bfloat> %res
14 define <vscale x 8 x bfloat> @bfmul_zeroing(<vscale x 8 x i1> %pg, <vscale x 8 x bfloat> %a, <vscale x 8 x bfloat> %b) {
15 ; CHECK-LABEL: bfmul_zeroing:
17 ; CHECK-NEXT: movprfx z0.h, p0/z, z0.h
18 ; CHECK-NEXT: bfmul z0.h, p0/m, z0.h, z1.h
20 %a_z = select <vscale x 8 x i1> %pg, <vscale x 8 x bfloat> %a, <vscale x 8 x bfloat> zeroinitializer
21 %out = call <vscale x 8 x bfloat> @llvm.aarch64.sve.fmul.nxv8bf16(<vscale x 8 x i1> %pg,
22 <vscale x 8 x bfloat> %a_z,
23 <vscale x 8 x bfloat> %b)
24 ret <vscale x 8 x bfloat> %out
27 define <vscale x 8 x bfloat> @bfmul_u_pred(<vscale x 8 x i1> %pg, <vscale x 8 x bfloat> %a, <vscale x 8 x bfloat> %b){
28 ; CHECK-LABEL: bfmul_u_pred:
30 ; CHECK-NEXT: bfmul z0.h, p0/m, z0.h, z1.h
32 %res = call <vscale x 8 x bfloat> @llvm.aarch64.sve.fmul.u.nxv8bf16(<vscale x 8 x i1> %pg, <vscale x 8 x bfloat> %a, <vscale x 8 x bfloat> %b)
33 ret <vscale x 8 x bfloat> %res
36 define <vscale x 8 x bfloat> @bfmul_u(<vscale x 8 x bfloat> %a, <vscale x 8 x bfloat> %b){
37 ; CHECK-LABEL: bfmul_u:
39 ; CHECK-NEXT: bfmul z0.h, z0.h, z1.h
41 %elt = call <vscale x 8 x i1> @llvm.aarch64.sve.ptrue.nxv8i1(i32 31)
42 %res = call <vscale x 8 x bfloat> @llvm.aarch64.sve.fmul.u.nxv8bf16(<vscale x 8 x i1> %elt, <vscale x 8 x bfloat> %a, <vscale x 8 x bfloat> %b)
43 ret <vscale x 8 x bfloat> %res
46 define <vscale x 8 x bfloat> @bfmul_u_zeroing(<vscale x 8 x i1> %pg, <vscale x 8 x bfloat> %a, <vscale x 8 x bfloat> %b) {
47 ; CHECK-LABEL: bfmul_u_zeroing:
49 ; CHECK-NEXT: mov z2.h, #0 // =0x0
50 ; CHECK-NEXT: sel z0.h, p0, z0.h, z2.h
51 ; CHECK-NEXT: bfmul z0.h, p0/m, z0.h, z1.h
53 %a_z = select <vscale x 8 x i1> %pg, <vscale x 8 x bfloat> %a, <vscale x 8 x bfloat> zeroinitializer
54 %out = call <vscale x 8 x bfloat> @llvm.aarch64.sve.fmul.u.nxv8bf16(<vscale x 8 x i1> %pg,
55 <vscale x 8 x bfloat> %a_z,
56 <vscale x 8 x bfloat> %b)
57 ret <vscale x 8 x bfloat> %out
60 declare <vscale x 8 x bfloat> @llvm.aarch64.sve.fmul.nxv8bf16(<vscale x 8 x i1>, <vscale x 8 x bfloat>, <vscale x 8 x bfloat>)
61 declare <vscale x 8 x bfloat> @llvm.aarch64.sve.fmul.u.nxv8bf16(<vscale x 8 x i1>, <vscale x 8 x bfloat>, <vscale x 8 x bfloat>)
62 declare <vscale x 8 x i1> @llvm.aarch64.sve.ptrue.nxv8i1(i32 immarg)