fpetrogalli added inline comments.
================ Comment at: llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td:426-427 + let Predicates = [HasSVE, HasBF16] in { + def : Pat<(nxv8bf16 (AArch64dup (bf16 FPR16:$src))), + (DUP_ZZI_H (INSERT_SUBREG (IMPLICIT_DEF), FPR16:$src, hsub), 0)>; + } ---------------- c-rhodes wrote: > I think we're missing a test for this pattern in > `llvm/test/CodeGen/AArch64/sve-vector-splat.ll`? Same applies to dup 0 > patterns below. I have added these patters to allow adding the regression tests in this patch, so they are somehow guarded by the tests. I tried to add the test cases anyway in sve-vector-splat.ll, but the following one crashes the compiler, so the whole "splatting a bfloat constant" deserve a separate patch. ``` define <vscale x 8 x bfloat> @splat_nxv8bf16_imm() #0 { ; CHECK-LABEL: splat_nxv8bf16_imm: ; CHECK: mov z0.h, #1.0 ; CHECK-NEXT: ret %1 = insertelement <vscale x 8 x bfloat> undef, bfloat 1.0, i32 0 %2 = shufflevector <vscale x 8 x bfloat> %1, <vscale x 8 x bfloat> undef, <vscale x 8 x i32> zeroinitializer ret <vscale x 8 x bfloat> %2 } ``` I will create a new revision and make it a parent of this one. ================ Comment at: llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td:1496-1498 + def : Pat<(nxv2i64 (bitconvert (nxv8bf16 ZPR:$src))), (nxv2i64 ZPR:$src)>; + def : Pat<(nxv8bf16 (bitconvert (nxv2i64 ZPR:$src))), (nxv8bf16 ZPR:$src)>; + def : Pat<(nxv8bf16 (bitconvert (nxv8i16 ZPR:$src))), (nxv8bf16 ZPR:$src)>; ---------------- c-rhodes wrote: > missing tests in `llvm/test/CodeGen/AArch64/sve-bitcast.ll` The bitconvert patterns went in via D82501. This code is not present anymore in this patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82345/new/ https://reviews.llvm.org/D82345 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits